Modeling
Data Vault: hubs, links, satellites
Hubs hold business keys, links hold relationships, satellites hold attributes and their history.
Every table is insert-only, with a load_date and a record_source. Keys are hashes of the business
key (md5(lower(email))), so loads can run in parallel. Analysts query star schemas built on top.
SELECT md5(lower(trim(email))) AS customer_hk,
lower(trim(email)) AS customer_bk,
'shop' AS record_source
FROM customers
ORDER BY customer_id
LIMIT 3;
| customer_hk | customer_bk | record_source |
|---|---|---|
| bd9af961a49d3deb8f784dfd7745e924 | ines.morel@orange.fr | shop |
| 08899450d6cec19d4b1d228ea111175d | elsa.fernandez@proton.me | shop |
| 7b6338cee1782cc246656d3987174f86 | eva.keller@orange.fr | shop |
Practise:Your first Data Vault hub