Hive Connector > Mappings and mapping tasks with Hive Connector > Mapping in advanced mode example
  

Mapping in advanced mode example

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:
The mapping includes a source, filter, and target transformations that read from and write to a Hive table.
    1In Data Integration, click New > Mappings > Mapping.
    2In the Mapping Designer, click Switch to Advanced.
    The following image shows the Switch to Advanced button in the Mapping Designer:
    In the Mapping Designer, the header includes the Switch to Advanced button.
    3In 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.
    4 Enter a name, location, and description for the mapping.
    5Add a Source transformation, and specify a name and description in the general properties.
    6On the Source tab, perform the following steps to read data from the Hive source:
    1. aIn the Connection field, select the Hive connection.
    2. bIn the Source Object field, select single object as the source type.
    3. cIn the Object field, select the Sales object that has the billing details.
    4. dIn 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:
    The Hive source properties show the configured Sales object from where you read the data.
    7Add 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:
    The image shows the filter condition to filter records based on the customer name.
    8Add a Target transformation, and specify a name and description in the general properties.
    9On the Target tab, specify the details to write data to Hive:
    1. aIn the Connection field, select the Hive target connection.
    2. bIn the Target Type field, select single object.
    3. cIn the Object field, select the Hive object to which you want to write the filtered data.
    4. dIn the Operation field, select the insert operation.
    5. eIn the Advanced Properties section, specify the required advanced target properties.
    6. The following image shows the configured Hive Target transformation properties:
      The Hive target properties show the selected Hive target table where you want to write the data.
    10Click Save > Run to validate the mapping.
    In Monitor, you can monitor the status of the logs after you run the task.