Duplicate entry 'XXXXXX' for key 'PRIMARY'

Duplicate entry 'XXXXXX' for key 'PRIMARY'

Hi,
When I need to combine/append 2 tables together, i encounter below error:
Duplicate entry 'MD1209573642' for key 'PRIMARY'.
How to solve this problem? Any one know?
Regards
Benjamin Marcus
Community Manager

Re: Duplicate entry 'XXXXXX' for key 'PRIMARY'

Hi
The column is a primary key, the value "MD1209573642" already exists in table. How to solve the problem? It depends on your request, you have two choice:
1. Check the option 'die on error' on the output DB component, the job throw the exception and dies.
2. Uncheck the option 'die on error', the problematic rows are rejected into the reject flow and the job continue to process next row. Link a reject data flow after the output DB component, you will get all the problematic rows. For example:
tFileIputDelimited--main--tMysqlOutput--reject--tLogRow
----------------------------------------------------------
Talend | Data Agility for Modern Business

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

APIs for Dummies

View this on-demand webinar about APIs....

Watch Now