Skip to content
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

Closed
wants to merge 26 commits into from

Conversation

nataliefiann
Copy link
Contributor

@nataliefiann nataliefiann commented Sep 26, 2024

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

  • I have reviewed the Content style guide so my content adheres to these guidelines.
  • The topic I'm writing about is for specific dbt version(s) and I have versioned it according to the version a whole page and/or version a block of content guidelines.
  • I have added checklist item(s) to this list for anything anything that needs to happen before this PR is merged, such as "needs technical review" or "change base branch."

@nataliefiann nataliefiann requested a review from a team as a code owner September 26, 2024 11:08
Copy link

vercel bot commented Sep 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs-getdbt-com ✅ Ready (Inspect) Visit Preview Sep 30, 2024 1:10pm

@github-actions github-actions bot added content Improvements or additions to content size: small This change will take 1 to 2 days to address labels Sep 26, 2024
Copy link
Collaborator

@graciegoheen graciegoheen left a 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.
Copy link
Collaborator

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.
Copy link
Collaborator

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.

@nataliefiann
Copy link
Contributor Author

Closed off as Core project has been paused

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Improvements or additions to content size: small This change will take 1 to 2 days to address
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants