You can create a mapping in advanced mode to achieve faster performance when you read from and write data to a Hive table.
To create a mapping in advanced mode, create a mapping and then update the mapping canvas in the Mapping Designer. You can then choose to add transformations to process the data that you read from the source and then write the data to the Hive table.
The following example illustrates how to configure a mapping in advanced mode that reads data from a Hive table, filters the data based on a customer name before writing to the Hive target table:
In Data Integration, click
New
Mappings
Mapping
.
In the Mapping Designer, click
Switch to Advanced
.
The following image shows the
Switch to Advanced
button in the Mapping Designer:
In the
Switch to Advanced
dialog box, click
Switch to Advanced
.
The Mapping Designer updates the mapping canvas to display the transformations and functions that are available in advanced mode.
Enter a name, location, and description for the mapping.
Add a Source transformation, and specify a name and description in the general properties.
On the
Source
tab, perform the following steps to read data from the Hive source:
In the
Connection
field, select the Hive connection.
In the
Source Object
field, select single object as the source type.
In the
Object
field, select the Sales object that has the billing details.
In the
Advanced Properties
section, specify the required parameters.
The following image shows the configured Source transformation properties that reads the billing data from the Hive object:
Add a Filter transformation, and on the
Filter
tab, define an expression to filter the records based on the customer name:
The following image shows the configured Filter transformation properties:
Add a Target transformation, and specify a name and description in the general properties.
On the
Target
tab, specify the details to write data to Hive:
In the
Connection
field, select the Hive target connection.
In the
Target Type
field, select single object.
In the
Object
field, select the Hive object to which you want to write the filtered data.
In the
Operation
field, select the insert operation.
In the
Advanced Properties
section, specify the required advanced target properties.
The following image shows the configured Hive Target transformation properties:
Click
Save
Run
to validate the mapping.
In Monitor, you can monitor the status of the logs after you run the task.