◮ Modelith reverse Point it at a legacy warehouse. Get a clean model back.
mdl — legacy-warehouse
$ ls models/staging models/marts models/vault
stg_customers.sql dim_customer.sql hub_customer.sql
stg_orders.sql fct_orders.sql link_order.sql sat_customer_details.sql
$ mdl reverse --project target/manifest.json --out owned
reversed 6 entities (4 staging/intermediate excluded)
kept as business entities (4)
dim_customer, dim_product, fct_orders, hub_customer
excluded as staging/intermediate (4)
stg_customers, stg_orders, int_order_enriched, …
SCD2 pattern detected (2)
dim_customer, dim_product
Data Vault detected (3)
hub_customer, link_order, sat_customer_details
surrogate keys stripped (7)
$ mdl validate -m owned
validation passed
$
stg_customers.sql
stg_orders.sql
int_order_enriched.sql
dim_customer.sql
fct_orders.sql
hub_customer.sql
link_order.sql
sat_customer_details.sql
dim_customerSCD2
🔑 customer_idinteger
namestring
tierstring
dim_productSCD2
🔑 product_idinteger
skustring
categorystring
list_pricedecimal
fct_orders
🔑 order_idinteger
customer_id FKinteger
product_id FKinteger
amountdecimal
hub_customerHUB
🔑 customer_idinteger
load_dtsdate
link_orderLINK
order_hashkeystring
load_dtsdate