0
点赞
收藏
分享

微信扫一扫

airflow 实战

ZMXQQ233 2022-06-01 阅读 54

def print_hello(*a,**b):
print a
print "========="
print b
print 'Hello world!'
raise ValueError("pre_paths or find_svr is null")
return {"hello":"Hello world!"}
 

t1 = PythonOperator(
task_id='print_hello',
#provide_context=True,
python_callable=print_hello,
op_kwargs={"aa":11,"bb":"22cc"},
op_args=[1,2,3,"zcy"],
dag=dag)

============结果如下

airflow 实战_python

》》》》》》》》》》》》》》》》》》》》

def print_hello(bb,cc,**kwargs):
print "bb",bb
print "cc",cc
print "aa",kwargs
#print type(aa[1])

t1 = PythonOperator(
task_id='print_hello',
provide_context=True,
python_callable=print_hello,
op_args=[1,23],
op_kwargs={"sdf":"good"},
dag=dag)

==========结果如下

airflow 实战_ide_02

举报

相关推荐

0 条评论