本文介绍了在Apache Airflow Tool中,由于task_instance表中的重复输入问题,DAG无法运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天,我整天都在Airflow的调度程序中遇到此错误。

Today all day i have been getting this error in the scheduler of Airflow.

sqlalchemy.exc.IntegrityError: (_mysql_exceptions.IntegrityError) (1062, "Duplicate entry '%' fir key 'PRIMARY')")

因此,Airflow Scheduler将会停止,并且每次我运行时都会遇到相同的问题

Because of this the Airflow Scheduler would stop and every time i ran this had the same problem

推荐答案

这是由于MySQL的ON UPDATE CURRENT_TIMESTAMP导致的,并发布在Airflow的JIRA中:

This is due to MySQL's ON UPDATE CURRENT_TIMESTAMP and this is posted in JIRA of Airflow :

我通过将表格更改为

alter table `task_instance` change `execution_date` `execution_date` TIMESTAMP(6) not null DEFAULT CURRENT_TIMESTAMP(6);

这篇关于在Apache Airflow Tool中,由于task_instance表中的重复输入问题,DAG无法运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 22:07