This commit is contained in:
Grzegorz Michalski
2026-03-02 09:47:35 +01:00
commit 2c225d68ac
715 changed files with 130067 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
from datetime import datetime
from airflow import DAG
from airflow.operators.bash import BashOperator
from airflow.operators.python import PythonOperator
# RUN it if aiflow wokrs or not.
def print_statement():
print("Hello from the Python function!!!!!")
def print_message():
print("Last message from Python!, hope things are going good")
with DAG(
'demo_task_workflow',
start_date=datetime(2025, 6, 13),
schedule_interval=None,
catchup=False,
) as dag:
task1 = BashOperator(
task_id='print_with_bash',
bash_command='echo "Lets begin"',
)
task2 = PythonOperator(
task_id='print_with_python',
python_callable=print_statement,
)
task3 = BashOperator(
task_id='another_bash_task',
bash_command='echo "So far so good!"',
)
task4 = PythonOperator(
task_id='another_python_task',
python_callable=print_message,
)
task1 >> task2 >> task3 >> task4