Skip to content
Back to challenges
Grain and KeysConcept Challengeintermediate20 min

Merge two source systems

Build a product dimension that merges catalog and marketplace products without trusting either source natural key as the analytical primary key.

How this preview works
Preview this problem before signing in. Sign in to save progress and submit work.

Concept

surrogate-keys

The primary modeling idea this problem reinforces.

Requirements

3

Business needs the model must satisfy.

Scenario

A retailer is unifying its owned storefront catalog with a marketplace feed. Both systems use product ids and SKUs, but collisions and reused seller SKUs appear when the data lands in the warehouse.

Why this matters

Natural keys feel meaningful until two systems disagree about their meaning. A merged dimension needs a stable warehouse identity while still preserving source identifiers for reconciliation and lineage.

Requirements
  • Create a product dimension with a surrogate primary key.
  • Keep source system and source product identifiers as descriptive attributes.
  • Do not make one source system product id the sole primary key for the merged dimension.
Read-only starter workspace
Inspect the authored starting ERD, then open the workspace to edit and run the checks. Saving your progress needs a free account.

Template

Merged product key starter workspace

The model users start from in the full workspace.

Entities

2

Seeded tables visible in the public preview.

Dialect

postgresql

Generated SQL target for this starter model.

Mini Map

This preview is read-only. Open the workspace to edit and verify; saving needs a free account.

Open workspace

Try the question first.

The discussion has other people's approaches and solutions. Give it a real attempt before you read them.