TICKIT-07: Bronze Ingestion and Schema Evolution
Track: TICKIT Marketplace • Difficulty: Beginner • Mastery Points: 100 PTS
Business Problem Scenario
In the Medallion lakehouse pattern, bronze layer tables capture raw event streams without destructive transformations, while preserving audit provenance metadata (_ingest_ts, _source_file, _batch_id). In Databricks Delta Lake, schema evolution handles upstream application additions dynamically via write options (e.g. mergeSchema or WITH SCHEMA EVOLUTION). You must author the DDL creating bronze.users.
Engineering Objective
Write the CREATE TABLE IF NOT EXISTS bronze.users DDL statement in Delta Lake. • Schema Columns: userid INT, username STRING, firstname STRING, lastname STRING, city STRING, state STRING, email STRING, phone STRING, _ingest_ts TIMESTAMP, _source_file STRING, _batch_id STRING. • Storage Engine: USING DELTA. • Operational Note: In Databricks Delta Lake, schema evolution is typically enabled on write operations using options like mergeSchema = 'true' or in streaming ingestion using WITH SCHEMA EVOLUTION. Key Concepts: - Schema Evolution: Dynamically appending newly detected columns into Delta Lake tables without throwing write exceptions.
Target Table: bronze.users (userid INT, username STRING, firstname STRING, lastname STRING, city STRING, state STRING, email STRING, phone STRING, _ingest_ts TIMESTAMP, _source_file STRING, _batch_id STRING)
Verification & Architecture Insights
Retaining raw strings alongside ingestion audit trails ensures historical data can always be reprocessed when downstream parsing rules change.