Apache Airflow Certified

Executes a Python callable

View Source

Last Updated: May. 6, 2021

Access Instructions

Install the Apache Airflow provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.


python_callablepython callableA reference to an object that is callable
op_kwargsdict (templated)a dictionary of keyword arguments that will get unpacked in your function
op_argslist (templated)a list of positional arguments that will get unpacked when calling your callable
templates_dictdict[str]a dictionary where the values are templates that will get templated by the Airflow engine sometime between __init__ and execute takes place and are made available in your callable's context after the template has been applied. (templated)
templates_extslist[str]a list of file extensions to resolve while processing templated fields, for examples ['.sql', '.hql']


Executes a Python callable

See also

For more information on how to use this operator, take a look at the guide: PythonOperator

Was this page helpful?