Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ models/metrics/metrics_test
models/metrics/semantic_manifest.json
semantic_manifest
dbt-core/
.user.yml
.user.yml
dbt_internal_packages/
5 changes: 4 additions & 1 deletion models/marts/customers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
models:
- name: customers
config:
static_analysis: strict
description: Customer overview data mart, offering key details for each unique customer. One row per customer.
columns:
- name: customer_id
Expand All @@ -23,7 +25,8 @@ models:
description: Options are 'new' or 'returning', indicating if a customer has ordered more than once or has only placed their first order to date.
tests:
- accepted_values:
values: ["new", "returning"]
arguments:
values: ["new", "returning"]
metrics:
# Simple metrics
- name: customers_with_orders
Expand Down
5 changes: 3 additions & 2 deletions models/marts/orders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ models:
description: The foreign key relating to the customer who placed the order.
tests:
- relationships:
to: ref('stg_customers')
field: customer_id
arguments:
to: ref('stg_customers')
field: customer_id
- name: location_id
description: The foreign key relating to the location the order was placed at.
- name: order_total
Expand Down
Loading