From 52c289c47c2467f09dea2a917dd530b4d4ef889a Mon Sep 17 00:00:00 2001 From: Thomas Lento Date: Tue, 12 Dec 2023 09:05:49 -0800 Subject: [PATCH] Switch SCD example to entity type `natural` We recommend using the `natural` type for what is normally the `primary` entity in an SCD semantic model layout. The distinction is that `primary` indicates one row per entity value, while `natural` does not, and in an SCD context there is one row per entity value/time window set, rather than one row per entity value as in standard conformed dimension tables. --- website/docs/docs/build/dimensions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/docs/build/dimensions.md b/website/docs/docs/build/dimensions.md index 683ff730d3c..97e2fdd502e 100644 --- a/website/docs/docs/build/dimensions.md +++ b/website/docs/docs/build/dimensions.md @@ -252,7 +252,7 @@ This example shows how to create slowly changing dimensions (SCD) using a semant | 333 | 2 | 2020-08-19 | 2021-10-22| | 333 | 3 | 2021-10-22 | 2048-01-01| -Take note of the extra arguments under `validity_params`: `is_start` and `is_end`. These arguments indicate the columns in the SCD table that contain the start and end dates for each tier (or beginning or ending timestamp column for a dimensional value). +Take note of the extra arguments under `validity_params`: `is_start` and `is_end`. These arguments indicate the columns in the SCD table that contain the start and end dates for each tier (or beginning or ending timestamp column for a dimensional value). Note also the entity is tagged as `natural` - this is to distinguish it from a `primary` entity, where we expect one row per entity value. Here, we expect one row per entity value/validity window combination. ```yaml semantic_models: @@ -282,7 +282,7 @@ semantic_models: entities: - name: sales_person - type: primary + type: natural expr: sales_person_id ```