(First time user of cloud composer) All examples I have seen define very simple python functions within the DAG.
I have multiple lengthy python scripts I want to run. Can I put these inside a task?
If so, is it then better to use the PythonOperator or call them from the BashOperator?
E.g. something like
default_dag-args ={}
with models.DAG('jobname', schedule_interval = datetime.timedelta(days=1), default_args = default_dag_args) as dag:
do_stuff1 = python_operator.PythonOperator(
task_id ='task_1'
python_callable =myscript1.py)
do_stuff2 = python_operator.PythonOperator(
task_id ='task_2'
python_callable =myscript2.py)