The error message indicates that there is a duplicate key: "pcdn_export_agg_peak.split_to_agg_9.pcdn_agg-2019-11-21 09:47:00", because I am preparing to insert the data is including these fields: ("dag_id", "execution_date") VALUES is ("pcdn_export_agg_peak.split_to_agg_9.pcdn_agg", <Pendulum [2019-11-21T09:47:00+00:00]>).
my airflow version is v1.10.5, backend meatadata database is mysql.
in the mysql database airflow, show create table dag_run; result is this:
this table has UNIQUE KEY dag_id (dag_id,execution_date), this value is not repeatable.
However, I queried the value of "2019-11-21 09:47:00" to the data of "execution_date" and did not query it.
However, the value of "execution_date" of the data I inserted is "UTC 2019-11-21T09:47:00+00:00". If I convert according to my local time, the value should be "2019-11-21 17:47:00". I queried the value of "2019-11-21 17:47:00" to the data and get 4 result:
i have a dag: "pcdn_export_agg_peak_daily", it will be trigger dag "pcdn_export_agg_peak" 3 times by difference
run_id
anddag_run.conf
。but when dag: "pcdn_export_agg_peak_daily" is running end, log show it get erros and exit with code 1:
The error message indicates that there is a duplicate key: "pcdn_export_agg_peak.split_to_agg_9.pcdn_agg-2019-11-21 09:47:00", because I am preparing to insert the data is including these fields: ("dag_id", "execution_date") VALUES is ("pcdn_export_agg_peak.split_to_agg_9.pcdn_agg", <Pendulum [2019-11-21T09:47:00+00:00]>).
my airflow version is
v1.10.5
, backend meatadata database is mysql.in the mysql database
airflow
, show create tabledag_run
; result is this:this table has UNIQUE KEY
dag_id
(dag_id
,execution_date
), this value is not repeatable.However, I queried the value of "2019-11-21 09:47:00" to the data of "execution_date" and did not query it.
However, the value of "execution_date" of the data I inserted is "UTC 2019-11-21T09:47:00+00:00". If I convert according to my local time, the value should be "2019-11-21 17:47:00". I queried the value of "2019-11-21 17:47:00" to the data and get 4 result:
so, by the log error information, i guess the bug how cause of the failure.
airflow query dag_run by UNIQUE KEY
pcdn_export_agg_peak.split_to_agg_9.pcdn_agg-2019-11-21 09:47:00
and did not query data.and airflow insert data in to dag_run again, and trigger this bug..
For reference....
Complete error log: