I made a small change to an existing workflow, and it has broken airflow. Here is the code:
JavaScript
x
22
22
1
dag_name = platform + "_" + report['table']
2
3
dag = DAG(
4
dag_name,
5
catchup=True,
6
default_args=default_args,
7
schedule_interval=report['schedule']
8
)
9
10
with dag:
11
12
trigger_report = PythonOperator(
13
task_id=dag.dag_id + '_trigger_report',
14
python_callable=trigger_report,
15
provide_context=True,
16
op_kwargs={
17
'report_name': report['report'],
18
'amazonmws_conn_id': default_args['amazonmws_conn_id']
19
},
20
dag=dag
21
)
22
Here is the error I’m receiving:
airflow.exceptions.AirflowException: python_callable param must be callable
Advertisement
Answer
seems like you are passing trigger_report
itself as the python_callable
.
Is this intentional? does it already have a value?
(probably, otherwise you would’ve gotten a NameError: name 'trigger_report' is not defined
)