Talend Tips: Returning data from Child to Parent process
Sometimes, I prefer to split a very large and complicated logic process into multiple sub-processes and have them executed in sequence. This way, I can manage the process better and make my testing as well as troubleshooting easier. Ever wonder how does the data in such organized process being transmitted from one sub-process to another?
In Talend, we can use the tBufferOutput component to achieve. This component acts as a temporary memory pool that keeps all the data in a child process and have them return to the parent process to continue the processing. Let’s take a quick look at the simple demo below.
Figure 1: Child process
In child process shown in Figure 1, I output the data from a tFixedFlowInput component into a tBufferOutput component. By doing this, Talend will keep the data into memory temporarily.
Now, what I need to do is to call the child process from a parent process by using tRunJob component and have the output row connected to the next component as shown in Figure 2. In this demo, I will use tLogRow component to print the data that I get from the child process.