Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: mirnawong1 <[email protected]>
  • Loading branch information
tlento and mirnawong1 authored Dec 12, 2023
1 parent 52c289c commit 62def67
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion website/docs/docs/build/dimensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ 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). 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.

The `validity_params` include two important arguments &mdash; `is_start` and `is_end`. These specify the columns in the SCD table that mark the start and end dates (or timestamps) for each tier or dimension. Additionally, the entity is tagged as `natural` to differentiate it from a `primary` entity. In a `primary` entity, each entity value has one row. In contrast, a `natural` entity has one row for each combination of entity value and its validity period.

```yaml
semantic_models:
Expand Down Expand Up @@ -280,6 +281,8 @@ semantic_models:
- name: tier
type: categorical
primary_entity: sales_person
entities:
- name: sales_person
type: natural
Expand Down

0 comments on commit 62def67

Please sign in to comment.