git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Duplicate key unique constraint error


Can you share the full python stack trace?

On Wed, Sep 12, 2018 at 5:31 PM Abhishek Sinha <abhishek@xxxxxxxxxxxx>
wrote:

> Got the following error on Airflow 1.8.2 version:
>
> duplicate key value violates unique constraint "task_instance_pkey"
>
> DETAIL: Key (task_id, dag_id, execution_date)=(PB_BPNZ, master_v2,
> 2018-09-12 03:00:37) already exists.n [SQL: 'INSERT INTO task_instance
> (task_id, dag_id, execution_date, start_date, end_date, duration, state,
> try_number, hostname, unixname, job_id, pool, queue, priority_weight,
> operator, queued_dttm, pid) VALUES (%(task_id)s, %(dag_id)s,
> %(execution_date)s, %(start_date)s, %(end_date)s, %(duration)s, %(state)s,
> %(try_number)s, %(hostname)s, %(unixname)s, %(job_id)s, %(pool)s,
> %(queue)s, %(priority_weight)s, %(operator)s, %(queued_dttm)s, %(pid)s)']
> [parameters: ({'hostname': u'', 'end_date': None, 'task_id': 'PB_BPNZ',
> 'queued_dttm': None, 'execution_date': datetime.datetime(2018, 9, 12, 3, 0,
> 37), 'pid': None, 'state': None, 'try_number': 0, 'queue': 'default',
> 'operator': None, 'unixname': 'infoworksuser', 'pool': None, 'duration':
> None, 'priority_weight': 65, 'start_date': None, 'dag_id': 'master_v2',
> 'job_id': None})]
>
>
>
>
>
>
>
> Regards,
>
> Abhishek
>
>