Skip to main content

Data Modeling

In this part, we utilized a subset of TPCH to illustrate a retail scenario. The dataset comprises records of customer purchases, order details, and customer information. Below is a simplified diagram depicting this case. tpch-schema

Prepare TPCH tables

  • Orders
CREATE TABLE orders (
orderkey integer,
custkey integer,
orderstatus string,
totalprice double,
orderdate date);
  • Customer
CREATE TABLE Customer (
custkey integer,
name string)
  • Lineitem
CREATE TABLE Customer (
custkey integer,
name string)