如何在airflow中创建自定义运算符并在airflow模板中使用,该模板通过cloud composer运行(在google云平台中)

2024-04-28 17:06:12 发布

您现在位置:Python中文网/ 问答频道 /正文

我需要创建一个自定义的气流操作符,我应该能够在气流模板(用python编写)中使用它,它运行在cloud composer。。。

如果我创建了自定义气流操作符,我如何在云上运行的模板中使用它(如何使每个人都可以使用它以便他们可以使用该操作符)


Tags: 模板cloudcomposer气流
1条回答
网友
1楼 · 发布于 2024-04-28 17:06:12

你需要使用气流插件。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.

请看下面的示例:https://github.com/airflow-plugins

相关问题 更多 >