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 placed in the system, used to track and manage individual orders throughout the order lifecycle.

- name: customer_id
description: Foreign key to the customers table
description: A unique identifier for a customer in the orders table.

- 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: This indicates whether the order has been processed, shipped, delivered, or returned.

- name: amount
description: Total amount (AUD) of the order
description: A numeric representation of the monetary amount associated with each payment transaction.

- name: credit_card_amount
description: Amount of the order (AUD) paid for by credit card
description: A numeric representation of the monetary amount associated with each order payment.

- name: coupon_amount
description: Amount of the order (AUD) paid for by coupon
description: A monetary value representing the discount or promotional credit applied to an order, derived from the payment transaction amount.

- name: bank_transfer_amount
description: Amount of the order (AUD) paid for by bank transfer
description: This entity represents the monetary amount associated with bank transfer payments.

- name: gift_card_amount
description: Amount of the order (AUD) paid for by gift card
description: A numeric representation of the monetary amount associated with each gift card payment transaction.

- 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 placed in the system, used to track and manage individual returned orders throughout the order lifecycle.

- name: customer_id
description: Foreign key to the customers table
description: A unique identifier for a customer in the returned orders table, which corresponds to the customer ID in the orders table.

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

- name: status
description: '{{ doc("orders_status") }}'
description: A status indicator for returned orders, reflecting whether the order has been processed, shipped, delivered, or returned.

- name: amount
description: Total amount (AUD) of the order
description: A numeric representation of the monetary amount associated with each returned payment transaction.

- name: credit_card_amount
description: Amount of the order (AUD) paid for by credit card
description: A numeric representation of the monetary amount associated with each returned order payment.

- name: coupon_amount
description: Amount of the order (AUD) paid for by coupon
description: A monetary value representing the discount or promotional credit applied to a returned order, derived from the payment transaction amount.

- name: bank_transfer_amount
description: Amount of the order (AUD) paid for by bank transfer
description: This entity represents the monetary amount associated with bank transfer payments for returned orders.

- name: gift_card_amount
description: Amount of the order (AUD) paid for by gift card
description: A numeric representation of the monetary amount associated with each gift card payment transaction for returned orders.
35 changes: 35 additions & 0 deletions models/staging/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,58 @@ models:
columns:
- name: customer_id

description: A unique identifier for customers in the training dataset. It
serves as a primary key for linking customer data across different tables
and datasets.
- name: first_name
description: A unique identifier for a customer.
- name: last_name
description: A string that contains the last name of a customer.
- name: stg_orders
config:
tags: ["staging", "finance"]
columns:
- name: order_id
description: A unique identifier for each order placed in the system. This
ID is used to track and manage individual orders throughout the order lifecycle.
- name: status

description: The status of an order, indicating whether it has been processed,
shipped, delivered, or returned.
- name: customer_id
description: A unique identifier for a customer in the orders table.
- name: order_date
description: 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 made.
- name: payment_method

description: A unique identifier for the payment method used in a transaction.
- name: amount
description: A numeric representation of the monetary amount associated with
each payment transaction.
- name: order_id
description: A unique identifier for each payment made. This identifier is
used to track and manage payment transactions.
- name: stg_signups
config:
tags: ["staging", "PII"]
columns:
- name: signup_id
description: A unique identifier for each signup.
- name: customer_email
description: A unique identifier for a customer that has signed up for a service
or product.
- name: signup_date
description: A timestamp representing the date and time when a user signed
up.
- name: hashed_password
description: A hashed representation of the password used for user authentication
during the signup process.
- name: customer_id
description: A unique identifier for customers who have signed up for the
service.