QuestionQ204

VerifiedData Transformation, Cleansing, and Quality

A company operates a task-management system that records the latest status of tasks. The system receives task events and processes them in near real time with Lakeflow Spark Declarative Pipelines. A new task event enters the system when a task is created or its status changes. Lakeflow Spark Declarative Pipelines exposes a streaming table, tasks_status, for BI users to query. The table represents the most recent status of every task and contains five columns: task_id (unique for each task), task_name, task_owner, task_status, and task_event_time. The table has these three properties enabled: deletion vectors, row tracking, and change data feed.

A data engineer must create a new Lakeflow Spark Declarative Pipelines pipeline to enrich the task_status table in near real time by adding one column for the task owner’s department, which can be looked up from a static dimension table named employee.

How should this enrichment be implemented?

Explanation

A current-state Delta table receives updates to existing rows when a task status changes, so it is not an append-only streaming source. Reading its change data feed captures inserts, updates, and deletes at row level. After joining those change records to the static employee dimension, an apply_changes() Auto CDC flow can upsert them into a streaming target using the task key and event-time sequencing, preserving the latest enriched status. skipChangeCommits would ignore modifications and therefore miss status changes.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!