Skip to content

Commit

Permalink
Minor clarification of when to use > vs >= in incremental models (#…
Browse files Browse the repository at this point in the history
…3714)

## What are you changing in this pull request and why?
Fixes #2606

## Checklist
- [x] Review the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
and [About
versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
so my content adheres to these guidelines.
- [x] Add a checklist item for anything that needs to happen before this
PR is merged, such as "needs technical review" or "change base branch."
  • Loading branch information
mirnawong1 authored Jul 19, 2023
2 parents d84a897 + 6bd9dee commit 112dcbc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions website/docs/docs/build/incremental-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ from raw_app_data.events
{% if is_incremental() %}

-- this filter will only be applied on an incremental run
-- (uses > to include records whose timestamp occurred since the last run of this model)
where event_time > (select max(event_time) from {{ this }})

{% endif %}
Expand Down Expand Up @@ -137,6 +138,7 @@ from raw_app_data.events
{% if is_incremental() %}

-- this filter will only be applied on an incremental run
-- (uses >= to include records arriving later on the same day as the last run of this model)
where date_day >= (select max(date_day) from {{ this }})

{% endif %}
Expand Down

0 comments on commit 112dcbc

Please sign in to comment.