Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
lsh0107 committed Jan 6, 2024
1 parent 0572be2 commit 7e2be4c
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions dags/HelloWorld.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
from datetime import datetime

dag = DAG(
dag_id = 'HelloWorld',
start_date = datetime(2022,5,5),
dag_id="HelloWorld",
start_date=datetime(2022, 5, 5),
catchup=False,
tags=['example'],
schedule = '0 2 * * *')

tags=["example"],
schedule="0 2 * * *",
)


def print_hello():
Expand All @@ -17,27 +17,21 @@ def print_hello():


def print_goodbye():

print("goodbye!")
return "goodbye!"


print_hello = PythonOperator(
task_id = 'print_hello',
#python_callable param points to the function you want to run
python_callable = print_hello,
#dag param points to the DAG that this task is a part of
dag = dag)
task_id="print_hello",
# python_callable param points to the function you want to run
python_callable=print_hello,
# dag param points to the DAG that this task is a part of
dag=dag,
)

print_goodbye = PythonOperator(
task_id = 'print_goodbye',
python_callable = print_goodbye,
dag = dag)
task_id="print_goodbye", python_callable=print_goodbye, dag=dag
)

#Assign the order of the tasks in our DAG
# Assign the order of the tasks in our DAG
print_hello >> print_goodbye





0 comments on commit 7e2be4c

Please sign in to comment.