ivanshamaev/de-agent-skills/data-vault-2
Claude Code and agent skill by ivanshamaev/de-agent-skills
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Use when designing or implementing Data Vault 2.0 data models — Hubs, Links, Satellites, Reference Tables, Same-As Links, Multi-Active Satellites, Effectivity Satellites, Point-in-Time tables, Bridge tables, Business Vault patterns, hash key generation, DDL for all entity types, insert-only DML load patterns, pipeline architecture, and constructing Information Marts from the vault.
Install
npx vskill@latest install ivanshamaev/de-agent-skills/data-vault-2Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as ivanshamaev/de-agent-skills/data-vault-2.
Data Vault 2.0 Data Modeling
When to Use
Use this skill when:
- Designing a Raw Vault schema: Hubs, Links, Satellites for a new source system
- Implementing hash key generation and hash diff columns
- Writing insert-only DML load patterns for any vault entity
- Designing performance constructs: PIT tables and Bridge tables
- Implementing Business Vault: computed satellites, derived links, exploration links
- Constructing Information Mart views/tables from the vault
- Building DV 2.0 pipelines in Spark, dbt, Airflow, or pure SQL
- Choosing between Satellite variants: standard, multi-active, effectivity, status-tracking
Architecture Overview
Data Vault 2.0 separates concerns into three layers:
Core DV 2.0 rules that never change:
- Every table has
ldts(load date timestamp) andrsrc(record source) - All raw vault loads are insert-only — never UPDATE or DELETE
- All business keys are hashed before joining or storing
- Business rules live in Business Vault, not Raw Vault
- Every Hub, Link, Satellite is loaded independently — no cross-entity transactions
Mandatory Columns on Every Table
| Column | Type | Description | |
|---|---|---|---|
<entity>_hk | char(32) / binary(16) | Hash key — MD5 of business key(s) | |
ldts | timestamp | Load date timestamp — when this row entered the vault | |
rsrc | varchar(255) | Record source — identifies the feeding system/file | |
hash_diff | char(32) | Satellite-only: MD5 hash of all descriptive attributes for change detection |
Hash Key Generation
Hash keys are deterministic MD5 (or SHA-256) hashes of business keys. They must be computed in staging before loading any vault table.
Rules for hash key computation
- Upper-case all string business keys before hashing
- Trim leading/trailing whitespace
- Use a consistent delimiter between compound key components:
||(double pipe) is standard - Handle NULLs by replacing with a sentinel value:
'^^'(caret-caret) for null components - Hash the concatenation, not individual keys
- Use the same algorithm everywhere in the project (MD5 is most common; SHA-256 for higher security)
Hash diff for satellites
Hash diff detects whether any descriptive attribute changed — avoids loading duplicate unchanged rows.
Order matters: always concatenate attributes in alphabetical column order so the hash is consistent regardless of SELECT column order changes.
Staging Layer
Staging transforms source data: computes all hash keys and hash diffs before any vault load.
If a single source load contains multiple entities (e.g. orders with embedded customer and product), create one staging view per source object — each staging view extracts the relevant fields and computes the appropriate hash keys.
Hubs
A Hub stores the master list of business keys for a business concept. Nothing else.
Rules
- One row per unique business key — never two rows for the same key
- No descriptive attributes (those go in Satellites)
- Insert-only: once a business key is in the Hub, it stays forever
- Multiple source systems feeding the same Hub use the same hash key (MD5 of the normalized business key)
DDL
DML — Insert-only Hub load
Multi-source Hub load: when two systems both supply customers, load both into the same hub. The first system to load a key "wins" the ldts and rsrc. Subsequent loads of the same key are silently skipped.
Links
A Link records a relationship between two or more Hub entities. It captures the many-to-many association at a point in time.
Rules
- Contains only hash keys (its own + constituent Hub HKs) — no descriptive attributes
- Insert-only: relationships are never deleted from the Link (use Effectivity Satellite to close them)
- One row per unique combination of constituent Hub HKs
- A Link's own hash key is the MD5 of all constituent Hub HKs concatenated
DDL
Link hash key generation (in staging)
DML — Insert-only Link load
Non-Historized Link (Transactional Link)
For high-volume transactional data (payments, clicks, log events) where deduplication is by a natural transaction ID and there is no meaningful "relationship history" — use a Non-Historized Link (NHL). Each transaction is its own row; the natural transaction key is part of the hash.
Satellites
A Satellite stores descriptive attributes and their full history. Every change in a source attribute creates a new row; old rows are never updated.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/data_vault_2/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ivanshamaev/de-agent-skills/data-vault-2)