Alberto_Umana
Databricks Employee
Databricks Employee

Hello @jeremy98,

Yes, it is possible to configure a YAML file to run a workflow only if the previous job run of the same workflow has finished. You can achieve this by defining dependencies between tasks within the workflow.

You can specify task dependencies using the depends_on field in your YAML configuration. This ensures that a task will only run after the specified dependent tasks have completed successfully

 

Example code:

 

bundle:

  name: example-bundle

resources:

  jobs:

    example-job:

      name: example-job

      tasks:

        - task_key: task1

          notebook_task:

            notebook_path: /path/to/notebook1

        - task_key: task2

          depends_on:

            - task_key: task1

          notebook_task:

            notebook_path: /path/to/notebook2

 

Please see: https://github.com/databricks/bundle-examples/blob/6558a732f4f21e2de7440aa0aadfd9ed8f845395/default_...