Table of Contents

Search

  1. Preface
  2. Introduction to Hive Connector
  3. Hive connections
  4. Mappings and mapping tasks with Hive Connector
  5. Migrating a mapping
  6. Data type reference
  7. Troubleshooting

Hive Connector

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

0 COMMENTS

We’d like to hear from you!