Mapping FK into a table in talend

2019-06-10 15:53发布

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?

enter image description here

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

1条回答
Viruses.
2楼-- · 2019-06-10 16:17

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.

Job Design

查看更多
登录 后发表回答