Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

data-vault-2-training

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.

How to open this book

There are 2 options for going through the book, outlined below:

  1. Directly w/ Github data-vault-2-training
  2. Opening the book locally
    1. Install Rust & Cargo
    2. Install mdbook
      • cargo install mdbook
    3. Clone this github repository
      • git clone git@github.com:Xccelerated/data-vault-2-training.git
      • cd data-vault-2-training
    4. 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)

Running the exercises

Everything runs locally against Docker, no data warehouse account or dbt install required:

  1. Make sure you have Task and Docker installed
  2. task get/webshop - pulls down the webshop simulator (source system)
  3. task build/webshop - builds the simulator image
  4. task deploy - starts Postgres (the raw source) + the simulator producing records
  5. Connect with psql (or any SQL client) and follow along with the exercises, writing your Data Vault DDL/DML directly as plain SQL against the webshop source
  6. task destroy when you're done

Running the tests

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 test

tests/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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages