From 69db26ff31835764cb2b16e08266b85384d3a8a3 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Tue, 23 Apr 2024 09:56:15 +0100 Subject: [PATCH 1/3] Faith's input --- website/docs/guides/sl-snowflake-qs.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/website/docs/guides/sl-snowflake-qs.md b/website/docs/guides/sl-snowflake-qs.md index 28e2be9fc66..ff381b15498 100644 --- a/website/docs/guides/sl-snowflake-qs.md +++ b/website/docs/guides/sl-snowflake-qs.md @@ -144,7 +144,6 @@ This guide will cover the following topics: 2. In the Snowflake user interface (UI), click **+ Worksheet** in the upper right corner. 3. Select **SQL Worksheet** to create a new worksheet. - ### Set up Snowflake environment The data used here is stored as CSV files in a public S3 bucket and the following steps will guide you through how to prepare your Snowflake account for that data and upload it. @@ -594,10 +593,11 @@ In the following steps, semantic models enable you to define how to interpret th ```yaml semantic_models: - name: orders + defaults: + agg_time_dimension: order_date description: | Order fact table. This table’s grain is one row per order. model: ref('fct_orders') - ``` The following sections explain [dimensions](/docs/build/dimensions), [entities](/docs/build/entities), and [measures](/docs/build/measures) in more detail, showing how they each play a role in semantic models. @@ -818,7 +818,7 @@ After setting up your orders model: ```yaml semantic_models: - - name: customers + - name: dim_customers defaults: agg_time_dimension: most_recent_order_date description: | @@ -831,8 +831,7 @@ semantic_models: dimensions: - name: customer_name type: categorical - - name: customer_type - type: categorical + expr: first_name - name: first_order_date type: time type_params: @@ -845,8 +844,10 @@ semantic_models: - name: count_lifetime_orders description: Total count of orders per customer. agg: sum + expr: number_of_orders - name: lifetime_spend agg: sum + expr: lifetime_value description: Gross customer lifetime spend inclusive of taxes. - name: customers expr: customer_id From 6b9b79d57ff0b07ce02b9cb6080f5847bc1514df Mon Sep 17 00:00:00 2001 From: Joel Labes Date: Wed, 24 Apr 2024 13:25:00 +1200 Subject: [PATCH 2/3] Update sl-snowflake-qs.md --- website/docs/guides/sl-snowflake-qs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/guides/sl-snowflake-qs.md b/website/docs/guides/sl-snowflake-qs.md index 28e2be9fc66..32caeac5abb 100644 --- a/website/docs/guides/sl-snowflake-qs.md +++ b/website/docs/guides/sl-snowflake-qs.md @@ -823,7 +823,7 @@ semantic_models: agg_time_dimension: most_recent_order_date description: | semantic model for dim_customers - model: ref('customers') + model: ref('dim_customers') entities: - name: customer expr: customer_id From 56c647407060ecfa832cc5a0da07e3264f8fdd2f Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Wed, 24 Apr 2024 04:42:19 +0100 Subject: [PATCH 3/3] Update sl-snowflake-qs.md --- website/docs/guides/sl-snowflake-qs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/guides/sl-snowflake-qs.md b/website/docs/guides/sl-snowflake-qs.md index ff381b15498..13f17e58bdc 100644 --- a/website/docs/guides/sl-snowflake-qs.md +++ b/website/docs/guides/sl-snowflake-qs.md @@ -818,7 +818,7 @@ After setting up your orders model: ```yaml semantic_models: - - name: dim_customers + - name: customers defaults: agg_time_dimension: most_recent_order_date description: |