Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to create custom operators in airflow and use them in airflow template which is running through cloud composer(in google cloud platform)

I need to create a custom airflow operator which I should be able to use in airflow template(Written in python) which is running in cloud composer...

If I create custom airflow operator how can I use it in a template which is running on the cloud(how to make it available for everyone so that they can use that operator)

like image 453
saicharan Avatar asked Nov 28 '18 13:11

saicharan


1 Answers

You need to use Airflow Plugins. https://airflow.apache.org/plugins.html

Airflow has a simple plugin manager built-in that can integrate external features to its core by simply dropping files in your $AIRFLOW_HOME/plugins folder. The python modules in the plugins folder get imported, and hooks, operators, sensors, macros, executors and web views get integrated to Airflow’s main collections and become available for use.

Take a look at examples here: https://github.com/airflow-plugins

like image 181
kaxil Avatar answered Oct 20 '22 01:10

kaxil