From 57ac634122039e2d1602cf7e8261c915e9a8ad67 Mon Sep 17 00:00:00 2001 From: bethanyhipple-dbtlabs <108838013+bethanyhipple-dbtlabs@users.noreply.github.com> Date: Tue, 6 Aug 2024 14:30:31 -0700 Subject: [PATCH] Change where clause in unique_key example (#5897) ## 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 - [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> --- website/docs/docs/build/incremental-models.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/build/incremental-models.md b/website/docs/docs/build/incremental-models.md index 21cd656484a..df95504ceab 100644 --- a/website/docs/docs/build/incremental-models.md +++ b/website/docs/docs/build/incremental-models.md @@ -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 %}