-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add support for Snowflake's transient tables #946
Comments
@jon-rtr this is really cool! We've noticed that catalog queries get very slow on Snowflake after a series of dbt runs. Do you think this flag would also have any bearing on the catalog queries? My suspicion is that after permanent tables are dropped, their metadata still kicks around in the catalog. Regardless, I think this is worth implementing on the basis of cost alone, and it should be a pretty straightforward update the to table materialization. Thanks for the report! |
I can ask our Snowflake rep. Could you give some more details on what you mean by "catalog queries"? Do you have a good example? What are your thoughts on how the solution should be architected? Do you think it should be a snowflake customization of the table materialization? Should there be a new flag to dbt run like |
dbt queries I'm curious if selecting from I think the right way to implement would be to add a config option for models. If |
I'll add: we're moving away from flags like |
Making everything transient on Snowflake is probably the right option, although I can see cases for very large models that are being generated and then incrementally updated it might be nice to have an override option. e.g. if I have some giant 100 billion row table that I could in theory regenerate from raw tables but it might take 24 hours to do it, I might want an option to make it permanent so the DBAs (maybe I am the DBA 🙂 ?) can use fail-safe for that particular table for a faster recovery |
Feature
Feature description
DBT currently has support for permanent and temporary tables. As an option to save space consumed by Snowflake tables, we should also support transient tables: https://docs.snowflake.net/manuals/user-guide/tables-temp-transient.html#comparison-of-table-types
CREATE TABLE ... AS
CREATE TRANSIENT TABLE ... AS
CREATE TEMPORARY TABLE ... AS
Who will this benefit?
Anyone using the Snowflake data warehouse.
The text was updated successfully, but these errors were encountered: