This is a demo dbt project that uses the TPCH dataset to build a Data Vault with datavault4dbt on Snowflake.
The TPCH dataset includes a total of 8 source objects. These are:
- Customer
- Lineitem
- Nation
- Order
- Part
- Partsupp
- Region
- Supplier
This embedded screenshot is based on a publicly available dbdocs Documentation and has been created with the open source tool dbt dbml erd.
Check out explanations of the Data Vault model in the wiki!
- Clone this repository to your local machine.
- Create and activate a new Python Virtual Environment.
- Install dbt for Snowflake with
pip install dbt-snowflake. - If not there already, create a new file called
profiles.ymlwithin your local user account folder, e.g.C:\Users\username\.dbt\profiles.yml - Add a new profile by adding this block of code to your
profiles.yml:To fill out the placeholder, check the official dbt documentation to find the right authentication method to connect to your Snowflake instance.datavault4dbt_snowflake_demo: outputs: dev: <insert_authentication_config_here> target: dev - Execute
dbt debugand ensure that all checks are passed to verify that the connection is established correctly. - Execute
dbt buildand watch the entire Data Vault model coming to life within your own database!
Sidenote: On execution dbt will attempt to create multiple schemas in your target database, as defined in the dbt_project.yml.
If this is not desired you can safely remove the models:-block, found at the end of the dbt_project.yml.

