Building a Production: Scale Dimensional Data Mart With Lakeflow Spark Declarative Pipelines and AUTO CDC
Overview
| Experience | In Person |
|---|---|
| Track | Data Engineering & Streaming |
| Industry | Retail & Consumer Goods |
| Technologies | Databricks SQL, Lakeflow, Unity Catalog |
| Skill Level | Intermediate |
| DOWNLOAD SESSION SLIDES | |
At 84.51˚, we replaced legacy ETL processing in our retail sales data mart with Lakeflow Spark Declarative Pipelines to simplify development while improving reliability at scale. In this session, we’ll walk through how a low-code, declarative approach enables dimensional modeling for both slowly changing dimensions and high-volume fact data.
You’ll see how to use AUTO CDC to handle data updates across batch and streaming pipelines, supporting continuously arriving sales transactions alongside rapidly changing product, store and customer attributes. Our ETL crunches approximately 8 million sales transactions and over 80 million purchased items per day in support of our 84.51˚ Stratum platform.
Attendees will leave with practical guidance for designing and operating dimensional data marts using Spark Declarative Pipelines, including patterns for CDC, schema evolution, and hybrid batch/streaming workloads that can be applied immediately in production environments.
Session Speakers
Scott Gordon
/Lead Data Engineer
84.51˚
Shu Li
/Sr. Specialist Solutions Architect
Databricks
Full Summary
AutoCDC: The Easy Button for Change Data Capture in Streaming and Batch Pipelines
Change data capture is notoriously brittle to implement by hand. AutoCDC, delivered through Lakeflow Declarative Pipelines on the Databricks Platform, replaces hundreds of lines of MERGE logic with a small, declarative configuration. Teams building modern data engineering workflows on the Databricks Platform can use it to unify streaming and batch CDC patterns, reduce operational risk, and improve performance. Engineers looking for a broader view of how these capabilities fit together will find the Databricks Platform product overview a useful starting point for understanding how AutoCDC sits within the unified data and AI ecosystem.
FAQ
Use AutoCDC when you need conditional inserts, updates, deletes, deduplication, and SCD behavior without hand-coding edge cases. The speakers emphasize that AutoCDC's optimized engine outperforms typical MERGE implementations while reducing code and operational risk. Custom MERGE may still be required for highly specialized logic.
Yes. If a change feed exists, AutoCDC can consume it in streaming mode. If not, AutoCDC from snapshot compares the full source snapshot to the target to infer inserts, updates, and deletes, which suits sources that only expose full extracts.
Streaming uses create_auto_cdc_flow with spark.readStream, and delete detection relies on an operation tag. Snapshot mode uses create_auto_cdc_from_snapshot_flow with spark.read, inferring deletes by comparing snapshots. Sequencing and SCD Type 2 timestamps also differ subtly, as documented by the product.
You can declare specific columns where null updates are ignored, or rely on a status column that indicates which source is authoritative for which fields. Both patterns help avoid accidental nulls from partial or heterogeneous upstream feeds.
Yes, it works for facts. SCD Type 1 can be used as a straightforward upsert pattern on fact tables, as shown in the sales example, while SCD Type 2 is appropriate for dimensions that require full historical tracking.