job-manage-by-airflow/dags/hello_world_dag.py
2025-11-13 23:16:25 +09:00

20 lines
469 B
Python

from datetime import datetime
from airflow import DAG
from airflow.providers.standard.operators.python import PythonOperator
def say_hello():
print("Hello, Airflow! 初めてDAGを動かします。")
with DAG(
dag_id="hello_world",
start_date=datetime(2024, 1, 1),
schedule=None, # 手動実行
catchup=False,
) as dag:
hello_task = PythonOperator(
task_id="hello_task",
python_callable=say_hello,
)