我在虚拟机Apache Airflow上本地启动,我想连接到Amazon Glue作业以运行它们。我从pull-request获取的源代码:https : //github.com/apache/incubator-airflow/pull/3504/files
那么,我应该在Airflow UI中建立哪些连接来运行Amazon Glue作业?你能告诉我一些文件吗?因为我在官方文档中没有发现任何有用的信息。
对于dag我使用简单的代码:
from datetime import datetime
from airflow import DAG
from airflow.operators.dummy_operator import DummyOperator
from airflow.operators.python_operator import PythonOperator
from airflow.operators.aws_glue_operator import AWSGlueJobOperator
def print_hello():
return 'Hello hello!'
dag = DAG('hello_world', description='Simple glue DAG',
schedule_interval='0 0 * * *',
start_date=datetime(2018, 6, 28), catchup=False)
awsGlueOperator = AWSGlueJobOperator(job_name='FIRST_JOB', script_location='https://s3.us-east-2.amazonaws.com/path-to-script',s3_bucket='https://s3.console.aws.amazon.com/s3/', iam_role_name='AWSGlueServiceRole', dag=dag)
hello_operator = PythonOperator(task_id='hello_task', python_callable=print_hello, dag=dag)
awsGlueOperator >> hello_operator
Run Code Online (Sandbox Code Playgroud)
先感谢您。
| 归档时间: |
|
| 查看次数: |
1751 次 |
| 最近记录: |