Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Senthil,
Could you elaborating your case with an example with input and expected output values to us so that we can understand your requirement more clearly and design a proper and precise work flow for you.
Best regards
Sabrina
a pseudo-code based on the whole information that you have provided:
open connection (transaction is implied)
readFile -> insertInParent -> collect PK just inserted
-> insert into Child
-> collect PK just inserted
-> insert into Child
-> collect PK just inserted
<EOF>
onSubjobOK -> commit tran
onSubjobFail -> rollback tran
Hi,
I create an example job to show how to insert a parent and many child entries from a csv file to Mysql, hope it will give you hints and be helpful for all of community users who may have the same request in future. A key point in this job is to do an inner join on tMap_1 to get the entries already exists in the master table, and the ones do not exists. For more details, please see my screenshots. Let me know if you have any questions. Also, if you want to get this example job, please email me!
Best regards
Sabrina
Hi,
I create an example job to show how to insert a parent and many child entries from a csv file to Mysql, hope it will give you hints and be helpful for all of community users who may have the same request in future. A key point in this job is to do an inner join on tMap_1 to get the entries already exists in the master table, and the ones do not exists. For more details, please see my screenshots. Let me know if you have any questions. Also, if you want to get this example job, please email me!
Best regards
Sabrina
Hi,
The course field is not a field in my master table. Its only available in the child table. So the master table is accepting the column course. While inserting the record an error occurs "Unknown column 'Course' in 'field list'Unknown column 'Course' in 'field list'". If I'm not adding it to the master table, I'm able to insert the record. You need to deactivate up-datable and insert-able option for course column on the advanced settings tab of tMysqlOutput_1(see my pic)
Could you upload your current work flow into forum so that I can understand your issue more clearly. In addition, I can send the demo job .zip file to you by e-mail. I think it will help you to know the job deeply.
Best regards
Sabrina