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. In general, we 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.

Talend tBufferInput and tBufferOutput 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.

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

Talend tBufferInput and tBufferOutput 5

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

Talend tBufferInput and tBufferOutput 6

Let us run this Talend tBufferInput and tBufferOutput job.

Talend tBufferInput and tBufferOutput 7

From the above Buffer Input and Output image, you can see the output.