using-datavault4dbt

Solid

Builds Data Vault 2 models in dbt with the datavault4dbt package — staging, hubs, links, satellites, and business-vault entities — using the YAML-metadata macro pattern with correct hashkeys, hashdiffs, naming, and materializations. Use when creating or editing datavault4dbt models, setting up a raw vault, choosing which Data Vault entity to use, or configuring the package's hashing and global variables.

Data & Documents 22 stars 0 forks Updated 2 weeks ago Apache-2.0

Install

View on GitHub

Quality Score: 85/100

Stars 20%
45
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Using datavault4dbt [datavault4dbt](https://github.com/ScalefreeCOM/datavault4dbt) is a dbt package that generates Data Vault 2.0 SQL from compact YAML metadata. You write a `{%- set yaml_metadata -%}` block and call a macro; the package generates the insert-only loading logic, hashing, and high-water-mark optimization. **Core principle:** every model is *staging-driven*. The `stage` macro computes the hashkeys and hashdiffs once; hubs, links, and satellites then just reference those pre-computed columns. Get staging right and the raw vault falls into place. ## When to use - Building or editing datavault4dbt models: staging, hubs, links, satellites, PITs, snapshot control. - Setting up a raw vault from flat source tables. - Deciding which Data Vault entity type fits a source (hub vs link vs which satellite). - Configuring the package: `packages.yml`, global variables, hashing, per-adapter setup. **Do NOT use for** general dbt modeling unrelated to Data Vault, or semantic-layer/metrics work. ## The non-negotiable workflow 1. **Verify, don't guess.** Macro parameter names and defaults must come from the installed package (`dbt_packages/datavault4dbt/docs` and `.../macros`), not memory. When unsure, read the macro. 2. **One stage per source table.** Staging is for hashing and light shaping (derived columns, prejoins, missing columns) — never for harmonizing or business logic. 3. **Build in layers, bottom-up:** sources → staging (view) → raw vault hubs/links/satell...

Details

Author
ScalefreeCOM
Repository
ScalefreeCOM/datavault4dbt-agent-skills
Created
2 months ago
Last Updated
2 weeks ago
Language
Python
License
Apache-2.0

Similar Skills

Semantically similar based on skill content — not just same category