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

Update incremental-models.md #5306

Merged
merged 3 commits into from
Jun 20, 2024
Merged

Conversation

zvijayakumar
Copy link
Contributor

If event_time is NULL or the table is truncated, the condition will always be true and load all records. This is an edge case.

If a final table is truncated it will return the NULL as the result

( select * from table where event_time > NULL ) --> return no results

It will not have any data in it and dbt considers it as incremental load. then the model will fail, to avoid that situation. In dbt we don't have anything to handle this situation.

What are you changing in this pull request and why?

Checklist

Adding or removing pages (delete if not applicable):

  • Add/remove page in website/sidebars.js
  • Provide a unique filename for new pages
  • Add an entry for deleted pages in website/vercel.json
  • Run link testing locally with npm run build to update the links that point to deleted pages

If event_time is NULL or the table is truncated, the condition will always be true and load all records. 
This is an edge case. 

If an final table is truncated. dbt condisider it as incremental load. then the model will fail, to avoid that situation.
@zvijayakumar zvijayakumar requested a review from a team as a code owner April 18, 2024 18:34
Copy link

welcome bot commented Apr 18, 2024

Hello!👋 Thanks for contributing to the dbt product documentation and opening this pull request! ✨
We use Markdown and some HTML to write the dbt product documentation. When writing content, you can use our style guide and content types to understand our writing standards and how we organize information in the dbt product docs.
We'll review your contribution and respond as soon as we can. 😄

Copy link

vercel bot commented Apr 18, 2024

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

Name Status Preview Comments Updated (UTC)
docs-getdbt-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2024 10:15am

@runleonarun runleonarun added the new contributor Label for first-time contributors label Apr 18, 2024
@github-actions github-actions bot added content Improvements or additions to content size: x-small This change will take under 3 hours to fix. labels Apr 18, 2024
Copy link
Contributor

@mirnawong1 mirnawong1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @zvijayakumar, thanks for opening this up and great addition for this edge case! i like the addition of preventing errors if the SQL engine interprets the string differently or fails to convert it properly. will get this merged for you!

i would recommend (if you haven't already) searching for or adding an issue in the dbt core repo to flag the edge case safeguarding. thanks again and looking forward to you future contributions !

@mirnawong1 mirnawong1 enabled auto-merge (squash) June 20, 2024 10:10
@mirnawong1 mirnawong1 merged commit 6c4682a into dbt-labs:current Jun 20, 2024
4 checks passed
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 new contributor Label for first-time contributors size: x-small This change will take under 3 hours to fix.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants