Concept 01
Hub Anatomy & Required Columns
🧠 ELI5 — Explain Like I'm Five
A Hub is the simplest table in Data Vault — but that simplicity is intentional. It stores ONLY the unique business identifiers for one type of real-world entity. Nothing else. The discipline of keeping hubs lean is what makes the whole architecture work.
The Four Required Columns
Every Hub in every Data Vault implementation has exactly four mandatory columns. No exceptions. No extras in the Hub itself — everything descriptive goes to a Satellite.
| Column | Type | Rule |
|---|---|---|
HUB_{ENTITY}_HK |
CHAR(32) |
Primary key. MD5 hash of normalized BK. Never null. |
{ENTITY}_BK |
VARCHAR |
The actual business key. Indexed. Never null. |
LOAD_DATE |
TIMESTAMP |
When first seen by the vault. Never updated. |
RECORD_SOURCE |
VARCHAR(100) |
Which system first saw this entity. Enables lineage. |
Naming Conventions
- Hub tables:
HUB_{ENTITY}— e.g.,HUB_CUSTOMER,HUB_PRODUCT,HUB_ORDER - Hash key column:
HUB_{ENTITY}_HK - Business key column:
{ENTITY}_BK - Load date column:
LOAD_DATEorLDTS(pick one, use consistently) - Record source column:
RECORD_SOURCEorRSRC(pick one, use consistently)
-- HUB_PRODUCT: stores unique product business keys only -- Nothing descriptive here — name, price, category go in Satellites CREATE TABLE HUB_PRODUCT ( HUB_PRODUCT_HK CHAR(32) NOT NULL, -- MD5 of UPPER(TRIM(PRODUCT_BK)) PRODUCT_BK VARCHAR(50) NOT NULL, -- e.g. ProductSKU or GTIN barcode LOAD_DATE TIMESTAMP NOT NULL, -- when first seen; never updated RECORD_SOURCE VARCHAR(100) NOT NULL, -- e.g. 'ERP.ProductMaster' CONSTRAINT pk_hub_product PRIMARY KEY (HUB_PRODUCT_HK) ); -- Recommended: index on BK for lookup performance CREATE UNIQUE INDEX uix_hub_product_bk ON HUB_PRODUCT (PRODUCT_BK);
What goes IN a Hub vs what does NOT:
✓ Goes in Hub: Hash Key • Business Key • Load Date • Record Source
✗ Does NOT go in Hub: Product Name • Price • Category • Status • Description — all of these go in Satellites.