Databricks Data Engineer Associate Question 431
Single answerYou are configuring a Databricks Job with two tasks: Task A and Task B. Task B must only run after Task A successfully completes. How can you configure Task B as a successor to Task A in the Databricks Jobs UI?
- A
Set Task B's schedule to 'Depends on Task A' in the Jobs UI.
- B
Use the 'Add Dependency' option in Task B's configuration and select Task A as its predecessor.
- C
Set Task B's retry policy to 'On Completion of Task A'.
- D
Manually trigger Task B after Task A completes using the Databricks CLI.
Show answer and explanation
Correct answer: B
Explanation
In Databricks Jobs, task dependencies can be set up directly in the Jobs UI using the 'Add Dependency' feature. This allows you to specify predecessor tasks, ensuring that one task runs only after another task completes successfully. This is the recommended way to configure such dependencies in Databricks.
- A. Incorrect.
This option is incorrect because there is no such setting as 'Depends on Task A' in the Jobs UI.
- B. Correct.
This is the correct option. In the Databricks Jobs UI, you can configure task dependencies by using the 'Add Dependency' feature, which allows you to specify predecessor tasks.
- C. Incorrect.
This option is incorrect because retry policies are unrelated to task dependencies and cannot be used to enforce task execution order.
- D. Incorrect.
This option is incorrect because manually triggering tasks using the Databricks CLI is not a configuration method for setting up task dependencies in Jobs.