Creating a Digital Twin with Spark Real-Time Mode and Lakebase
Type
On-Demand Video
Duration
13 mins 53 seconds
Learn how to use Spark Structured Streaming Real-Time Mode, Lakebase, Databricks Apps, and Unity Catalog to detect a fault, hold production, and investigate the event before a batch is compromized.
On a machining line, a single machine component running hot can lead to scrap, lost machine time, and uncertainty for quality and maintenance if the reading arrives too late. The plant needs a trusted view of the asset, its current job, and the event time while the fault is still actionable.
In this demo, presented by Taranpreet Singh Grover, Senior Specialist Solutions Architect, you’ll follow a temperature reading from a machine component through the message bus, Spark Structured Streaming Real-Time Mode, Lakebase, and Unity Catalog managed tables. You’ll see the Databricks app update the digital twin, trigger an inspection, hold and resume production, and query governed history with Genie.
You’ll learn how to:
- Process each sensor reading as it arrives with Spark Structured Streaming Real-Time Mode and detect when a machine component crosses its operating limit
- Keep the latest asset state in Lakebase and stream updates to a Databricks App using Server-Sent Events
- Use device time, explicit units, and duplicate or late-reading checks to support operational and quality decisions
- Use Lakebase change data feed to move committed changes into Unity Catalog managed tables for Lakehouse investigations, BI, predictive maintenance, and Genie queries
- Take action in the Databricks App by holding production, calling for an inspection, and resuming the line after the issue is cleared

