The data models

Teradata Developer Guides

ft:locale
en-US
ft:lastEdition
2026-08-18

The source data consists of the following tables customers, orders, products, and order_products, according to the following Entity Relations Diagram:

customers customers id   [int] name   [varchar] surname   [varchar] email   [varchar] orders orders id   [int] customer_id   [int] order_date   [varchar] status   [varchar] customers--orders 0..N 1 order_products order_products order_id    [int] product_id   [int] quantity   [int] orders--order_products 0..N 1 products products id   [int] name   [varchar] category   [varchar] unit_price   [varchar] products--order_products 0..N 1

Using dbt, we leverage the source data tables to construct the following dimensional model, which is optimized for analytics tools.

dim_customers dim_customers customer_id   [int] first_name   [varchar] last_name   [varchar] email   [varchar] fct_order_details fct_order_details order_id   [int] product_id   [int] customer_id   [int] order_date   [varchar] unit_price   [varchar] quantity   [int] amount   [varchar] dim_customers--fct_order_details 0..N 1 dim_orders dim_orders order_id   [int] order_date   [varchar] order_status   [varchar] dim_orders--fct_order_details 0..N 1 dim_products dim_products product_id   [int] product_name   [varchar] product_category   [varchar] price_dollars   [varchar] dim_products--fct_order_details 0..N 1