- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi @ankit2604
Your statement is touching on a fundamental design principle of Data Vault 2.0: a hash key enforces uniqueness, but when business keys collide across independent systems, you need a business key collision code to avoid catastrophic collisions
To truly understand the situation and know when you actually "need" a BKCC, let's explore the difference between a true duplicate and a namespace collision.
1. The Confusion: "Do we want duplicates in a Hub?"
In a true Data Vault 2.0 design, you should never want to have duplicate records of the same entity in a Hub.
Say John Doe registers on your CRM system twice, creating two rows of data with the same ID CUST-100. You want these two rows to collapse into a single hash key, so John Doe only exists once in your Customer Hub. This is a situation where you would NOT use a BKCC.
2. When You Need BKCC (Namespace Collisions)
You need a BKCC not when you want duplicates of the same entity, but when entities from different systems happen to have the exact same ID string
For example, let's say you have:
Regional Invoices
Region North Database: Issues an invoice numbered INV-2026-001 for a software purchase.
Region South Database: Also independently issues an invoice numbered INV-2026-001 for a hardware purchase.
If you naively hash the raw business_key (INV-2026-001), both records produce the exact same hash key
When loaded into a single Hub_Invoice, the data warehouse will see the second record as a duplicate and either reject it or overwrite it, corrupting Region North's invoice data with Region South's invoice data.
3. How BKCC Solves This
To allow both invoices to co-exist as valid, separate entities in your Hub without any collisions, you prepend a Business Key Collision Code (the source system or region in this example) to the hash formula:
HashKey=SHA256(BKCC∥Delimiter∥BusinessKey)
North Invoice:
SHA256("NORTH"∥"#"∥"INV-2026-001")
→ Hash: 0xABC123...
South Invoice:
SHA256("SOUTH"∥"#"∥"INV-2026-001")
→ Hash: 0xXYZ789...
Since the hash keys are now entirely different, both records can peacefully exist as separate rows in your Hub, preserving the integrity of your enterprise warehouse.