Issues with tbufferoutput data being passed from child to parent job

Five Stars

Issues with tbufferoutput data being passed from child to parent job

Hi,

 

I have two parent jobs which require same data in one flow, so I built that flow in a child job and loaded the data into tbufferoutput. Now when trying to retrieve the data from the child job to load to a table in the parent job using trunjob component, it takes forever and nothing happens. But when I remove the table and try to write the data in a file in the below job(refer screenshot), it works. Could someone give me guidance on the below questions.

 

Questions

 

1) Why does it not work when trying to load the table? Is it because the tmap_1 to transaction_fact flow starts before the child job completes and so data from child job is not available? Can't I straight away retrieve data from child job and load it to a table? 

2) Do I have to pass the retrieved data into some other components before trying to load the table?

3) What happens when both the parent jobs call the child job, does the child job execute only the first time or both the times?

 

talend screenshot.JPG

Forteen Stars TRF
Forteen Stars

Re: Issues with tbufferoutput data being passed from child to parent job

Hi,

1) is your tRunJob component configured as required when you want to retrieve data from child job?

You may have a look at https://help.talend.com/reader/4DeHFFMWIhiAwTaUkEqnmg/B3IFtzi83irMn5LJikxd1g

2) should work with a tBufferOutput

3) child job is "part" of the parent which use it using a tRunJob.

So if both parents are running are the same time, the job is executed for both parents.

 

Hope this helps.


TRF
Four Stars

Re: Issues with tbufferoutput data being passed from child to parent job

Hi Jaya,

Please find below answers for your question. It might be helpful for you.

 

1) Why does it not work when trying to load the table? Is it because the tmap_1 to transaction_fact flow starts before the child job completes and so data from child job is not available? Can't I straight away retrieve data from child job and load it to a table?

Ans. This issue is related to the configuration of tRunJob component. This component provide the flexibility to have either the input data as output or you can select output from child job as well. In order to select child output we have to enable a check box in

advance setting of this component.

Capture.PNG

One more issue might be your schema of both the tRunjob and tBifferOutput component should be same. If the issue still persist let me know.

 

2) Do I have to pass the retrieved data into some other components before trying to load the table?

Ans. It not required until you don't  need more transformation.

 

3) What happens when both the parent jobs call the child job, does the child job execute only the first time or both the times?

Ans. If jobs are calling a child job then all these jobs will receive the output as per configuration in child job.

 

 

 

 

Five Stars

Re: Issues with tbufferoutput data being passed from child to parent job

Hi Kailash,

 

Thanks for your response. I was able to figure out the issue or I am assuming this is the issue. My destination is a Mysql Innodb table and the tmysqloutput component setting is to Drop if exists and create the table. This takes a hell lot of time and I found online that mysql innodb used to have issues with drop. So I changed the setting to create table if does not exist and drop the table manually or through some other process prior to this.

 

However, this same drop if exists and create setting works fine in the job if it the data is from inside the job. I am not sure why it doesn't work when it comes from tbufferoutput. 

 

For the 3rd question, is there a way to have this child job run only once and have the data in buffer so that it can be used by multiple parent jobs without the need to run the child job every time. Isn't that how the tbufferoutput component supposed to work?