Talend tBufferInput and tBufferOutput

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.

tDbInput for two database inputs 1

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.

Talend tBufferInput and tBufferOutput 2

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.

Edit Schema of a Talend tBufferInput and tBufferOutput 3

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.

Talend tBufferInput and tBufferOutput 4

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).

Check mark the Column Names 5

Next, we used the Talend tLogRow to display the buffer data.

Check the Components Tab to view output in Table 6

Let us run this Talend tBufferInput and tBufferOutput job.

Talend tBufferInput and tBufferOutput 7

You can see the output from the above Buffer Input and Output image.