-
Notifications
You must be signed in to change notification settings - Fork 53
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
Implement dbt snapshot #6
Comments
MERGE statement support in Trino engine is required for the implementation of Snapshot, related PR: trinodb/trino#7933 |
@hovaesco it may be a while until that PR gets merged. I noticed that other features that use the merge statement have been re-written here (i.e. incremental materialization). Would it be acceptable to take the same approach here? |
In order to have atomic |
Hey thanks for taking the time to respond. Just so I'm on the same page, what do you mean by incremental strategies? On my end I was referring to how dbt-trino overrides this merge statement for incremental models. |
At this moment dbt_trino only supports append incremental models. See https://github.com/starburstdata/dbt-trino/blob/master/dbt/include/trino/macros/materializations/incremental.sql We have an open PR for adding the delete+insert strategy. However to be able to test it, we need to expand the test setup with iceberg and delta. I actually concur with @p11o that we could implement this feature using |
Now that both merge and delete+insert is merged to main there are no blockers for this ticket? |
@retrry exactly, |
Could you release dbt-trino 1.2.2 with snapshot support? |
Sure, we'll release it tomorrow, sorry for the delay. |
@hovaesco thanks! |
See https://docs.getdbt.com/docs/building-a-dbt-project/snapshots
Possible reference to implement this feature:
https://github.com/dbt-labs/dbt/tree/develop/plugins/postgres
https://github.com/dbt-labs/dbt-spark/blob/master/dbt/include/spark/macros/materializations/snapshot.sql
The text was updated successfully, but these errors were encountered: