Skip to content
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
12 changes: 6 additions & 6 deletions models/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,28 +44,28 @@ models:
description: This is a unique identifier for an order

- name: customer_id
description: Foreign key to the customers table
description: A unique identifier for the customer associated with the order.

- name: order_date
description: Date (UTC) that the order was placed

- name: status
description: '{{ doc("orders_status") }}'
description: A status indicator for orders, used to track the current state of each order within the system.

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

- name: credit_card_amount
description: Amount of the order (AUD) paid for by credit card
description: The amount of money charged to a credit card for an order. It is derived from the amount column in the stg_payments table, where the payment method is a credit card.

- name: coupon_amount
description: Amount of the order (AUD) paid for by coupon
description: A monetary value representing the discount applied to an order through a coupon.

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

- name: gift_card_amount
description: Amount of the order (AUD) paid for by gift card
description: A representation of the monetary value of gift cards used in the payment for an order.

- name: returned_orders
description: This table contains all of the returned orders
Expand All @@ -89,7 +89,7 @@ models:
description: Total amount (AUD) of the order

- name: credit_card_amount
description: Amount of the order (AUD) paid for by credit card
description: The amount of credit card payment for returned orders.

- name: coupon_amount
description: Amount of the order (AUD) paid for by coupon
Expand Down
20 changes: 20 additions & 0 deletions models/staging/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,43 @@ models:
columns:
- name: customer_id

description: A unique identifier assigned to each customer in the system.
- name: first_name
description: A unique identifier for a customer's first name, sourced from
the customers_training table.
- name: last_name
description: A unique identifier...
- name: stg_orders
config:
tags: ["staging", "finance"]
columns:
- name: order_id
description: A unique identifier for orders.
- name: status

description: A status indicator for orders, used to track the current state
of each order within the system.
- name: customer_id
description: A unique identifier for the customer associated with the order.
- name: stg_payments
config:
tags: ["staging", "finance"]
columns:
- name: payment_id
- name: payment_method

description: A method used to make a payment.
- name: stg_signups
config:
tags: ["staging", "PII"]
columns:
- name: signup_id
description: A unique identifier for signups, derived from the 'id' column
in the 'signups_training' table.
- name: customer_email
description: A unique identifier for the user who has signed up.
- name: hashed_password
description: A hashed version of the password associated with a user's signup.
- name: customer_id
description: A unique identifier for a customer who has signed up for a service
or program.