Concept 01
Junior / Mid-Level Interview Questions
🧠 ELI5 — Explain Like I’m Five
Junior and mid-level DV interviews test whether you understand the fundamentals: what are the three vault objects, what goes in each, what is a business key, what does insert-only mean, and can you explain HashDiff. These questions are direct — focus on clear, concise answers.
Both store enterprise data for analytics, but they take different approaches. Kimball optimizes for query performance: you design facts and dimensions for the reports you expect. DV optimizes for integration and auditability: you store everything in a normalized, source-faithful form first (Raw Vault), then build reporting structures on top (Information Marts).
Key differences: DV is insert-only (Kimball uses SCD2 updates), DV tracks full history automatically for free (Kimball requires SCD design), DV can add new sources without redesign (Kimball often requires schema changes), and DV separates integration from reporting (Kimball mixes them).
For someone who knows Kimball: think of the Raw Vault as an SCD2 store for every entity and relationship simultaneously, with automatic lineage.
Hub, Link, Satellite.
Hub: stores unique business keys — the identifiers the business uses for real-world entities (CustomerID, ProductSKU). One row per unique entity, insert-only, no descriptive data.
Link: stores relationships between hubs — the fact that two or more entities are related (Customer placed Order). One row per unique combination of Hub keys, insert-only, no descriptive data.
Satellite: stores descriptive attributes — the context that describes an entity or relationship (customer name, email, address). Many rows per hub/link key, each row capturing a point-in-time snapshot with load timestamp.
Business key (BK): the natural identifier the business uses to refer to an entity in real-world processes — printed on invoices, typed by users, used in conversations. It’s meaningful (CustomerID ‘1234’ means something to the business) and relatively stable.
Hash key (HK): a surrogate derived by hashing the normalized BK (UPPER/TRIM applied). It’s deterministic (same BK always produces same HK), fixed-length (32 chars for MD5), and used as the primary key of Hubs and as foreign keys everywhere else.
The HK allows hash key computation in parallel across multiple servers without coordination, enabling the vault’s parallel loading architecture.
HashDiff is a hash (MD5 or SHA-256) computed over all the payload (descriptive) columns in a satellite row. When loading a satellite, you compare the incoming HashDiff to the current satellite row’s HashDiff.
If they match, the data hasn’t changed — skip the insert. If they differ, something changed — insert a new row.
Without HashDiff, you’d need to compare every individual column between incoming and existing data, which is complex and slow for satellites with many columns. With HashDiff, change detection is always a single value comparison regardless of column count.
Insert-only is fundamental to auditability and parallel loading. Auditability: if you update or delete rows, you lose the history of what was true before. Insert-only means every change is permanently recorded with its timestamp. Parallel loading: INSERT operations don’t cause row-level locks the way UPDATE/MERGE does; multiple sessions can INSERT to the same table simultaneously.
When source data is deleted:
Option 1: Insert a new satellite row with a deletion flag (IS_DELETED='Y' in a Status Satellite) and a new LOAD_DATE.
Option 2: Use an Effectivity Satellite on a Link with IS_ACTIVE='N' when the relationship ends.
Option 3: Simply stop loading that entity’s satellite rows — future PIT table queries will show the entity as having no current record after a certain date.
LOAD_DATE (or LDTS) is the warehouse arrival time — when the data landed in our staging/vault system. It’s set once in staging (usually CURRENT_TIMESTAMP at batch start) and never changed.
An event timestamp (business date, effective date, transaction date) is when the business event actually occurred in the real world. They can differ significantly: a payment might have occurred on Jan 1 (event date) but the source extract ran on Jan 5 (LOAD_DATE).
LOAD_DATE goes in the vault’s mandatory metadata columns. Event timestamps go in satellite payload columns as regular data.
Splitting satellites means dividing one entity’s attributes across multiple satellite tables rather than one giant table. Split by:
Source: CRM attributes in SAT_CUSTOMER_FROM_CRM, ERP attributes in SAT_CUSTOMER_FROM_ERP.
Rate-of-change: daily stock prices separate from rarely-changing product descriptions.
Classification: demographic data separate from financial data.
Why it matters: if all attributes are in one satellite, every change to ANY attribute creates a new row copying ALL attributes — massive duplication. With split satellites, a CRM address change only creates a new row in the CRM satellite; ERP data is unaffected.
Entities and relationships: Customer places Order; Order contains Product; Product belongs to Category.
Hub tables: HUB_CUSTOMER (CUSTOMER_BK), HUB_ORDER (ORDER_BK), HUB_PRODUCT (PRODUCT_SKU), HUB_CATEGORY (CATEGORY_CODE).
Link tables: LINK_CUSTOMER_ORDER (HUB_CUSTOMER_HK + HUB_ORDER_HK), LINK_ORDER_PRODUCT (HUB_ORDER_HK + HUB_PRODUCT_HK + quantity as DD), LINK_PRODUCT_CATEGORY (HUB_PRODUCT_HK + HUB_CATEGORY_HK).
Satellite tables: SAT_CUSTOMER_DEMOGRAPHICS (name, email, DOB), SAT_CUSTOMER_ADDRESS (address columns — separate because change rate differs), SAT_ORDER_DETAILS (status, total_amount, order_date), SAT_PRODUCT_DESCRIPTION (name, description), SAT_PRODUCT_PRICING (price — changes frequently, separate satellite), SAT_CATEGORY_DETAILS (category name, hierarchy).
Business Vault: PIT_CUSTOMER (pre-joins customer satellite timelines), BRIDGE_CUSTOMER_ORDER_PRODUCT (pre-flattens the traversal chain).