Files
airflow/dags/MyDag.py
T
shenjian@fangjia.com 071990bf85 新增父类
2023-03-13 10:03:52 +08:00

16 lines
495 B
Python

from airflow import DAG
from datetime import datetime
from airflow.operators.bash import BashOperator
class MyDAG(DAG):
def __init__(self, *args, **kwargs):
super().__init__(
dag_id='my_dag',
start_date=datetime(2023, 3, 13),
*args, **kwargs
)
BashOperator(
task_id='install_required',
bash_command='pip install -I -r requirements.txt -i https://repo.fangjia.com/repository/pypi-public/simple/',
)