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
40 changes: 22 additions & 18 deletions models/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,31 +41,33 @@ models:

columns:
- name: order_id
description: This is a unique identifier for an order
description: A unique identifier for each order in the system.

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

- name: order_date
description: Date (UTC) that the order was placed
description: A timestamp representing the date and time when an order was placed in the stg_orders table.

- name: status
description: '{{ doc("orders_status") }}'
description: A current state of the order. This is used to track the progress of the order through the fulfillment process.

- name: amount
description: Total amount (AUD) of the order
description: The numeric value representing the amount of a payment. It is used to track the financial transactions made by customers.

- name: credit_card_amount
description: Amount of the order (AUD) paid for by credit card
description: The numeric value representing the amount of a payment for an order. It is derived from the amount in the stg_payments table and represents the financial transactions made
by customers for the order.

- name: coupon_amount
description: Amount of the order (AUD) paid for by coupon
description: The numeric value representing the amount of a coupon applied to an order. It is derived from the payment amount and is used to track discounts and promotional offers.

- name: bank_transfer_amount
description: Amount of the order (AUD) paid for by bank transfer
description: The numeric value representing the amount of a payment made through bank transfer. It is derived from the payment amount and used to track financial transactions processed
through bank transfers.

- name: gift_card_amount
description: Amount of the order (AUD) paid for by gift card
description: This represents the amount allocated for gift cards as part of a payment transaction.

- name: returned_orders
description: This table contains all of the returned orders
Expand All @@ -74,28 +76,30 @@ models:

columns:
- name: order_id
description: This is a unique identifier for an order
description: A unique identifier for each returned order in the system.

- name: customer_id
description: Foreign key to the customers table
description: A unique identifier for the customer who has returned an order.

- name: order_date
description: Date (UTC) that the order was placed
description: A timestamp representing the date and time when a returned order was originally placed in the stg_orders table.

- name: status
description: '{{ doc("orders_status") }}'
description: A current state of the order in the returned orders table. This is used to track the progress of the order through the fulfillment process for returned orders.

- name: amount
description: Total amount (AUD) of the order
description: The numeric value representing the amount of a payment for a returned order. It is used to track the financial transactions made by customers for returned orders.

- name: credit_card_amount
description: Amount of the order (AUD) paid for by credit card
description: The numeric value representing the amount of a payment for a returned order, derived from the amount in the stg_payments table and representing the financial transactions
made by customers for the order.

- name: coupon_amount
description: Amount of the order (AUD) paid for by coupon
description: The numeric value representing the amount of a coupon applied to a returned order. It is derived from the payment amount and is used to track discounts and promotional
offers.

- name: bank_transfer_amount
description: Amount of the order (AUD) paid for by bank transfer
description: The numeric value representing the amount of a payment made through bank transfer for a returned order.

- name: gift_card_amount
description: Amount of the order (AUD) paid for by gift card
description: This represents the amount allocated for gift cards as part of a payment transaction for returned orders.
34 changes: 34 additions & 0 deletions models/staging/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,57 @@ models:
columns:
- name: customer_id

description: A unique identifier for a customer in the customers_training
table.
- name: first_name
description: A unique identifier for customers that represents their first
name.
- name: last_name
description: A string value representing the family name of a customer.
- name: stg_orders
config:
tags: ["staging", "finance"]
columns:
- name: order_id
description: A unique identifier for each order in the system.
- name: status

description: A current state of the order. This is used to track the progress
of the order through the fulfillment process.
- name: customer_id
description: A unique identifier for the customer who placed the order.
- name: order_date
description: A timestamp representing the date and time when an order was
placed.
- name: stg_payments
config:
tags: ["staging", "finance"]
columns:
- name: payment_id
description: A unique identifier for payments made through the system.
- name: payment_method

description: A method of payment used for processing financial transactions.
- name: amount
description: The numeric value representing the amount of a payment. It is
used to track the financial transactions made by customers.
- name: order_id
description: A unique identifier for each payment transaction, used to link
the payment with the corresponding order.
- name: stg_signups
config:
tags: ["staging", "PII"]
columns:
- name: signup_id
description: A unique identifier for each signup record.
- name: customer_email
description: A unique identifier for a customer's email address used in the
signups training dataset.
- name: signup_date
description: The date and time when a user signs up for the service.
- name: hashed_password
description: A securely hashed version of the user's password used for authentication
purposes.
- name: customer_id
description: A unique identifier for customers who have signed up for the
service.