Skip to content
This repository has been archived by the owner on Feb 10, 2025. It is now read-only.

fix Deprecated functionality #129

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
18 changes: 9 additions & 9 deletions models/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ models:
columns:
- name: customer_id
description: This is a unique identifier for a customer
tests:
data_tests:
- unique
- not_null

Expand All @@ -34,14 +34,14 @@ models:

columns:
- name: order_id
tests:
data_tests:
- unique
- not_null
description: This is a unique identifier for an order

- name: customer_id
description: Foreign key to the customers table
tests:
data_tests:
- not_null
- relationships:
to: ref('customers')
Expand All @@ -52,31 +52,31 @@ models:

- name: status
description: '{{ doc("orders_status") }}'
tests:
data_tests:
- accepted_values:
values: ['placed', 'shipped', 'completed', 'return_pending', 'returned']

- name: amount
description: Total amount (AUD) of the order
tests:
data_tests:
- not_null

- name: credit_card_amount
description: Amount of the order (AUD) paid for by credit card
tests:
data_tests:
- not_null

- name: coupon_amount
description: Amount of the order (AUD) paid for by coupon
tests:
data_tests:
- not_null

- name: bank_transfer_amount
description: Amount of the order (AUD) paid for by bank transfer
tests:
data_tests:
- not_null

- name: gift_card_amount
description: Amount of the order (AUD) paid for by gift card
tests:
data_tests:
- not_null
10 changes: 5 additions & 5 deletions models/staging/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ models:
- name: stg_customers
columns:
- name: customer_id
tests:
data_tests:
- unique
- not_null

- name: stg_orders
columns:
- name: order_id
tests:
data_tests:
- unique
- not_null
- name: status
tests:
data_tests:
- accepted_values:
values: ['placed', 'shipped', 'completed', 'return_pending', 'returned']

- name: stg_payments
columns:
- name: payment_id
tests:
data_tests:
- unique
- not_null
- name: payment_method
tests:
data_tests:
- accepted_values:
values: ['credit_card', 'coupon', 'bank_transfer', 'gift_card']