tELTGreenplumMap
Uses the tables provided as input to feed the parameter in the built statement. The
statement can include inner or outer joins to be implemented between tables or between
one table and its aliases.
The three ELT Greenplum components are closely
related, in terms of their operating conditions. These components should be used to
handle Greenplum DB schemas to generate Insert statements, including clauses, which are
to be executed in the DB output table defined.
Helps you to build the SQL statement graphically, using the table
provided as input.
tELTGreenplumMap Standard properties
These properties are used to configure tELTGreenplumMap running in the Standard Job framework.
The Standard
tELTGreenplumMap component belongs to the ELT family.
The component in this framework is available in all Talend
products.
Basic settings
Use an existing connection |
Select this check box and in the Component List click the relevant connection component to Note: When a Job contains the parent Job and the child Job, if you
need to share an existing connection between the two levels, for example, to share the connection created by the parent Job with the child Job, you have to:
For an example about how to share a database connection |
ELT Greenplum Map Editor |
The ELT Map editor allows you to define the output schema and make a |
Style link |
Select the way in which links are displayed.
Auto: By default, the links between the
Bezier curve: Links between the schema
Line: Links between the schema and the This option slightly optimizes performance. |
Property type |
Either Built-in or Repository. |
 |
Built-in: No property data stored |
 |
Repository: Select the Repository |
Host |
Database server IP address. |
Port |
Listening port number of DB server. |
Database |
Name of the database. |
Username and Password |
DB user authentication data. To enter the password, click the […] button next to the |
Advanced settings
Additional JDBC parameters |
Specify additional connection properties for the DB connection you are |
tStatCatcher Statistics |
Select this check box to gather the Job processing metadata at a Job |
Global Variables
Global Variables |
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 |
tELTGreenplumMap is used along with Note:
Note that the ELT components do not handle actual data flow but |
Dynamic settings |
Click the [+] button to add a row in the table The Dynamic settings table is For examples on using dynamic parameters, see Reading data from databases through context-based dynamic connections and Reading data from different MySQL databases using dynamically loaded connection parameters. For more information on Dynamic |
Mapping data using a simple implicit join
In this scenario, a tELTGreenplumMap
component is deployed to retrieve the data from the source table employee_by_statecode, compares its statecode column against the
table statecode, and then maps the desired columns from the two tables
to the output table employee_by_state.
Before the Job execution, the three tables, employee_by_statecode, statecode and employee_by_state look like:

Dropping components

-
Add the following components from the Palette
to the workspace:- tGreenplumConnection
- two tELTGreenplumInput
- tELTGreenplumMap
- tELTGreenplumOutput
- tGreenplumCommit
- tGreenplumInput
- tLogRow
-
Rename the following components:
- tGreenplumConnection to
connect_to_greenplum_host - two tELTGreenplumInput to
employee+statecode and
statecode - tELTGreenplumMap to
match+map - tELTGreenplumOutput to
map_data_output - tGreenplumCommit to
commit_to_host - tGreenplumInput to
read_map_output_table - tLogRow to show_map_data
- tGreenplumConnection to
-
Connect the components in the Job:
- link tGreenplumConnection to tELTGreenplumMap using an OnSubjobOk trigger
- link tELTGreenplumMap to tGreenplumCommit using an OnSubjobOk trigger
- link tGreenplumCommit to tGreenplumInput using an OnSubjobOk trigger
- link tGreenplumInput to tLogRow using a Row
> Main connection
The two tELTGreenplumInput
components and tELTGreenplumOutput will be
linked to tELTGreenplumMap later once the
relevant tables have been defined.
Configuring the components
-
Double-click tGreenplumConnection to open
its Basic settings view in the Component tab.-
In the Host and
Port fields, enter
the context variables for the Greenplum server. -
In the Database field,
enter the context variable for the Greenplum database. -
In the Username and Password fields, enter the context variables for
the authentication credentials.
For more information on context variables, see
Talend Studio User
Guide. -
In the Host and
-
Double-click employee+statecode to open its
Basic settings view in the Component tab.-
In the Default table name field, enter
the name of the source table, namely employee_by_statecode. -
Click the […] button next to the
Edit schema field to open the schema
editor. -
Click the [+] button
to add three columns, namely id, name and statecode, with the data type as INT4, VARCHAR,
and INT4 respectively. -
Click OK to close the
schema editor. - Link employee+statecode to tELTGreenplumMap using the output employee_by_statecode.
-
In the Default table name field, enter
-
Double-click statecode to open its Basic settings view in the Component tab.
-
In the Default table
name field, enter the name of the lookup table, namely statecode.
-
In the Default table
-
Click the […] button next to the Edit schema field to open the schema editor.
-
Click the [+] button
to add two columns, namely state and statecode, with the data type as VARCHAR and INT4 respectively. -
Click OK to close the
schema editor. -
Link statecode to
tELTGreenplumMap
using the output statecode.
-
Click the [+] button
-
Click tELTGreenplumMap to open its Basic settings view in the Component tab.
-
Select the Use an existing
connection check box.
-
Select the Use an existing
-
Click the […] button next to the ELT Greenplum Map Editor field to open the map
editor. -
Click the [+] button on the upper left corner to open the table
selection box.-
Select tables employee_by_statecode and statecode in sequence and click Ok. The tables appear on the left panel of the
editor.
-
Select tables employee_by_statecode and statecode in sequence and click Ok. The tables appear on the left panel of the
-
On the upper right corner, click the [+]
button to add an output table, namely employee_by_state.-
Click Ok to close the
map editor.
-
Click Ok to close the
-
Double-click tELTGreenplumOutput to open its
Basic settings view in the Component tab.-
In the Default table
name field, enter the name of the output table, namely employee_by_state.
-
In the Default table
-
Click the […] button next to the Edit schema field to open the schema editor.
-
Click the [+] button
to add three columns, namely id, name and state, with the data type as INT4, VARCHAR,
and VARCHAR respectively. -
Click OK to close the
schema editor. -
Link tELTGreenplumMap
to tELTGreenplumOutput
using the table output employee_by_state. -
Click OK on the
pop-up window below to retrieve the schema of tELTGreenplumOutput.
ow the map editor’s output table employee_by_state shares the same schema as that of tELTGreenplumOutput. -
Click the [+] button
-
Double-click tELTGreenplumMap to open the map
editor.D.Drop the columns id and name from table employee_by_statecode as well as the column statecode from table statecode to their counterparts in the output table employee_by_state.Click Ok to close the map editor.-
Drop the column statecode from table employee_by_statecode to its counterpart
of the table statecode, looking for the records in the two tables that have the
same statecode values.
-
Drop the column statecode from table employee_by_statecode to its counterpart
-
Double-click tGreenplumInput to open its
Basic settings view in the Component tab.-
Select the Use an existing
connection check box. -
In the Table name
field, enter the name of the source table, namely employee_by_state. -
In the Query field,
enter the query statement, namely"SELECT * FROM "employee_by_state""
.
-
Select the Use an existing
-
Double-click tLogRow to open its Basic settings view in the Component tab.
-
In the Mode area,
select Table (print values in cells
of a table for a better display.
-
In the Mode area,
Executing the Job
- Press Ctrl+S to save the Job.
-
Press F6 to run the Job.
As shown above, the desired employee records have been written to the table
employee_by_state, presenting clearer
geographical information about the employees.