tBufferInput - 6.3

Talend Open Studio for Big Data Components Reference Guide

EnrichVersion
6.3
EnrichProdName
Talend Open Studio for Big Data
task
Data Governance
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

Function

This component retrieves bufferized data in order to process it in a second subjob.

Purpose

The tBufferInput component retrieves data bufferized via a tBufferOutput component, for example, to process it in another subjob.

tBufferInput properties

Component family

Misc

 

Basic settings

Schema and Edit Schema

A schema is a row description, it defines the number of fields that will be processed and passed on to the next component. The schema is either built-in or remote in the Repository.

Since version 5.6, both the Built-In mode and the Repository mode are available in any of the Talend solutions.

Click Edit schema to make changes to the schema. If the current schema is of the Repository type, three options are available:

  • View schema: choose this option to view the schema only.

  • Change to built-in property: choose this option to change the schema to Built-in for local changes.

  • Update repository connection: choose this option to change the schema stored in the repository and decide whether to propagate the changes to all the Jobs upon completion. If you just want to propagate the changes to the current Job, you can select No upon completion and choose this schema metadata again in the [Repository Content] window.

In the case of tBufferInput, the column position is more important than the column label as this will be taken into account.

 

 

Built-in: You create the schema and store it locally for this component only. Related topic: see Talend Studio User Guide.

 

 

Repository: You have already created the schema and stored it in the Repository, hence can be reused in various projects and Job designs. Related topic: see Talend Studio User Guide.

Global Variables

NB_LINE: the number of rows processed. This is an After variable and it returns an integer.

ERROR_MESSAGE: the error message generated by the component when an error occurs. This is an After variable and it returns a string. This variable functions only if the Die on error check box is cleared, if the component has this check box.

A Flow variable functions during the execution of a component while an After variable functions after the execution of the component.

To fill up a field or expression with a variable, press Ctrl + Space to access the variable list and choose the variable to use from it.

For further information about variables, see Talend Studio User Guide.

Usage

This component is the start component of a secondary Job which is triggered automatically at the end of the main Job.

Scenario: Retrieving bufferized data

This scenario describes a Job that retrieves bufferized data from a subjob and displays it on the console.

  • Drop the following components from the Palette onto the design workspace: tFileInputDelimited and tBufferOutput.

  • Select the tFileInputDelimited and on the Basic Settings tab of the Component view, set the access parameters to the input file.

  • In the File Name field, browse to the delimited file holding the data to be bufferized.

  • Define the Row and Field separators, as well as the Header.

  • Click [...] next to the Edit schema field to describe the structure of the file.

  • Describe the Schema of the data to be passed on to the tBufferOutput component.

  • Select the tBufferOutput component and set the parameters on the Basic Settings tab of the Component view.

Note

Generally speaking, the schema is propagated from the input component and automatically fed into the tBufferOutput schema. But you can also set part of the schema to be bufferized if you want to.

  • Drop the tBufferInput and tLogRow components from the Palette onto the design workspace below the subjob you just created.

  • Connect tFileInputDelimited and tBufferInput via a Trigger > OnSubjobOk link and connect tBufferInput and tLogRow via a Row > Main link.

  • Double-click tBufferInput to set its Basic settings in the Component view.

  • In the Basic settings view, click [...] next to the Edit Schema field to describe the structure of the file.

  • Use the schema defined for the tFileInputDelimited component and click OK.

  • The schema of the tBufferInput component is automatically propagated to the tLogRow. Otherwise, double-click tLogRow to display the Component view and click Sync column.

  • Save your Job and press F6 to execute it.

The standard console returns the data retrieved from the buffer memory.