-
Notifications
You must be signed in to change notification settings - Fork 56
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 CREATE OR REPLACE in table materialization #377
Conversation
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide. |
54c5c17
to
161841a
Compare
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.
Looks good, this would require docs update.
check_relations_equal(project.adapter, ["seed", "materialization"]) | ||
|
||
|
||
@pytest.mark.iceberg |
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.
delta not supported yet?
cc @findinpath
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.
AFAIK it is currently supported only on iceberg
trinodb/trino#13180 (comment)
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.
delta not supported yet?
CREATE OR REPLACE
for Delta will be supported as of this week in Galaxy.
OSS see trinodb/trino#19991
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.
CREATE OR REPLACE
is live on Galaxy and can be used for testing both Iceberg & Delta Lake tables.
Latest versions of SEP and Galaxy don't support CREATE OR REPLACE yet (that's why it failed in CI). Therefore, we probably need to wait for this support before merging this PR. |
It's a bit confusing, but
|
I'm just wondering, does the create or replace drops old data or does the table need vacuum eventually? It has to keep it around at least for a while, otherwise it would break readers. If it needs vacuum, it might be worth documenting recommendation to run it in a posthook or something, so that the created or replaced tables don't grow out of bounds. (Unless Trino runs vacuum by itself sometimes.) |
161841a
to
7a21e51
Compare
7a21e51
to
319d7a9
Compare
resolves #371
Support CREATE OR REPLACE in table materialization.
Other materializations will be handled in separate PRs.
New behaviour is enabled by adding
on_table_exists='replace'
config.