• airflow 实战


    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)

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

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

    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)

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

  • 相关阅读:
    DOM基本介绍
    BOM的基本介绍
    对象
    函数
    时钟
    双色球
    JS数据结构
    微信扫二维码根据系统下载apk
    javascript相关积累
    ajax精华
  • 原文地址:https://www.cnblogs.com/testzcy/p/8530600.html
Copyright © 2020-2023  润新知