diff --git a/dbt_project.yml b/dbt_project.yml index b81b5e60..07bc2a79 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -22,7 +22,6 @@ clean-targets: - "dbt_packages" vars: - truncate_timespan_to: "{{ dbt.cast(dbt.current_timestamp(), 'datetime') }}" "dbt_date:time_zone": "America/Los_Angeles" seeds: diff --git a/models/marts/customers.yml b/models/marts/customers.yml index 127be1a4..98361431 100644 --- a/models/marts/customers.yml +++ b/models/marts/customers.yml @@ -1,13 +1,13 @@ models: - name: customers description: Customer overview data mart, offering key details for each unique customer. One row per customer. - tests: + data_tests: - dbt_utils.expression_is_true: expression: "lifetime_spend_pretax + lifetime_tax_paid = lifetime_spend" columns: - name: customer_id description: The unique key of the orders mart. - tests: + data_tests: - not_null - unique - name: customer_name @@ -26,7 +26,7 @@ models: description: The sum of all the order totals (including tax) that a customer has ever placed. - name: customer_type 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: + data_tests: - accepted_values: values: ["new", "returning"] diff --git a/models/marts/order_items.yml b/models/marts/order_items.yml index fb9444d8..339c4769 100644 --- a/models/marts/order_items.yml +++ b/models/marts/order_items.yml @@ -2,11 +2,11 @@ models: - name: order_items columns: - name: order_item_id - tests: + data_tests: - not_null - unique - name: order_id - tests: + data_tests: - relationships: to: ref('orders') field: order_id diff --git a/models/marts/orders.yml b/models/marts/orders.yml index 57ffb416..a37107c3 100644 --- a/models/marts/orders.yml +++ b/models/marts/orders.yml @@ -1,7 +1,7 @@ models: - name: orders description: Order overview data mart, offering key details for each order inlcluding if it's a customer's first order and a food vs. drink item breakdown. One row per order. - tests: + data_tests: - dbt_utils.expression_is_true: expression: "order_items_subtotal = subtotal" - dbt_utils.expression_is_true: @@ -9,12 +9,12 @@ models: columns: - name: order_id description: The unique key of the orders mart. - tests: + data_tests: - not_null - unique - name: customer_id description: The foreign key relating to the customer who placed the order. - tests: + data_tests: - relationships: to: ref('stg_customers') field: customer_id diff --git a/models/staging/stg_customers.yml b/models/staging/stg_customers.yml index 1825e5cb..3007d140 100644 --- a/models/staging/stg_customers.yml +++ b/models/staging/stg_customers.yml @@ -4,6 +4,6 @@ models: columns: - name: customer_id description: The unique key for each customer. - tests: + data_tests: - not_null - unique diff --git a/models/staging/stg_locations.yml b/models/staging/stg_locations.yml index 03b2fce7..0d200c7f 100644 --- a/models/staging/stg_locations.yml +++ b/models/staging/stg_locations.yml @@ -4,7 +4,7 @@ models: columns: - name: location_id description: The unique key for each location. - tests: + data_tests: - not_null - unique diff --git a/models/staging/stg_order_items.yml b/models/staging/stg_order_items.yml index 1e2610cd..7f8b8be9 100644 --- a/models/staging/stg_order_items.yml +++ b/models/staging/stg_order_items.yml @@ -4,12 +4,12 @@ models: columns: - name: order_item_id description: The unique key for each order item. - tests: + data_tests: - not_null - unique - name: order_id description: The corresponding order each order item belongs to - tests: + data_tests: - not_null - relationships: to: ref('stg_orders') diff --git a/models/staging/stg_orders.yml b/models/staging/stg_orders.yml index 7d0bb1a4..907c947c 100644 --- a/models/staging/stg_orders.yml +++ b/models/staging/stg_orders.yml @@ -1,12 +1,12 @@ models: - name: stg_orders description: Order data with basic cleaning and transformation applied, one row per order. - tests: + data_tests: - dbt_utils.expression_is_true: expression: "order_total - tax_paid = subtotal" columns: - name: order_id description: The unique key for each order. - tests: + data_tests: - not_null - unique diff --git a/models/staging/stg_products.yml b/models/staging/stg_products.yml index 2bc03228..b5d18525 100644 --- a/models/staging/stg_products.yml +++ b/models/staging/stg_products.yml @@ -4,6 +4,6 @@ models: columns: - name: product_id description: The unique key for each product. - tests: + data_tests: - not_null - unique diff --git a/models/staging/stg_supplies.yml b/models/staging/stg_supplies.yml index b1734303..3cb4ab0d 100644 --- a/models/staging/stg_supplies.yml +++ b/models/staging/stg_supplies.yml @@ -7,6 +7,6 @@ models: columns: - name: supply_uuid description: The unique key of our supplies per cost. - tests: + data_tests: - not_null - unique