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

columns:
- name: order_id
description: This is a unique identifier for an order
description: A unique identifier for each order that originates from the staging table 'stg_orders'.

- name: customer_id
description: Foreign key to the customers table
description: A unique identifier for a customer in the orders training dataset. This ID is used to link orders to specific customers.

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

- name: status
description: '{{ doc("orders_status") }}'
description: A string representation of the current status of the order. It indicates whether the order has been processed, shipped, delivered, or if there was an issue.

- name: amount
description: Total amount (AUD) of the order
description: The financial value of the transaction for the order.

- name: credit_card_amount
description: Amount of the order (AUD) paid for by credit card
description: The financial value of the transaction for orders.

- name: coupon_amount
description: Amount of the order (AUD) paid for by coupon
description: The monetary value of the coupon applied to the transaction.

- name: bank_transfer_amount
description: Amount of the order (AUD) paid for by bank transfer
description: The financial value of the transaction when the payment method is bank transfer.

- name: gift_card_amount
description: Amount of the order (AUD) paid for by gift card
description: The financial value of gift cards used in transactions.

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

columns:
- name: order_id
description: This is a unique identifier for an order
description: A unique identifier for each returned order that originates from the staging table 'stg_orders'.

- name: customer_id
description: Foreign key to the customers table
description: A unique identifier for a customer in the returned orders dataset. This ID is used to link returned orders to specific customers.

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

- name: status
description: '{{ doc("orders_status") }}'
description: A string representation of the current status of the returned order. It indicates whether the returned order has been processed, shipped, delivered, or if there was an
issue.

- name: amount
description: Total amount (AUD) of the order
description: The financial value of the transaction for the returned order.

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

- name: coupon_amount
description: Amount of the order (AUD) paid for by coupon
description: The monetary value of the coupon applied to the transaction for a returned order.

- name: bank_transfer_amount
description: Amount of the order (AUD) paid for by bank transfer
description: The financial value of the transaction when the payment method is bank transfer for returned orders.

- name: gift_card_amount
description: Amount of the order (AUD) paid for by gift card
description: The financial value of gift cards used in transactions 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 training dataset.
- name: first_name
description: A unique identifier for a customer.
- name: last_name
description: A unique identifier for customers in the training dataset.
- name: stg_orders
config:
tags: ["staging", "finance"]
columns:
- name: order_id
description: A unique identifier for each order.
- name: status

description: A string representation of the current status of the order. It
indicates whether the order has been processed, shipped, delivered, or if
there was an issue.
- name: customer_id
description: A unique identifier for a customer in the orders training dataset.
This ID is used to link orders to specific customers.
- 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 each payment record. It is used to track
and reference individual payment transactions.
- name: payment_method

description: A string that specifies the method used for payment.
- name: amount
description: The financial value of the transaction.
- name: order_id
description: A unique identifier for each payment transaction, corresponding
to the order it was made for.
- 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 each user who has signed up for the service.
- name: signup_date
description: A timestamp representing the date and time when a user signed
up for the service.
- name: hashed_password
description: A secure, hashed representation of the password provided during
the signup process.
- name: customer_id
description: A unique identifier for each customer in the signups training
dataset.