-
Notifications
You must be signed in to change notification settings - Fork 977
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
Handle case when an incremental table is empty #5326
Merged
Merged
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
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
github-actions
bot
added
content
Improvements or additions to content
size: x-small
This change will take under 3 hours to fix.
labels
Apr 23, 2024
matthewshaver
approved these changes
Apr 24, 2024
Closed
2 tasks
This was referenced Jul 15, 2024
mirnawong1
pushed a commit
that referenced
this pull request
Jul 18, 2024
[Preview](https://docs-getdbt-com-git-dbeatty10-patch-1-dbt-labs.vercel.app/docs/build/incremental-models#filtering-rows-on-an-incremental-run) ## What are you changing in this pull request and why? The code change in #5326 was tested against a variety of dbt adapters. The update in #5306 modified that code example, and it appears to have database-specific cast syntax (`::`) as well as a data type that means different things in different databases (i.e., the `TIMESTAMP` data type has different semantics in BigQuery vs. Snowflake). So we should restore the code example in #5326. If there is a better example that has been tested across dbt adapters, then we can consider making another update in the future. ## Checklist - [x] Review the [Content style guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md) so my content adheres to these guidelines.
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: x-small
This change will take under 3 hours to fix.
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.
Preview
What are you changing in this pull request and why?
resolves #5321
To ensure that the updated code will work for a broad number of users without issues, I tested the following example against these data platforms:
☝️ Notice the table is empty, like the edge case scenario described in dbt-labs/dbt-core#9997
☝️ Notice it successfully added new data when it arrived.
Reprex
Create this file:
models/my_incremental.sql
Assuming a
profiles.yml
with all the relevant profile names, run these commands:Checklist