rehashing-datavault4dbt-entities

Solid

Recalculates hashkeys and hashdiffs across an existing raw vault with datavault4dbt's rehashing macros after a change to the hash algorithm, datatype, trimming, or case sensitivity — including the v1→v2.0.0 upgrade. Use when changing hash global variables, migrating hash logic, or upgrading datavault4dbt without dropping history.

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

# Rehashing datavault4dbt entities When you change anything that affects hash output — the algorithm (`MD5`→`SHA2`), `hash_datatype`, `hashdiff_use_trim`, or case-sensitivity vars — every hashkey and hashdiff in the Raw Data Vault must change too, or referential integrity breaks. You have two options: 1. **Full refresh** the RDV (only if the full source history is still available to reload), or 2. **Rehash** existing entities in place with the package's rehashing macros (when history is *not* reloadable). This skill is about option 2. > **v1 → v2.0.0 upgrade.** v2.0.0 unifies/corrects hash standardization: with default settings, > hashkeys are now `UPPER`-normalized and hashdiffs are no longer `UPPER`-normalized, plus > adapter-specific changes (Oracle/Redshift concat-string alignment, BigQuery MD5 fix, Fabric/Exasol > standardization). Hash values differ from v1, so crossing this boundary on an existing vault requires > a full refresh or a rehash. ## The safe workflow (always) 1. **Start small** — rehash one test entity first and verify the configuration and logic. 2. **Overwrite, don't drop** — set `overwrite_hash_values: true` and keep `drop_old_values: false`. The macros rename the old columns with a `_deprecated` suffix instead of deleting them. 3. **Validate** — compare the new hash columns against the `_deprecated` columns. 4. **Clean up** — only after validation, drop the deprecated columns. The dbt log prints the dict of columns to drop; use it to buil...

Details

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

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category