dbt-clickhouse
dbt-clickhouse copied to clipboard
Update table relation after exchange command
Related to https://github.com/ClickHouse/dbt-clickhouse/issues/226
Summary
It seems that after running the EXCHANGE TABLES
command, the distributed table does not point to the local table anymore (see https://github.com/ClickHouse/dbt-clickhouse/issues/226).
While testing locally, I realized that if we run the create_distributed_table
operation once more after the EXCHANGE TABLES
, this fixes the problem. Even though I have very few context on dbt adapters, this hopefully helps figuring out the correct solution.
Checklist
Delete items not relevant to your PR:
- [ ] Unit and integration tests covering the common scenarios were added
- [ ] A human-readable description of the changes was provided to include in CHANGELOG
- [ ] For significant changes, documentation in https://github.com/ClickHouse/clickhouse-docs was updated with further explanations or tutorials
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
@BentsiLeviav Any chance on getting a review for this PR?
Sorry for the delay. I'll do my best to review it within the following days.