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

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.

Add Talend tBufferInput and tBufferOutput to Workflow

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

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

Checkmark the required Columns

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

Check the Components Tab to view output in Table

Let us run this Talend tBufferInput and tBufferOutput job.

Run the Talend tBufferInput and tBufferOutput Job

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