QuestionQ269

VerifiedProductionizing Data Pipelines

A data engineer is designing a Databricks Job that includes a Notebook task for data cleansing and a SQL Query task for generating a summary report. The summary report task must only execute after the cleansing task has completed successfully.

How should this dependency be configured in the Lakeflow Jobs task graph?

Explanation

In Databricks Lakeflow Jobs, task execution order and conditions are controlled by configuring the 'Depends on' setting for a task, along with the 'Run if dependencies' condition (which defaults to 'All succeeded'). By selecting the cleansing task as the dependency for the summary report task, the job engine will only trigger the summary report task once the cleansing task has finished successfully, ensuring correct execution order and data integrity. Schedule-based delays are not reliable dependency mechanisms since task runtimes can vary, an 'On Failure' trigger would only start the report when the cleansing task fails (the opposite of the requirement), and combining tasks into a single notebook eliminates the benefit of using the Jobs task graph for orchestration, monitoring, and independent retries.

Learn more

Community Discussion

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