From 2c0909c7a12929438920be55eb5e88d2ea894f25 Mon Sep 17 00:00:00 2001 From: dbt-markwan <114556261+dbt-markwan@users.noreply.github.com> Date: Tue, 27 Aug 2024 12:53:29 +1000 Subject: [PATCH] Update sl-snowflake-qs.md (#5947) the entity name for the Orders model does not allign with the entity name from the Customers model. The metric Large Order does not use the correct syntax and thus cannot be used by the BI tool downstream ## What are you changing in this pull request and why? Modifying code snippets for `fct_orders.yml` to ensure that the customers entity is aligned with `dim_customers` Fixing code snippet for the filters param of Large Orders. ## Checklist - [ ] 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. - [ ] 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). - [ ] Add a checklist item for anything that needs to happen before this PR is merged, such as "needs technical review" or "change base branch." Adding or removing pages (delete if not applicable): - [ ] Add/remove page in `website/sidebars.js` - [ ] Provide a unique filename for new pages - [ ] Add an entry for deleted pages in `website/vercel.json` - [ ] Run link testing locally with `npm run build` to update the links that point to deleted pages Co-authored-by: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Co-authored-by: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> --- website/docs/guides/sl-snowflake-qs.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/website/docs/guides/sl-snowflake-qs.md b/website/docs/guides/sl-snowflake-qs.md index 782073fdc38..27ce6eebbd4 100644 --- a/website/docs/guides/sl-snowflake-qs.md +++ b/website/docs/guides/sl-snowflake-qs.md @@ -661,7 +661,8 @@ semantic_models: entities: - name: order_id type: primary - - name: customer_id + - name: customer + expr: customer_id type: foreign ``` @@ -686,8 +687,9 @@ semantic_models: entities: - name: order_id type: primary - - name: customer_id - type: foreign + - name: customer + expr: customer_id + type: foreign # Newly added dimensions: - name: order_date @@ -717,7 +719,8 @@ semantic_models: entities: - name: order_id type: primary - - name: customer_id + - name: customer + expr: customer_id type: foreign dimensions: - name: order_date @@ -777,7 +780,8 @@ semantic_models: entities: - name: order_id type: primary - - name: customer_id + - name: customer + expr: customer_id type: foreign dimensions: - name: order_date @@ -825,7 +829,7 @@ metrics: type_params: measure: order_count filter: | - {{ Dimension('order_id__order_total_dim') }} >= 20 + {{ Metric('order_total', group_by=['order_id']) }} >= 20 # Ratio type metric - name: "avg_order_value" label: "avg_order_value"