cMap
Executes transformations (called maps) between different sources and destinations
by harnessing the capabilities of
Talend Data Mapper
, available in the
Mapping
perspective.
cMap transforms data from a wide
range of sources to a wide range of destinations. If you want to use
multiple inputs and/or outputs, you must use
Talend Data Mapper
I/O functions. For more
information, see
Talend Data Mapper
User Guide.
cMap Standard properties
These properties are used to configure cMap running in the Standard Job framework.
The Standard
cMap component belongs to the Transformation family.
The component in this framework is available when you have subscribed to one of
the Talend Platform products or Talend Data
Fabric.
Basic settings
Open Map Editor |
Click the […] button to open |
Map Path |
Specifies the map to be executed. Click the […] button next to |
Output Type |
From the drop-down list, select how you want the output to be
|
Advanced settings
Log Level |
From the drop-down list, select how often you want events to be
|
Exception Threshold |
From the drop-down list, select the severity level at which an
|
Usage
Usage rule |
cMap is used for Routes that |
Limitation |
Due to license incompatibility, one or more JARs required to use this component are not This limitation applies to maps that reference databases. |
For further information about performing transformations using
Talend Data Mapper
, see
Talend Data Mapper User
Guide.
Scenario: Mapping data with cMap
This scenario applies only to a subscription-based Talend Platform solution or Talend Data Fabric.
The following scenario creates a three-component Route, in which a cFile component visits a local file directory to copy its
contents, performs a transformation using a cMap
component, and then sends the files in the input directory to an output cFile component that writes the files in another
directory.
Copying an editable version of the example files
-
In the
Mapping
perspective, in
the Data Mapper view, expand the Hierarchical Mapper node and the Other Projects folder, right-click Examples and then select Copy in the contextual menu. -
In the Data Mapper view, right-click at the
root of the Hierarchical Mapper node, and then
select Paste in the contextual menu.This copies an editable version of all the read-only example files to your
local workspace.
Adding and linking the components
-
Click the point in the design workspace where you want to add the first
component, start typing cFile, and then click
the name of the component when it appears in the list proposed in order to
select it. -
Do the same to add a cMap component and a
second cFile component as well. -
Connect the cFile_1 component to the
cMap component using a Row > Route link, then connect the cMap component to the cFile_2 component using a second Row >
Route link.
Defining the properties of cFile_1
-
Select the cFile_1 component to define its
properties. -
In the Path field, browse to or enter the
path to where the input file is located. -
In the fileName field, enter the name of the
input file: PayPalPO.csv in this
example. - Leave the other parameters unchanged.
Defining the properties of cMap
-
Select the cMap component to define its
properties. -
Click the […] button next to the Map Path field to open the picker and select the map
to use, Maps/CSV/POPayPalCsv_PO2, then click
OK. This map transforms a CSV file into an
XML file.
Defining the properties of cFile_2
-
Select the cFile_2 component to define its
properties. -
In the Path field, browse to or enter the
path to where the output file is to be located. -
In the fileName field, enter a name for the
output file with the extension .xml. - Leave the other parameters unchanged.
Saving and executing the Route
- Press Ctrl+S to save your Route.
- In the Run tab, click Run to execute the Route.
-
Browse to the output directory on your file system to check that the input
files have been transformed and written in the output directory.