Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 1.35 KB

File metadata and controls

37 lines (26 loc) · 1.35 KB

datavault4sqlmesh-demo

A minimal SQLMesh project that demonstrates the datavault4sqlmesh model factories end-to-end.

It is also used as the integration-test target for every pull request on datavault4sqlmesh: a GitHub Action installs the PR package, runs this project against a Postgres container, and verifies the full pipeline compiles and loads data correctly.

What's in here

Two source entities (customers, orders) flow through a complete Data Vault 2.0 pipeline:

seeds (raw)  →  staging  →  hubs / links / satellites (dv)
Layer Models
raw customers, orders (SEED)
stage stg_customer, stg_orders
dv customer_h, order_h, order_customer_l
customer_0_s, order_0_s (sat v0 — incremental)
customer_1_s, order_1_s (sat v1 — full history)
customer_2_s, order_2_s (sat v2 — current-row view)

Requirements

  • Python 3.9+
  • PostgreSQL running on localhost:5432 with user/password/database all set to dev
  • datavault4sqlmesh installed (pip install datavault4sqlmesh)

Running locally

pip install datavault4sqlmesh
sqlmesh plan --auto-apply

The plan creates the raw, stage, and dv schemas, loads the seed data, and builds all models in dependency order.