Talend tBufferInput helps to retrieve the data or records buffered by the tBufferOutput. Whereas Talend tBufferOutput collects or stores data in a buffer so that the other components like tBufferInuput or web services can access that data. We generally use the tBufferOutput concept to export data into a web application via web service. And the second scenario is to pass data from one job (parent) to another (child job).
In this example, we use tBufferOutput to store data in a buffer. We then use the tBufferInput to access the same.
Talend tBufferInput and tBufferOutput Example
To demonstrate the Talend tBufferInput and tBufferOutput, we used tDBInput data. Within the tDBInput data, we have selected the customer table metadata from the repository.
Next, we added the tBufferOutput and connected it to the tDBInput. Here, tBufferOutput will buffer the data inside the Customer table. As you can see from the tBufferOutput below, it has no properties to configure; all you have to do is check the schema.
Please click the Edit Schema button, and check the Main Input and Buffer output columns. If you don’t find the columns in the output, either add them manually or click the sync columns button.
Drag and drop the Talend tBufferInput to get the buffered data. Next, right-click and select the tDBInput Trigger and then select the On Subjob OK trigger.
By default, Talend tBufferInput has no columns, so click on the Edit Schema button, and add columns. Or, select the metadata from the repository (if any).
Next, we used the Talend tLogRow to display the buffer data.
Let us run this Talend tBufferInput and tBufferOutput job.
You can see the output from the above Buffer Input and Output image.