Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Amitg2
Contributor
Contributor

talend-data-insertion-with-auto-increment-keys

I am using talend studio free version. I have an excel with 2 sheets "System" and "Part" table data. I want to insert the data into redshift tables system and part respectively. First I want to check if given system is already present in redshift table, if yes, retrieve its system id, if not then add it with new system id. The same goes for part data, if part already present, get the part id, if not then add the record with new id.

Once this is done, the system id(existing/new) along with part id(existing/new) should be added to a map table system_to_part which has columns system_id and part_id.

The tables in redshift are created with ids as auto increment and upon adding rows I see ids generated. But how can I take the ids in talend and insert into a new table(system_to_part)?

Labels (3)
1 Reply
hanghan
Contributor III
Contributor III

Best to use the database sequences to so that you can have more control over it, while insert/update use the database sequence and same id you can use it for the "system_to_part" table.