-
Notifications
You must be signed in to change notification settings - Fork 990
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
Update snapshots.md #6866
Merged
Merged
Update snapshots.md #6866
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It captures the key point of a recent thread on Slack.
@marcelobour is attempting to deploy a commit to the dbt-labs Team on Vercel. A member of the Team first needs to authorize it. |
github-actions
bot
added
content
Improvements or additions to content
size: small
This change will take 1 to 2 days to address
labels
Feb 4, 2025
mirnawong1
reviewed
Feb 4, 2025
mirnawong1
reviewed
Feb 4, 2025
mirnawong1
reviewed
Feb 4, 2025
mirnawong1
approved these changes
Feb 4, 2025
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.
thanks so much for clarifying this and correcting @marcelobour ! really appreciate it -- approved!
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are you changing in this pull request and why?
This PR suggests changing the example recently added to this document as the result of this Slack thread.
The key point of the original question is: "...there is a parent entity that has a “last updated” date that I need to use for new rows instead of the current timestamp. This column is present in the source data, although as it comes from the parent entity instead it can’t be used reliably to indicate changes in the source entity, but when there are changes then it can be used as the start date for those changes."
So we need to check some columns, without including anything related to update dates, and when a change is detected, we want to use our database update-related column instead of the timestamp corresponding to the snapshot execution.
The recently added example isn't incorrect, but doesn't capture what was discussed and solved in the thread, which is a more probable use case situation. Moreover, using a timestamp strategy with a properly defined updated_at field and a check strategy that only checks a column corresponding to the updated time is basically the same. I'd venture to say it could even be less efficient.
In addition to modifying the example, titles, and described logic, a summary of this use case was added to the clarifications section to serve as a reference.
Checklist