HubLinkSat

Data Vault 2.0 code generator · SQL Server · Spark SQL

From source table to hubs, links and satellites

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.

Source table

1 / 3

T-SQL, Spark SQL or plain name type lines. One table at a time.

Model

2 / 3
ColumnTypeRoleHub

Business key → hub. Link → a second hub plus the link between them (the column must hold that hub's business key). Attribute → satellite.

Target

3 / 3
Platform

Written to RECORD_SRC. Defaults to the source object.

Generated model


        

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.

Hashdiff

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.

Before production

  • The staging view stamps LOAD_DTS at query time. Materialise it as a table per batch so hubs, links and satellites share one load timestamp.
  • SQL Server hashes NVARCHAR as UTF-16, Spark hashes UTF-8: hash keys only match within one platform.
  • If a batch holds several versions of the same key, only one is loaded. Load them in order, one batch per version.

Who builds this

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.

Get in touch

Data Vault design, Spark tuning, SQL Server to lakehouse migrations.

Contact me on LinkedIn