QuestionQ231

VerifiedProductionizing Data Pipelines

A data engineer sets up a Databricks Lakeflow Job to process customer data daily, structured as follows:

  • Entry task: A single notebook that loads raw data.
  • Parallel tasks (run after the entry task):
    • A SQL query task for data cleansing
    • A notebook task for feature engineering
    • A pipeline task for model updates
  • Exit task: A dashboard refresh task, which must run only after all of the parallel tasks have completed.
  • Requirement: Implement this dependency pattern using a DAG-based task graph.

Which task configuration ensures that all of the parallel tasks finish before the dashboard refresh task executes?

Explanation

Lakeflow Jobs (Databricks Workflows) represent job tasks as a Directed Acyclic Graph, where each task can declare one or more upstream tasks as its dependencies. A downstream task only starts once all of its specified upstream ('depends on') tasks have completed successfully — this fan-in behavior is exactly how multiple parallel branches are joined back together in a DAG. Configuring the dashboard refresh task to depend on the SQL query task, the feature engineering notebook task, and the model update pipeline task guarantees it runs only after all three complete, satisfying the exit-task requirement while still letting the three tasks run in parallel after the entry task. See Databricks documentation on configuring task dependencies and control flow in Lakeflow Jobs.

Learn more

Community Discussion

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