tFileInputProperties
value.
tFileInputProperties Standard properties
These properties are used to configure tFileInputProperties running in the Standard Job framework.
The Standard
tFileInputProperties component belongs to the File family.
The component in this framework is available in all Talend
products.
Basic settings
Schema and Edit |
A schema is a row description, it defines the number of fields to be processed and For this component, the schema is read-only. It is made of two |
File format |
Select from the list your file format, either: .properties or .ini. |
 |
.properties: data in the |
 |
.ini: data in the configuration
Section Name: enter the section |
File Name |
Name and path to the file to be created and/or the variable to be For further information about how to define and use a variable, Warning: Use absolute path (instead of relative path) for
this field to avoid possible errors. |
Calculate MD5 Hash |
Select this check box to verify that the file to be processed has |
Advanced settings
Encoding |
Select the encoding type from the list or select Custom and define it manually. This field |
tStatCatcher Statistics |
Select this check box to gather the Job processing metadata at a |
Global Variables
Global Variables |
NB_LINE: the number of rows processed. This is an After
ERROR_MESSAGE: the error message generated by the A Flow variable functions during the execution of a component while an After variable To fill up a field or expression with a variable, press Ctrl + For further information about variables, see |
Usage
Usage rule |
Use this component to read a text file and separate data according |
Reading and matching the keys and the values of different
.properties files and outputting the results in a glossary
This four-component Job reads two .properties files, one in French and the
other in English. The data in the two input files is mapped to output a glossary matching
the English and French terms.
The two input files used in this scenario hold localization strings for the
tMysqlInput component in
Talend Studio
.
The glossary displays on the console listing three columns holding: the key
name in the first column, the English term in the second, and the corresponding French term
in the third.
Dropping and linking the components
- Drop the following components from the Palette onto the design workspace: tFileInputProperties (x2), tMap, and tLogRow.
-
Connect the component together using Row >
Main links. The second properties file,
FR, is used as a lookup flow.
Configuring the components
-
Double-click the first tFileInputProperties
component to open its Basic settings view and
define its properties. -
In the File Format field, select your file
format. -
In the File Name field, click the three-dot
button and browse to the input .properties
file you want to use. -
Do the same with the second tFileInputProperties and browse to the French .properties file this time.
-
Double-click the tMap component to open the
tMap editor. -
Select all columns from the English_terms table and drop
them to the output table.Select the key column from the
English_terms table and drop it to the
key column in the French_terms
table. -
In the glossary table in the lower right
corner of the tMap editor, rename the
value field to EN because it will
hold the values of the English file. - Click the plus button to add a line to the glossary table and rename it to FR.
-
In the Length field, set the maximum length
to 255. -
In the upper left corner of the tMap editor,
select the value column in the
English_terms table and drop it to the
FR column in the French_terms
table. When done, click OK to validate your
changes and close the map editor and propagate the changes to the next
component.
Saving and executing the Job
- Press Ctrl+S to save your Job.
-
Press F6 or click the Run button from the Run tab to
execute it.