Open GavrG opened 3 months ago
The query looks correct, I believe it should be a bug created in ClickHouse itself, not in dbt adapter
The query looks correct, I believe it should be a bug created in ClickHouse itself, not in dbt adapter
Agree, but two points:
Have you found or reported the bug to ClickHouse? It is the very active, good chance it is fixed. If not, please let me know as I want to report it.
https://github.com/ClickHouse/ClickHouse/issues/55720, although I would have though the fix would be in 24.2. Is this is ClickHouse Cloud instance?
Interesting. We are running an ever so slightly older version than when the bug appears. We see still see the issue that only the communicator node gets the comments and it is missing from all others. So no proper DDL. Hmm
Describe the bug
Testing v1.7.7 Community PRs exacly: allows to add a comment in table's or view's metadata by @dstsimokha in https://github.com/ClickHouse/dbt-clickhouse/pull/228 We've found, that generated ALTER TABLE SQL "ignores" ON CLUSTER clause and all changes done only on connection node. Clickhouse and DBT does not return any errors.
Steps to reproduce
Select 1 AS some_id, '----' AS some_column_name, '++++' AS some_other_column_name
version: 2 models:
alter table
dbt__core
.test_comment_model
ON CLUSTER "clust"modify comment $dbt_comment_literal_block$test_comment_model description$dbt_comment_literal_block$, comment column some_id $dbt_comment_literal_block$some_id description$dbt_comment_literal_block$, comment column some_column_name $dbt_comment_literal_block$some_column_name description$dbt_comment_literal_block$, comment column some_other_column_name $dbt_comment_literal_block$some_other_column_name description$dbt_comment_literal_block$
SELECT hostName() as hostName,
database
, name,comment
, * FROM clusterAllReplicas('{cluster}', system.columns) where database = 'dbt__core' andtable
= 'test_comment_model' order by database, name, hostName5.2. tables comments
hostName |database |name |comment
-----------------+---------+------------------+-------------------------------+ clickhouse-01|dbtcore|test_comment_model |test_comment_model description clickhouse-02|dbtcore|test_comment_model |
Expected behaviour
Comments should be on all nodes
Fix proposal
Split single command to two
that makes clickhouse behave as expected
dbt and/or ClickHouse server logs
Configuration
Environment
ClickHouse server