Merges data from various sources, based on a common schema.
tUnite cannot exist in a data flow loop. For instance, if a data flow goes through several tMap components to generate two flows, they cannot be fed to tUnite.
Centralize data from various and heterogeneous sources.
Schema and Edit Schema
A schema is a row description, it defines the number of fields to be processed and passed on to the next component. The schema is either Built-in or stored remotely in the Repository.
Click Edit schema to make changes to the schema. If the current schema is of the Repository type, three options are available:
Click Sync columns to retrieve the schema from the previous component in the Job.
Built-in: The schema will be created and stored locally for this component only. Related topic: see Talend Studio User Guide.
Repository: The schema already exists and is stored in the Repository, hence can be reused in various projects and Job designs. Related topic: see Talend Studio User Guide.
Select this check box to collect log data at the component level.
This component is not startable and requires one or several input components and an output component.
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.
NB_LINE: the number of rows processed. This is an After variable and it returns an integer.
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.
Outgoing links (from this component to another):
Trigger: Run if; On Component Ok; On Component Error
Incoming links (from one component to this one):
Row: Main; Reject.
For further information regarding connections, see Talend Studio User Guide.
If you are using a subscription-based version of the Studio, the activity of this component can be logged using the log4j feature. For more information on this feature, see Talend Studio User Guide.
For more information on the log4j logging levels, see the Apache documentation at http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html.
The following Job iterates on a list of files then merges their content and displays the final 2-column content on the console.
Drop the following components onto the design workspace: tFileList, tFileInputDelimited, tUnite and tLogRow.
Connect the tFileList to the tFileInputDelimited using an Iterate connection and connect the other component using a row main link.
In the tFileList Basic settings view, browse to the directory, where the files to merge are stored.
The files are pretty basic and contain a list of countries and their respective score.
In the Case Sensitive field, select Yes to consider the letter case.
Select the tFileInputDelimited component, and display this component's Basic settings view.
Fill in the File Name/Stream field by using the Ctrl+Space bar combination to access the variable completion list, and selecting
tFileList.CURRENT_FILEPATHfrom the global variable list to process all files from the directory defined in the tFileList.
Click the Edit Schema button and set manually the 2-column schema to reflect the input files' content.
For this example, the 2 columns are Country and Points. They are both nullable. The Country column is of String type and the Points column is of Integer type.
Click OK to validate the setting and accept to propagate the schema throughout the Job.
Then select the tUnite component and display the Component view. Notice that the output schema strictly reflects the input schema and is read-only.
In the Basic settings view of tLogRow, select the Table option to display properly the output values.