Databricks Data Engineer Associate Question 430
Select 2You are designing a Databricks Job with three tasks: Task A, Task B, and Task C. Task B should only start after Task A has successfully completed, and Task C should only start after both Task A and Task B have completed. How can you configure this task dependency in Databricks Jobs?
- A
Set Task A as a predecessor for Task B and Task C
- B
Set Task B as a predecessor for Task C
- C
Configure Task B to depend on Task A
- D
Configure Task C to depend on both Task A and Task B
- E
Create separate jobs for Task A, Task B, and Task C and manually manage their execution order
Show answer and explanation
Correct answers: C, D
Explanation
In Databricks Jobs, task dependencies can be configured directly using the 'Depends on' property for each task. To meet the requirements, Task B must depend on Task A, and Task C must depend on both Task A and Task B. This ensures proper execution order without requiring manual intervention.
- A. Incorrect.
Incorrect: Task A should only be set as a predecessor for Task B. Task C must depend on both Task A and Task B, so additional configuration is required.
- B. Incorrect.
Incorrect: Task B is not a predecessor for Task C. Instead, Task C should depend on both Task A and Task B.
- C. Correct.
Correct: This ensures Task B starts only after Task A has successfully completed, which satisfies the dependency requirement.
- D. Correct.
Correct: By configuring Task C to depend on both Task A and Task B, it ensures Task C will only start after both tasks are completed.
- E. Incorrect.
Incorrect: This approach does not utilize Databricks Jobs' built-in task dependency feature, which automates the execution order.