4.4.1.8 Creating a Hive Target

To create Hive target:

  1. On the Catalog page, click Create New Item.
  2. Hover the mouse over Target and select Hive from the submenu.
  3. On the Type Properties screen, enter the following details:
    • Name: Enter a unique name for the target. This is a mandatory field.
    • Display Name: Enter a display name for the target. If left blank, the Name field value is copied.
    • Description
    • Tags
    • Target Type: The selected target is displayed.
  4. Click Next.
  5. On the Target Details screen, enter the following details:
    • Connection: Select a Hive connection from the drop-down list.
    • Table Name: Enter a table name for the external hive table to be created. The table is created in the database mentioned in the JDBC url.
    • HDFS Path: Enter the file path to write the Avro_OCF files. Data from these files are loaded into the external tables.
    • Schema File Path: Enter the HDFS path to write the Avro_OCF schema file. This schema file is used to derive the schema of the external hive table. Ensure that the Avro_ocf data file path and the schema file path are different.
    • File Roll Interval: Enter the roll-over interval to write a new file. The interval can be in 10ms, 10s, 10m, 1hr formats.

    • File Roll Max Size: Enter the roll-over file size to create a new file. The size can be in 1000, 10k, 10m, 1g formats.

  6. Click Next.
  7. On the Shape screen, select one of the methods to define the shape:
    • Select Existing Shape: Select one of the existing shapes from the drop-down list.

    • Manual Shape: Select this option to manually infer the fields from a stream or file. You can also add to, or remove fields from, an existing shape. Enter the following details:
      • Shape Name: Enter a name for the shape.
      • Key: Select key fields, based on which the data is partitioned.
      • Clear Fields: Click to delete all the fields in the shape.
      • Field Name: Add the necessary fields.
      • Field Type: Select the field data type from the drop-down list.
  8. Click Save.