Hash keys
Business keys are cast to text, trimmed, upper-cased, NULL becomes an empty string, and composite keys are joined with the delimiter before hashing. Hashes are stored as upper-case hex, so SQL Server and Spark produce the same format.
Data Vault 2.0 code generator · SQL Server · Spark SQL
Paste the CREATE TABLE of a source table, mark the business key and the foreign keys, and get the staging view, hub, link and satellite tables and the load statements. Everything runs in your browser: your DDL never leaves this page.
T-SQL, Spark SQL or plain name type lines. One table at a time.
| Column | Type | Role | Hub |
|---|
Business key → hub. Link → a second hub plus the link between them (the column must hold that hub's business key). Attribute → satellite.
Written to RECORD_SRC. Defaults to the source object.
Business keys are cast to text, trimmed, upper-cased, NULL becomes an empty string, and composite keys are joined with the delimiter before hashing. Hashes are stored as upper-case hex, so SQL Server and Spark produce the same format.
The satellite hashdiff covers all attribute columns, trimmed but case-sensitive. A new satellite row is inserted only when it differs from the latest row for that key, so reloading the same data inserts nothing.
LOAD_DTS at query time. Materialise it as a table per batch so hubs, links and satellites share one load timestamp.NVARCHAR as UTF-16, Spark hashes UTF-8: hash keys only match within one platform.I'm Francesco, a freelance data engineer based in Italy. I work on Data Vault warehouses on SQL Server, PySpark pipelines and data migrations, and I built this tool for a part of that work I kept redoing by hand.
It is free and stays free. If your team is starting a Data Vault, migrating to Spark, or fighting a slow job, I can help.
Also by me: Executor Math, a Spark configuration calculator that shows the math behind every number.
Data Vault design, Spark tuning, SQL Server to lakehouse migrations.
Contact me on LinkedIn