Exemplo n.º 1
0
task5 = SSHExecuteOperator(task_id="export_dimCustomer",
                           bash_command=export_dimCustomer,
                           ssh_hook=sshHook,
                           dag=dag)

task6 = SSHExecuteOperator(task_id="export_dimSupplier",
                           bash_command=export_dimSupplier,
                           ssh_hook=sshHook,
                           dag=dag)

task7 = SSHExecuteOperator(task_id="export_dimPart",
                           bash_command=export_dimPart,
                           ssh_hook=sshHook,
                           dag=dag)

task8 = SSHExecuteOperator(task_id="export_dimDate",
                           bash_command=export_dimDate,
                           ssh_hook=sshHook,
                           dag=dag)

task9 = SSHExecuteOperator(task_id="export_salesFact",
                           bash_command=export_salesFact,
                           ssh_hook=sshHook,
                           dag=dag)

task0.set_downstream(task1)
task1.set_downstream(task2)
task3.set_upstream(task2)
task3.set_downstream(
    task_or_task_list=[task4, task5, task6, task7, task8, task9])
Exemplo n.º 2
0
task6 = SSHExecuteOperator(task_id="export_dimSupplier",
                           bash_command=export_dimSupplier,
                           ssh_hook=sshHook,
                           dag=dag)

task7 = SSHExecuteOperator(task_id="export_dimPart",
                           bash_command=export_dimPart,
                           ssh_hook=sshHook,
                           dag=dag)

task8 = SSHExecuteOperator(task_id="export_dimDate",
                           bash_command=export_dimDate,
                           ssh_hook=sshHook,
                           dag=dag)

task9 = SSHExecuteOperator(task_id="export_salesFact",
                           bash_command=export_salesFact,
                           ssh_hook=sshHook,
                           dag=dag)

task2.set_upstream(task_or_task_list=[
    task_import_lineitem, task_import_orders, task_import_part,
    task_import_region, task_import_supplier, task_import_customer,
    task_import_nation
])
task3.set_upstream(task2)

task3.set_downstream(
    task_or_task_list=[task4, task5, task6, task7, task8, task9])