Training focused on introducing key Data Vault 2.0 concepts, modeling patterns, and a sample project. Builds on the same webshop sample dataset used in dbt-training, but this book stands on its own and needs nothing beyond Docker to run.
There are 2 options for going through the book, outlined below:
- Directly w/ Github data-vault-2-training
- Opening the book locally
- Install Rust & Cargo
- Install mdbook
cargo install mdbook
- Clone this github repository
git clone git@github.com:Xccelerated/data-vault-2-training.gitcd data-vault-2-training
- Run
mdbook serve --open- the book should then open up in your browser (if not, you may need to pass a different port to the previous command)
Everything runs locally against Docker, no data warehouse account or dbt install required:
- Make sure you have Task and Docker installed
task get/webshop- pulls down the webshop simulator (source system)task build/webshop- builds the simulator imagetask deploy- starts Postgres (the raw source) + the simulator producing records- Connect with
psql(or any SQL client) and follow along with the exercises, writing your Data Vault DDL/DML directly as plain SQL against thewebshopsource task destroywhen you're done
A smoke test exercises every SQL script in sql/ end-to-end against a real, ephemeral Postgres + webshop simulator, and confirms the raw vault loads are idempotent (re-running them doesn't duplicate rows). It requires Docker and runs the same way in CI (see .github/workflows/tests.yml) and locally:
task testtests/lint_sql.py also runs a fast, dependency-free static check (balanced parens/quotes, terminated statements) over every file in sql/ - useful as a quick pre-commit sanity check without spinning up Docker.