The components of the Technical family are normally hidden from the Palette by default. For more information about how to show
them on the Palette, see Talend Studio User
Guide.
Component family |
Technical |
|
Function |
tHashInput reads from the cache |
|
Purpose |
This component reads from the cache memory data loaded by |
|
Basic settings |
Schema and Edit |
A schema is a row description, it defines the number of fields to Click Edit schema to make changes to the schema. If the
This component offers the advantage of the dynamic schema feature. This allows you to This dynamic schema feature is designed for the purpose of retrieving unknown columns |
|
|
Built-in: The schema is created |
|
|
Repository: The schema already |
|
Link with a tHashOutput |
Select this check box to connect to a tHashOutput component. It is always selected by |
|
Component list |
Drop-down list of available tHashOutput components. |
|
Clear cache after reading |
Select this check box to clear the cache after reading the data |
Advanced settings |
tStatCatcher Statistics |
Select this check box to collect log data at the component |
Global Variables |
ERROR_MESSAGE: the error message generated by the NB_LINE: the number of rows processed. This is an After 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 Talend Studio |
|
Usage |
This component is used along with tHashOutput. It reads from the cache memory data |
|
Limitation |
n/a |
The following Job reads from the cache memory a huge amount of data loaded by two
tHashOutput components and pass it to a tFileOutputDelimited. The goal of this scenario is to show
the speed at which mass data is read and written. In practice, data feed generated in
this way can be used as lookup table input for some use cases where a big amount of data
needs to be referenced.
-
Drag and drop the following components from the Palette to the workspace: tFixedFlowInput (X2), tHashOutput (X2), tHashInput and tFileOutputDelimited.
-
Connect the first tFixedFlowInput to the
first tHashOutput using a Row > Main
link. -
Connect the second tFixedFlowInput to the
second tHashOutput using a Row > Main
link. -
Connect the first subjob (from tFixedFlowInput_1) to the second subjob (to tFixedFlowInput_2) using an OnSubjobOk link.
-
Connect tHashInput to tFileOutputDelimited using a Row > Main
link. -
Connect the second subjob to the last subjob using an OnSubjobOk link.
-
Double-click the first tFixedFlowInput component to display its Basic settings view.
-
Select Built-In from the Schema drop-down list.
Note
You can select Repository from
the Schema drop-down list to fill
in the relevant fields automatically if the relevant metadata has
been stored in the Repository. For
more information about Metadata,
see the Talend Studio User
Guide. -
Click Edit schema to define the data
structure of the input flow. In this case, the input has two columns:
ID and ID_Insurance, and then click OK to close the dialog box. -
Fill in the Number of rows field to
specify the entries to output, e.g. 50000. -
Select the Use Single Table check
box. In the Values table and in the
Value column, assign values to the
columns, e.g. 1 for ID and 3
for ID_Insurance. -
Perform the same operations for the second tFixedFlowInput component, with the only difference in
the values. That is, 2 for ID and 4
for ID_Insurance in this case. -
Double-click the first tHashOutput to
display its Basic settings view. -
Select Built-In from the Schema drop-down list and click Sync columns to retrieve the schema from the
previous component. Select Keep all
from the Keys management drop-down list
and keep the Append check box
selected. -
Perform the same operations for the second tHashOutput component, and select the Link with a tHashOutput check box.
-
Double-click tHashInput to display
its Basic settings view. -
Select Built-In from the Schema drop-down list. Click Edit schema to define the data structure,
which is the same as that of tHashOutput. -
Select tHashOutput_1 from the
Component list drop down
list. -
Double-click tFileOutputDelimited to
display its Basic settings view. -
Select Built-In from the Property Type drop-down list. In the
File Name field, enter the full
path and name of the file, e.g. “E:/Allr70207V5.0/Talend-All-r70207-V5.0.0NB/workspace/out.csv”. -
Select the Include Header check box
and click Sync columns to retrieve the
schema from the previous component.
In this scenario, the usage of the Append option of
tHashOutput is demonstrated as it helps remove
repetitive or unwanted data in case an iterator exists in the same subjob as tHashOutput.
To build the Job, do the following:
-
Drag and drop the following components from the Palette to the workspace: tLoop, tFixedFlowInput,
tHashOutput, tHashInput and tLogRow. -
Connect tLoop to tFixedFlowInput using a Row
> Iterate link. -
Connect tFixedFlowInput to tHashOutput using a Row > Main link.
-
Connect tHashInput to tLogRow using a Row > Main link.
-
Connect tLoop to tHashInput using an OnSubjobOk link.
-
Double-click the tLoop component to
display its Basic settings view. -
Select For as the loop type. Type in
1, 2
1 in the From, To and Step fields respectively. Keep the Values are increasing check box
selected. -
Double-click the tFixedFlowInput
component to display its Basic settings
view. -
Select Built-In from the Schema drop-down list.
Note
You can select Repository from
the Schema drop-down list to fill
in the relevant fields automatically if the relevant metadata has
been stored in the Repository. For
more information about Metadata,
see the Talend Studio User
Guide. -
Click Edit schema to define the data
structure of the input flow. In this case, the input has one column:
Name. -
Click OK to close the dialog
box. -
Fill in the Number of rows field to
specify the entries to output, for example 1. -
Select the Use Single Table check
box. In the Values table, assign a
value to the Name field, e.g. Marx. -
Double-click tHashOutput to display
its Basic settings view. -
Select Built-In from the Schema drop-down list and click Sync columns to retrieve the schema from the
previous component. Select Keep all
from the Keys management drop-down list
and deselect the Append check
box.
-
Double-click tHashInput to display
its Basic settings view. -
Select Built-In from the Schema drop-down list. Click Edit schema to define the data structure,
which is the same as that of tHashOutput. -
Select tHashOutput_2 from the
Component list drop-down
list. -
Double-click tLogRow to display its
Basic settings view. -
Select Built-In from the Schema drop-down list and click Sync columns to retrieve the schema from the
previous component. In the Mode area,
select Table (print values in cells of a
table).