I have 2 entities in my schema. I mapped one already and now for the second one I need to also have the PK of the first entity as a FK in the second entity when mapping using talend. They are both in the same job, but how can I use the Pk of the first entity in the mapping of the second entity?
This is what I have so far (row1 is entity1 which has an autogenerated key inside the tmap)
row2 is creating csv from xml file row3 maps the csv file generated from row2, however it should have a fk from entity 1 that is from row1
In the tMap_1, create another output row and write the auto generated ID's to a CSV using a tfileOutputDelimeted component. In your tMap_2, lookup this CSV file with the auto generated ID's and write to the table.