-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--full-refresh brakes incremental inserts_only=True replicated model #117
Comments
Again replicated tables are not officially supported and in particular, aren't included in the test suite. Have you tried using the experimental Replicated database engine in this situation? Regardless, the issue may be with the fact that the EXCHANGE TABLES macro does not include an ON CLUSTER clause. Is it possible for you to modify that macro and test? https://github.com/ClickHouse/dbt-clickhouse/blob/main/dbt/include/clickhouse/macros/adapters.sql#L117-L122 Your proposed solution of dropping the tables first on cluster seems like a somewhat dangerous change in case of an failure while executing the query. In that case the original tables will be lost and not recoverable if there is some issue with the full refresh. |
Yeah, looks like a good hint, I can test it with fix a little bit later, thanks!
It is okay, I'm ready to be a early adopter :) |
great, thanks @saurabhbikram for taking care of it, unfortunately, I didn't find time to fix and test in myself. |
If I check individual table schemas, I see that engines differ:
replica 1:
ReplicatedReplacingMergeTree('/clickhouse/tables/{layer}-{shard}/db_name/table_name__dbt_tmp/{uuid}', '{replica}')
replica 2: `ReplicatedReplacingMergeTree('/clickhouse/tables/{layer}-{shard}/db_name/table_name/{uuid}', '{replica}')
I would expect that --full-refresh would drop tables on the cluster and run the query as there are no tables created yet.
Looks like it is something similar to #95 as I can't use standard materialization mode with Replication due to tmp tables manipulations affect replication settings.
The text was updated successfully, but these errors were encountered: