-
Notifications
You must be signed in to change notification settings - Fork 982
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
Updated doc to show new way of defining snapshots #6157
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Co-authored-by: Mirna Wong <[email protected]>
Co-authored-by: Mirna Wong <[email protected]>
Co-authored-by: Mirna Wong <[email protected]>
Co-authored-by: Mirna Wong <[email protected]>
Co-authored-by: Mirna Wong <[email protected]>
Co-authored-by: Mirna Wong <[email protected]>
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.
As discussed, we will instead be updating all of snapshot the docs with the new spec
|
||
Defining a snapshot in YAML treats snapshots as a distinct resource type, separate from models, allowing for improved organization and consistency within your code. | ||
|
||
They don't contain logic, similar to exposures, sources, and tests. To add extra logic to your snapshot, you can break it out into an ephemeral model for cleaner development and testing, and then create a snapshot of that model. |
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.
This isn't quite true. The logic they contain is select * from relation
. Also, while exposures and sources don't have logic, tests do.
|
||
## Define snapshots in YAML | ||
|
||
Defining a snapshot in YAML treats snapshots as a distinct resource type, separate from models, allowing for improved organization and consistency within your code. |
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.
This makes it sound like defining snapshots in YML is what treats snapshots as a distinct resource type, which is not true.
Closed off as Core project has been paused |
I have created this PR following this Git issue: https://github.com/orgs/dbt-labs/projects/14/views/35?pane=issue&itemId=80796110 which outlines the new way of defining snapshots
What are you changing in this pull request and why?
Checklist