-
Notifications
You must be signed in to change notification settings - Fork 113
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
Allow multiple materialized views to write to same target (#280) #364
base: main
Are you sure you want to change the base?
Allow multiple materialized views to write to same target (#280) #364
Conversation
issue #280 |
e4e9b6d
to
f932efb
Compare
Thank you for your contribution! looking forward to reviewing this |
f932efb
to
798aca9
Compare
3485793
to
e661bfa
Compare
e661bfa
to
277fa45
Compare
277fa45
to
064ed53
Compare
@BentsiLeviav Ok, Ive done this. |
"hackers.sql": MV_MODEL, | ||
} | ||
|
||
def test_create(self, project): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also test for updates and full refresh?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think if you change the model to add or rename MVs, then old ones will be left running, which is incorrect.
Thanks @the4thamigo-uk |
Summary
Proposed mechanism to support having multiple materialized views pointing to the same target table.
In brief, we add tags to mark blocks of the sql which will form each of the materialized views to be created.
i.e. https://github.com/ClickHouse/dbt-clickhouse/pull/364/files#diff-b1cddf2e5c9b3d08ea2276e5cef4944b06b9744a4076c5970ff5a5edb0140f08R62.
The entire union of all such blocks is used to backfill the target table.
Checklist
Delete items not relevant to your PR: