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
36 changes: 18 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.

- name: customer_id
description: Foreign key to the customers table
description: A unique identifier for the customer placing the order. It is derived from the 'stg_orders.customer_id' column which is a numeric value.

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

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

- name: amount
description: Total amount (AUD) of the order
description: The monetary value associated with each payment.

- name: credit_card_amount
description: Amount of the order (AUD) paid for by credit card
description: A monetary value representing the amount paid using credit card as a payment method.

- name: coupon_amount
description: Amount of the order (AUD) paid for by coupon
description: The monetary value deducted from the total order amount as a result of a coupon or discount applied during the payment process.

- name: bank_transfer_amount
description: Amount of the order (AUD) paid for by bank transfer
description: The monetary value associated with each payment made via bank transfer.

- name: gift_card_amount
description: Amount of the order (AUD) paid for by gift card
description: The monetary value associated with the payment method of gift card.

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

columns:
- name: order_id
description: This is a unique identifier for an order
description: A unique identifier for each returned order. This is a reference to the original order ID from the orders table, used to track which orders have been returned.

- name: customer_id
description: Foreign key to the customers table
description: A unique identifier for the customer placing a returned order. It is derived from the 'stg_orders.customer_id' column which is a numeric value.

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

- name: status
description: '{{ doc("orders_status") }}'
description: A status indicator for returned orders, reflecting the current state of a returned order within the system.

- name: amount
description: Total amount (AUD) of the order
description: The monetary value associated with each returned payment.

- name: credit_card_amount
description: Amount of the order (AUD) paid for by credit card
description: A monetary value representing the amount paid using credit card as a payment method for returned orders.

- name: coupon_amount
description: Amount of the order (AUD) paid for by coupon
description: The monetary value deducted from the total order amount as a result of a coupon or discount applied during the payment process, for returned orders.

- name: bank_transfer_amount
description: Amount of the order (AUD) paid for by bank transfer
description: The monetary value associated with each payment made via bank transfer for returned orders.

- name: gift_card_amount
description: Amount of the order (AUD) paid for by gift card
description: The monetary value associated with the payment method of gift card for returned orders.
31 changes: 31 additions & 0 deletions models/staging/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,54 @@ models:
columns:
- name: customer_id

description: A unique identifier for customers.
- name: first_name
description: A unique identifier for a customer's first name.
- name: last_name
description: A string representation of the surname of a customer. It is used
to identify and address customers in a personalized manner.
- name: stg_orders
config:
tags: ["staging", "finance"]
columns:
- name: order_id
description: A unique identifier for each order.
- name: status

description: A status indicator for orders, reflecting the current state of
an order within the system.
- name: customer_id
description: A unique identifier for the customer placing the order.
- name: order_date
description: A timestamp representing the date and time when the order was
placed.
- name: stg_payments
config:
tags: ["staging", "finance"]
columns:
- name: payment_id
description: A unique identifier for each payment made.
- name: payment_method

description: A unique identifier for the method used in the payment.
- name: amount
description: The amount represents the monetary value associated with each
payment.
- name: order_id
description: A unique identifier for each payment order.
- name: stg_signups
config:
tags: ["staging", "PII"]
columns:
- name: signup_id
description: A unique identifier for each signup in the training dataset.
- name: customer_email
description: A unique identifier for the user associated with the signup.
It is used to track user information and signups.
- name: signup_date
description: The date and time when a user signed up for the service.
- name: hashed_password
description: A securely hashed version of the password provided by the user
during the sign-up process.
- name: customer_id
description: A unique identifier for each customer who has signed up.