本教程将向您介绍一些基本的Airflow概念,对象及其在编写第一个管道时的用法。
示例管道定义
以下是基本管道定义的示例。 如果这看起来很复杂,请不要担心,下面将逐行说明。
"""
Code that goes along with the Airflow tutorial located at:
https://github.com/apache/incubator-airflow/blob/master/airflow/example_dags/tutorial.py
"""
from airflow import DAG
from airflow.operators.bash_operator import BashOperator
from datetime import datetime , timedelta
default_args = {
‘owner‘ : ‘airflow‘ ,
‘depends_on_past‘ : False ,
‘start_date‘ : datetime ( 2015 , 6 , 1 ),
‘email‘ : [ ‘[email protected]‘ ],
‘email_on_failure‘ : False ,
原文地址:https://www.cnblogs.com/wizardforcel/p/10034377.html
时间: 2024-11-09 09:45:22