Skip to main content

Workflow task types

Find the fields of each task type before you fill in the task form. The fields that all types share are listed once at the top, and each type then lists only its own fields.

Fields common to all task types​

Every task form has these fields, whatever its Type.

Basic information​

FieldDescription
Task nameRequired. Letters, numbers, underscores (_), and hyphens (-).
TypeRequired. The task type: PySpark, Jupyter Notebook, Jar, Python, DBT, Dask, or SQL Execute Job. The rest of the form depends on it. Default: Python.
Depends onOptional. The tasks that this task depends on. You can select more than one.

Execution environment​

FieldDescription
ComputeRequired. The compute that runs the task. Compute lists the computes that you can use, for example airflow-worker. You select exactly one.

Notifications​

To add notifications to a task, see Add notifications to a task.

FieldDescription
TypeThe channel: email or Telegram. It lists only the channels that are set up and enabled.
ChannelThe email address or the Telegram chat ID that receives the notifications.
EventThe statuses that send a notification. You can select more than one.

Retries​

FieldDescription
At mostThe number of retries when the task fails.
Delay (seconds)Python tasks only. The wait between two retries, in seconds.
Delay (minutes)All other task types. The wait between two retries, in minutes.

Python​

A Python task runs a Python script or a Python project. Use it for small data processing jobs, automation scripts, or simple business logic.

Python task form with Python mode set to Project, showing the Project directory and Entrypoint fields above the Depends on, Compute, and Image fields

Basic information​

FieldDescription
Python modeRequired. Script runs one Python file. Project runs a project folder from its entry point. Default: Script.
Script pathRequired with Script. The Python file (.py) to run. Select it with the folder icon.
Project directoryRequired with Project. The folder of the Python project. Select it with the folder icon.
EntrypointRequired with Project. The file that starts the project, for example main.py. Select the Project directory first.

Execution environment​

FieldDescription
ImageRequired. The runtime image of the task.
Init scriptOptional. A script that runs before the script of the task.
Environment variablesOptional. Environment variables passed to the job, as JSON key-value pairs in env.

Resources​

FieldDescription
CPURequired. The number of CPU cores.
RAM (GB)Required. The RAM, in GB.

Libraries and arguments​

FieldDescription
PypiOptional. A requirements.txt file that lists the Python libraries to install.
WheelOptional. One or more .whl files.
Configuration (Arguments)Optional. The arguments passed to the script when it runs. Press Enter after each one.

PySpark​

A PySpark task runs a Spark job written in Python. Use it for large-scale data processing with distributed computing.

PySpark task form under the workflow graph, with the Task name, Type, Path, Depends on, Compute, and Image fields

Basic information​

FieldDescription
PathRequired. The Python file (.py) to run. Select it with the folder icon.

Execution environment​

FieldDescription
ImageRequired. The runtime image of the task.
Init scriptOptional. A script that runs before the script of the task.
Spark configurationOptional. Spark parameters as JSON key-value pairs in spark_conf. For the parameters, see Spark configuration.
Environment variablesOptional. Environment variables passed to the job, as JSON key-value pairs in env.

Resources​

FieldDescription
Driver CPURequired. The CPU of the Spark driver.
Driver RAM (GB)Required. The RAM of the Spark driver, in GB.
Executor CPURequired. The CPU of each executor.
Executor RAM (GB)Required. The RAM of each executor, in GB.
InstancesRequired. The number of instances of the job.

Libraries and arguments​

FieldDescription
Pypi requirementsOptional. A requirements.txt file.
WheelOptional. One or more .whl files.
JarOptional. One or more .jar files for the Java runtime.
Configuration (Arguments)Optional. The arguments passed to the script when it runs. Press Enter after each one.

Jupyter Notebook​

A Jupyter Notebook task runs a notebook. Its form has the same fields as a PySpark task, and its Path is the path to the notebook that the task runs.

Jar​

A Jar task runs a Java or Scala application packaged as a JAR file. Use it for Spark jobs written in Scala or Java.

Basic information​

FieldDescription
PathRequired. The JAR file (.jar) to run.
Main classRequired. The Java class with the main() method where the run starts. Letters, numbers, dots (.), and underscores (_).

Execution environment​

FieldDescription
ImageRequired. The runtime image of the task.
Init scriptOptional. A script that runs before the application.
Spark configurationOptional. Spark parameters as JSON key-value pairs in spark_conf, as for a PySpark task.
Environment variablesOptional. Environment variables passed to the job, as JSON key-value pairs in env.

Resources​

FieldDescription
Driver CPURequired. The driver CPU for the job.
Driver RAM (GB)Required. The driver RAM for the job, in GB.
Executor CPURequired. The executor CPU for the job.
Executor RAM (GB)Required. The executor RAM for the job, in GB.
InstancesRequired. The number of instances of the job.

Libraries and arguments​

FieldDescription
JarOptional. One or more .jar library files for the Java runtime.
MavenOptional. Maven packages. Type each package, then press Enter.
Configuration (Arguments)Optional. The arguments passed to the application when it runs. Press Enter after each one.

DBT​

A DBT task runs a dbt (data build tool) project. Use it to transform data in a data warehouse with the ELT model.

Basic information​

FieldDescription
PathRequired. The folder that holds the dbt project.

Execution environment​

FieldDescription
ImageRequired. The runtime image of the task.
Init scriptOptional. A script that runs before the dbt commands.
Environment variablesOptional. Environment variables as JSON key-value pairs in env.

Resources​

FieldDescription
CPURequired. The CPU cores for dbt.
RAM (GB)Required. The RAM for dbt, in GB.

DBT commands​

FieldDescription
CommandsThe dbt commands to run, for example dbt run. Press Enter after each command.

Libraries​

FieldDescription
Pypi requirementsOptional. A Python requirements.txt file.
Wheel filesOptional. A Python .whl file.

A DBT task has no Arguments.

Dask​

A Dask task runs a parallel data processing job with the Dask framework. Use it for large-scale data processing with Python in a distributed environment.

Basic information​

FieldDescription
PathRequired. The Python file (.py) to run.

Execution environment​

FieldDescription
ImageRequired. The runtime image of the task.
Init scriptOptional. A script that runs before the script of the task.
Environment variablesOptional. Environment variables passed to the job, as JSON key-value pairs in env.

Resources​

The resources have three groups, Job, Scheduler, and Worker, each with a CPU and a RAM (GB) field.

FieldDescription
Job: CPURequired. The CPU of the job.
Job: RAM (GB)Required. The RAM of the job, in GB.
Scheduler: CPURequired. The CPU of the Dask scheduler.
Scheduler: RAM (GB)Required. The RAM of the Dask scheduler, in GB.
Worker: CPURequired. The CPU of each Dask worker.
Worker: RAM (GB)Required. The RAM of each Dask worker, in GB.
Worker instancesRequired. The number of workers.

Libraries and arguments​

FieldDescription
Pypi requirementsOptional. A requirements.txt file that lists the Python libraries to install.
Wheel filesOptional. One or more .whl files.
Configuration (Arguments)Optional. The arguments passed to the script when it runs. Press Enter after each one.

SQL Execute Job​

An SQL Execute Job task runs an SQL query through a connection. It has no Image field.

FieldDescription
ConnectionRequired. The connection to the database that the SQL runs on.
SQL QueryThe SQL to run.
Auto commitWhether to commit automatically. Default: False.
Split statementsWhether to split SQL Query into separate statements. Default: True.
CPURequired. The number of CPU cores.
RAM (GB)Required. The RAM, in GB.
Environment VariablesOptional. Select Add to add a variable.

Next steps​