-
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
Support snapshot configs in dbt_project.yml #1613
Comments
Existing,
Note: While in theory, you should be able to copy grants during a CTAS, this has not not been working for me, so you may also have to regrant permissions to the dbt role on this new table. |
Hi @clausherther, after reviewing this issue, I was oscillating between whether the default should for the transient option should be true or false. After some thinking, I would have to agree with you that the default should be false, because the default in Snowflake is false. I would explicitly set transient to true if I know I don't want time travel or fail safe on a table, schema or database, but suppose I did want fail safe or time travel then I would not want the default behaviour of the Snowflake adapter in dbt to set transient to true. |
One approach here is to add a
This would bring snapshots in line with models, and seems like a reasonable approach to me. This would not make the default setting for |
@drewbanin do you set this at the root of E.g.
|
Hello @drewbanin and @clausherther, that does sound reasonable, and I just reviewed the issue for introducing transient tables in the first place. It was good to get the context for the decision to make transient the default. |
I get an |
@krishbox this issue is limited to this setting for snapshots, not all tables |
I think drew was saying it'd be good to add a |
Ah, makes sense, thanks! |
Pointing out here that if you have been using the older (caveat: I created those archive tables before Snowflake (or dbt) started supporting transient tables, though) |
I actually think it would be confusing to have a new
why wouldn't it ? |
@johnoscott can you say a little bit more about that? I'm not sure I totally understand what you're saying here |
Sure @drewbanin ; I commented because you said earlier (#1613 (comment)) it would NOT set the default. I don't understand why. To me, the presence of the snapshots setting transient to false would mean it is set off for all snapshots in the project (unless overridden by a specific snapshot config). Am i missing something ? |
ah! Sorry - I think I wrote that comment in the most confusing way possible:
I meant that in the absence of the snapshot transience config, dbt would still create snapshots transiently (ie. the default transience config for all dbt resources would be
in order to make their Snapshot tables non-transient. Sounds like we're on the same page - sorry for the confusion! |
yep, that makes sense then ! |
Feature spec:dbt should support the specification of a Example usage: # dbt_project.yml
snapshots:
transient: false
my_project:
source_tables:
strategy: timestamp
updated_at: updated_at
target_database: raw
target_schema: source_snapshots NOTE: snapshot-specific configs like
|
…fig-block snapshot config blocks (#1613)
Issue
Snapshots are transient tables by default on Snowflake
Issue description
When dbt creates the table for a
snapshot
model, it uses the global default oftransient=true
. Since the data collected via snapshot models cannot be recreated from source data, we want snapshot tables to be available for Snowflake's time travel and fail safe functionality. However, transient tables are excluded from that.This can currently be configured per model
Ideally,
transient=false
should be the default forsnapshot
models.System information
Who will this benefit?
This will helpful for all dbt users on Snowflake
The text was updated successfully, but these errors were encountered: