Files
airflow/dags/my_dag.py
T
shenjian@fangjia.com dda9c85c48 优化导入
2023-03-14 11:22:09 +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/',
)