25 lines
542 B
Python
25 lines
542 B
Python
from datetime import datetime
|
|
from airflow import DAG
|
|
from airflow.operators.python import PythonOperator
|
|
|
|
def print_test():
|
|
print('Hello World')
|
|
|
|
with DAG(
|
|
dag_id='DAG_test',
|
|
default_args={'retries': 1},
|
|
schedule='@once',
|
|
start_date=datetime(2025, 8, 11),
|
|
catchup=False,
|
|
access_control={
|
|
"DAG_Test_Access": {
|
|
"can_read",
|
|
"can_edit",
|
|
"can_dag_run"
|
|
}
|
|
}
|
|
) as dag:
|
|
t1 = PythonOperator(
|
|
task_id='print_test',
|
|
python_callable=print_test,
|
|
) |