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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

mapping foreign key in Tmap with 2 mysqloutput

Hello ,
I have an insert process that I do with Tmap . one of my TmysqlOuput has an auto generated key that I want to recuperate in one field of the other TmysqlOuput
Thanks
Labels (2)
16 Replies
Anonymous
Not applicable
Author

hello , but I tried that first and it gerenate an error : Column 'filterCriteriaId' specified twice that's why I changed the name of the column
alevy
Specialist
Specialist

Did you set the "Position" to "Replace"? In your screenshot, it's set to "Before".
Anonymous
Not applicable
Author

hello , I'm very sorry of the disturbance , it's my first experience with Talend . But when I set the "Position" to "Replace it's generate an error like : Cannot add or update a child row: a foreign key constraint fails (`datadb`.`filtercriteriarepositoryelement`, CONSTRAINT `FK_filterCriteriaId` FOREIGN KEY (`filterCriteriaId`) REFERENCES `filtercriteria` (`filterCriteriaId`) ON DELETE CASCADE ON UPDATE NO AC)
alevy
Specialist
Specialist

That's an MySQL error and I don't use MySQL but it looks like it's suggesting the FK is invalid. Did you follow my other instructions: make sure both tMysqlOutput components share a connection and uncheck "Extend Insert"?
Test if the filterCriteriaId is being retrieved correctly by replacing your tMysqlOutput with tFlowToIterate -> tMysqlInput (also sharing a connection; "select last_insert_id()") --> tLogRow.
Anonymous
Not applicable
Author

hi  guys kindly help after finishing mapping ....how can i create the fields on the mapped data back to the databases.. 
Anonymous
Not applicable
Author

Connect your mapped fields to txxxDBOutput component...
What is the problem that you are facing?
Vaibhav
Anonymous
Not applicable
Author

bonjour 
je suis debutant en talend et je voudrais créee une table a partir de talend avec une clé etrangere
mon probleme est que je sais pas comment specifier la contrainte de clé etrangere  a partir de tmap 
pourriez vous m'aider ???
merci