dbt-clickhouse icon indicating copy to clipboard operation
dbt-clickhouse copied to clipboard

Update table relation after exchange command

Open Somtom opened this issue 1 year ago • 3 comments

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

Somtom avatar Dec 27 '23 10:12 Somtom

CLA assistant check
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.

CLAassistant avatar Dec 27 '23 10:12 CLAassistant

@BentsiLeviav Any chance on getting a review for this PR?

steffen030 avatar Mar 28 '24 16:03 steffen030

Sorry for the delay. I'll do my best to review it within the following days.

BentsiLeviav avatar Mar 28 '24 18:03 BentsiLeviav