简体   繁体   English

DataJobs Airflow 用于 GCP 的 Dags 和 Azure

[英]DataJobs Airflow Dags for GCP and Azure

Implement Operator to abstract cloud provider (GCP & Azure) -specific calls (SQL/Python/Spark)实施 Operator 以抽象云提供商(GCP 和 Azure)特定调用(SQL/Python/Spark)

I have found this documentaion:- https://airflow.apache.org/docs/apache-airflow/1.10.14/_modules/airflow/contrib/example_dags/example_gcp_sql.html我找到了这个文档:- https://airflow.apache.org/docs/apache-airflow/1.10.14/_modules/airflow/contrib/example_dags/example_gcp_sql.html

But i am not clear how to implement this according to my task但我不清楚如何根据我的任务实现这个

You might want to look through the available operators of the Google and Azure Airflow providers if an operator exists that fits your use case.如果存在适合您的用例的运营商,您可能需要查看GoogleAzure Airflow 提供商的可用运营商。

The Astronomer registry has some example DAGs with implementations of some of the operators in those packages (Google example DAGs , Azure example DAGs ) Astronomer registry 有一些示例 DAG,其中包含这些包中某些运算符的实现(Google 示例 DAGAzure 示例 DAG

Disclaimer: I work at Astronomer:)免责声明:我在天文学家工作:)

PS: The link you shared points to very outdated documentation of pre-2 Airflow. It is very possible for that DAG code to throw errors in modern Airflow. PS:您共享的链接指向 pre-2 Airflow 的非常过时的文档。该 DAG 代码很可能在现代 Airflow 中抛出错误。

EDIT:编辑:

  • If this is your first time using Airflow I recommend you start with this tutorial .如果这是您第一次使用 Airflow,我建议您从本教程开始。 Part 1 teaches you about operators and how to interact with Airflow, including how to turn any Python script into an Airflow task.第 1 部分向您介绍运算符以及如何与 Airflow 交互,包括如何将任何 Python 脚本转换为 Airflow 任务。 Part 2 shows you how to create connections with external tools, which you'll need when interacting with GCP and Azure.第 2 部分向您展示了如何使用外部工具创建连接,您在与 GCP 和 Azure 交互时将需要这些工具。
  • This guide goes over how to use several SQL based operators with full DAG examples.本指南介绍了如何使用多个基于 SQL 的运算符以及完整的 DAG 示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM