Hive Connector > Mappings, elastic mappings, and mapping tasks with Hive Connector > Hive sources in mappings and elastic mappings
  

Hive sources in mappings and elastic mappings

In a mapping or an elastic mapping, you can configure a Source transformation to represent a single Hive source or multiple Hive sources.
The following table describes the Hive source properties that you can configure in a Source transformation in mappings and elastic mappings:
Property
Description
Connection
Name of the source connection.
Source type
Type of the source object. Select one of the following types:
  • - Single Object. Select to specify a single Hive source object.
  • - Multiple Objects. Select to specify multiple Hive source objects.
  • - Parameter. Specify a parameter where you define values that you want to update without having to edit the task.
Object
Source object for a single source. You can specify a custom query for a source object.
Add Source Object
Primary source object for multiple sources.
Advanced Relationship
Defines the relationship between multiple source objects. You can use an equijoin between the objects.
Filter
Adds conditions to filter records. Configure a Not Parameterized or an Advanced filter.
Sort
Add conditions to sort records.
You can specify from the following sort conditions:
  • - Not parameterized. Select the fields and type of sorting to use.
  • - Parameterized. Use a parameter to specify the sort option.
  • - Sort Order. Sorts data in ascending or descending order, according to a specified sort condition.
The following table describes the Hive source advanced properties that you can configure in a Source transformation in mappings and elastic mappings:
Property
Description
SQL Override
When you read data from a Hive source object, you can configure SQL overrides and define constraints.
Note: If you insert a semi-colon at the end of the SQL statement that you provide, the task fails with an error.
Tracing Level
Amount of detail that appears in the log for the transformation.
Use the following tracing levels:
  • - Terse
  • - Normal
  • - Verbose Initialization
  • - Verbose
Default is normal.
PreSQL
SQL statement that you want to run before reading data from the source.
PostSQL
SQL statement that you want to run after reading data from the source.

Adding multiple Hive source objects

You need to create a connection before getting started with a mapping task.
The following steps help you to set up a mapping task in Data Integration:
    1. Click New > Mappings.
    2. Select Mapping and click Create.
    3. In the Source Properties page, specify the name and provide a description in the General tab.
    In the figure, specify the name and description in the general tab.
    4. Click the Source tab.
    5. Select the source connection and source type as Multiple Objects to be used for the task.
    Select the source type as multiple objects.
    6. In the Objects and Relationships section, click the arrow to open the Action menu and then select Add Source Object.
    Select add source object in the objects and relationships section.
    7. Select a source object from the list and click OK.
    Select a source object from the list and click OK.
    8. In the Objects and Relationships section, click the arrow next to the source object and then click Advanced Relationship to add related objects.
    Click Advanced relationship to add related objects.
    9. In the Advanced Relationship page, click Add Object. Click Add Object.
    The Select Source Object page appears.
    10. Select an object from the list and click OK.
    Select source object from the list.
    11. In the Advanced Relationship page, select the required fields for the objects and establish an equijoin relationship between them.
    12. Click OK.