Data Engineering Reference/ELT & Lakehouse Pipelines

Medallion & Incremental Processing

Bronze/silver/gold implementation patterns, incremental vs full refresh, merge semantics, and CDC-driven silver updates.

4/5Overview: 30m

ELT vs ETL

ETL (legacy)ELT (modern)
Transform before loadLoad raw first
Limited by staging capacityTransform in warehouse/lake compute
Brittle schema upfrontSchema-on-read in bronze

Medallion implementation

Bronze:

  • Append-only ingest (Kafka → Delta, S3 copy, CDC stream)
  • Preserve source schema + ingest metadata (_ingest_ts, _source_file)

Silver:

  • Dedup (window on event ID or MERGE)
  • Type coercion, null handling
  • Conformed entities (customer, product)

Gold:

  • Business metrics, star-schema marts
  • Often owned by dbt models

Incremental strategies

StrategyWhen
AppendImmutable events (logs)
Merge/upsertCDC, dimension updates
Overwrite partitionDaily snapshot per dt
Full refreshSmall tables, dev, disaster recovery

Delta MERGE INTO ... WHEN MATCHED ... WHEN NOT MATCHED is the workhorse for silver CDC.

Slowly changing dimensions (SCD)

TypeBehavior
SCD1Overwrite (no history)
SCD2Version rows with valid_from/valid_to
SCD3Previous value column only

Implement SCD2 with merge logic or dbt snapshots. Dimensional modeling theory (star schema, grain, surrogate keys) is covered in Dimensional & Analytical Modeling — this subtopic focuses on pipeline implementation.

AI boundary

Feature store ingestion may read from gold — but embedding pipelines and vector indexes are AI Systems, not repeated here.

Interview answer template

"Bronze append from Debezium CDC. Silver merge on customer_id with SCD2 flags. Gold daily revenue is dbt incremental on order_date partition. Late events merge into silver; gold re-runs for affected dates only."

Further Reading

Hands-On Tasks (Optional)

Pipeline design drills and whiteboard exercises — DAG sketches, partition plans, backfill strategies. Assumes Databases and SQL fundamentals are in place.

  • Design an incremental silver table

    Source: daily Postgres snapshot + hourly CDC events. Specify bronze layout, merge key, how to handle deletes, and late CDC events.

    20m