Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
rwnetwork
Creator
Creator

Getting 'Duplicate key value specified' error even when there are no duplicates

Hi there, 

While trying to write data through tas400output, I'm getting the 'Duplicate key value specified error' even when I do not have duplicates. I'm even using a tuniquerow to make sure there are no dups.  I even double checked by exporting the data to a text file and see zero dups.

In the tas400output component, I set the 'action on data' to 'Insert'.  

 

Please and thank you for any suggestions?

Michelle

 

2020-02-03_1650.png

2020-02-03_1659.png

 

 

 

Labels (2)
4 Replies
Anonymous
Not applicable

Your database is telling you that you are trying to insert a duplicate key. So it is definitely happening. 

1) Could this key already be in the DB and not in the dataset you are processing?

2) Are your lookups inadvertently duplicating a row?

3) Is your tUniqRow configured with the same unique criteria of your DB?

 

I think you need to see the data that is causing the issue. It looks like it is row 711 in the screenshot below. Maybe output your data to a file and look for row 711 to identify which one it is. That is, assuming that every time you run this it fails at row 711.

rwnetwork
Creator
Creator
Author

Thank you very much for your suggestions.

Going to review all of these today and see what I find.

 

 

rwnetwork
Creator
Creator
Author

Figured it out.

A far right column was creating duplicate rows on a within my lookups.  Modified one of my lookups to narrow down the data within the tas400input. 

This in turn, reduced the rows to lookup within the transformation and provided all unique rows.  I was then able to write to my output table.

Thanks again!

 

Anonymous
Not applicable

Well spotted. I suspected, when I saw the lookups, that it might be there. Issues like this can be a real pain to identify.