-
Notifications
You must be signed in to change notification settings - Fork 120
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
Support projections #342
Support projections #342
Conversation
Writing it here for community awareness - the feature was added both for |
@BentsiLeviav Would this be a problem when using Clickhouse Cloud ? Also can you please add an example configuration too ? |
@arun11299 it is supposed to work on ClickHouse Cloud with no problems. |
Summary
close #319
This PR introduces support for projections in
dbt-clickhouse
. Projections are added to thetable
anddistributed_table
materializations as a model setting. For distributed tables, the projection is applied to the_local
tables, not to the distributed proxy table.Tests
I added a test for each materialization. During test development, I encountered two challenges:
system.query_log
. However, this table takes time to create, which necessitates adding a sleep statement.query_id
parameter to ClickHouse, making it difficult to retrieve the exact query I want to check. As a workaround, I queriedsystem.query_log
using aLIKE
statement.