I have tried this multiple ways but failed to get it worked. I definitely need the experts help now. I will try to explain what I'm trying to do.
1. Parsing the text from PDF using tJavaFlex. The parsed text contains multiple rows of same table. Lets say Table A.
2. I need to take the inserted key value from Table A and insert into Table B.
Here is what I did.
1. Used tJavaFlex to parse PDF. And using For loop sending the values to tMap for inserting into Table A
2. OnComponentOK, retrieving the latest id value from Table A and passing it into Table B. With this, I'm not able to insert multiple rows originated in step 1 into Table B.
Hope I was able to explain my issue.
I'm attaching the diagram of my Job.
Please let me know the solution for this issue.
This is my understanding on your issue.
You inserted rows into table A and then fetching one row from table A and inseting into table B but you are getting no value from query on table A.
OnComponentOK triggers subjob as soon as it finds that component is OK it doesn't wait to finish first JOB thats why you may not be getting values from Table A.
Connect thse subjobs using OnSubjobOK so that second job will start after first jobs completion and you will get values from table A.
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Let me try to explain again.
1. I'm inserting rows (more than 1) into Table A using a for loop in tJavaFlex. The values are inserting fine.
2. I want to take the PK id value of the rows inserted and insert into Table B.
3. OnSubComponentOK, I'm able to retrieve the latest row value only, but not the two rows.
4. If you see my diagram, on the component where I created OnSubComponentOK, I couldn't find Trigger option to create OnSubJobOK.
My basic problem is "How to take the id value inserted in the first table and use it in the second table?" using Postgres. I saw some options for MySql.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Watch the recorded webinar!
Part 2 of a series on Context Variables
Learn how to do cool things with Context Variables
Find out how to migrate from one database to another using the Dynamic schema