cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Making dynamic tasks like in Airflow, but in Databricks?

KristiLogos
Contributor

I've used Airflow which allows us to create a DAG with dynamic tasks, for example we can have a list of items (such as table names),  loop through an operator that accepts a table name and create a task for each table without having to create a new notebook for each table. 

Is this possible in Databricks as well? 

1 REPLY 1

kamal_ch
Databricks Employee
Databricks Employee

Yes, it is possible to create dynamic tasks in Databricks workflows, similar to the approach using Apache Airflow, by leveraging Databricks' job orchestration capabilities. However, the implementation may differ from Airflow's dynamic DAG creation.

Databricks supports multi-task jobs, allowing users to specify multiple tasks (e.g., notebooks, JARs, Python scripts) within a single job. These tasks can include dependencies and parameterized execution workflows where tasks dynamically use inputs such as table names. The parameterization functionality in Databricks jobs enables passing parameters to notebooks, facilitating dynamic task execution without manually duplicating notebooks for each input

Airflow itself integrates with Databricks via operators like DatabricksRunNowOperator and DatabricksSubmitRunOperator from the Airflow Databricks provider. These operators can trigger tasks or workflows defined in Databricks jobs, leveraging dynamic input arguments to execute tasks for specific items or tables. This integration enables Airflow DAGs to dynamically orchestrate tasks based on external criteria such as lists of table names.

See for more details https://docs.databricks.com/gcp/en/jobs/how-to/use-airflow-with-jobs

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now