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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

error Talend

Hi,
I've got a probem when tring to insert in a postgres table,
i got this error :
ERREUR: la valeur d'une clé dupliquée rompt la contrainte unique « res_currency_pkey »
Détail : La clé « (id)=(0) » existe déjà.ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc
de la transactionERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc
de la transactionERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc
i hecked the table and i found out that id=0 does not exist
Help !
Best regards
Mouad
Labels (2)
8 Replies
Anonymous
Not applicable
Author

Hi moud,
What is the erro, can't understand or interpret the message... need english message for error... else translate and give the mesage.
Thanks
Vaibhav
Anonymous
Not applicable
Author

here is my error:
ERROR: The value of a duplicate key breaks the unique constraint "res_currency_pkey"
Detail: The Key "(id) = (0)» déjà.ERREUR are: the transaction is aborted, commands ignored until end of block
the transactionERREUR: the transaction is aborted, commands ignored until end of block
the transactionERREUR: the transaction is aborted, commands ignored until end of block
Anonymous
Not applicable
Author

Hi,
What's your job design? Did you want to insert/update data into your postgres DB? Could you please share your component setting screenshot with us?
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi,
Here is my screenshot
willm1
Creator
Creator

mouadrouass - your insert is violating a unique constraint - trying to insert a value that has already been inserted.
To solve this - change your table load from insert mode to insert/update, and in your tMap output table, check as a "Key" the primary key that is referenced in the unique constraint.
This way, your code will update the record if it exists, not insert it...
Anonymous
Not applicable
Author

it works but i can't insert all the rows because i have an auto increment id, and during the insertion i get just one row that has a id eqals to 0 , how can i start insertion from the last record in the target
Anonymous
Not applicable
Author

Hi
tPostgresqlOutput -> Advanced settings -> Unselect use the batch size (en francais : décocher ' utiliser la taille des lots')
Jr
Anonymous
Not applicable
Author

hi all,
use the same procedure as described at Talend help (for Oracle but shoud be the same for postgres) :
https://help.talend.com/search/all?query=Using+an+Oracle+sequence+while+inserting+data&content-lang=...
goal is to use server 'SEQUENCE' and nextVal function to insert new rows begining with the last inserted id.
hope it help
regards
laurent