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.
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) |
- Python 3.9+
- PostgreSQL running on
localhost:5432with user/password/database all set todev datavault4sqlmeshinstalled (pip install datavault4sqlmesh)
pip install datavault4sqlmesh
sqlmesh plan --auto-applyThe plan creates the raw, stage, and dv schemas, loads the seed data, and builds all models in dependency order.