Skip to content

Commit

Permalink
Change where clause in unique_key example (#5897)
Browse files Browse the repository at this point in the history
## What are you changing in this pull request and why?
The max statement in the where clause for the unique_key example
referred to event_time, but event_time isn't in the select statement. So
this should be updated to max(date_day).

## Checklist
<!--
Uncomment when publishing docs for a prerelease version of dbt:
- [ ] Add versioning components, as described in [Versioning
Docs](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-entire-pages)
- [ ] Add a note to the prerelease version [Migration
Guide](https://github.com/dbt-labs/docs.getdbt.com/tree/current/website/docs/docs/dbt-versions/core-upgrade)
-->
- [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.
- [ X] For [docs
versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#about-versioning),
review how to [version a whole
page](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
and [version a block of
content](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-blocks-of-content).
- [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."

Co-authored-by: Matt Shaver <60105315+matthewshaver@users.noreply.github.com>
  • Loading branch information
bethanyhipple-dbtlabs and matthewshaver committed Aug 6, 2024
1 parent 08d74a3 commit 57ac634
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/docs/docs/build/incremental-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ from {{ ref('app_data_events') }}

-- 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 coalesce(max(event_time), '1900-01-01') from {{ this }})
where date_day >= (select coalesce(max(date_day), '1900-01-01') from {{ this }})

{% endif %}

Expand Down

0 comments on commit 57ac634

Please sign in to comment.