PowerExchange for Hive User Guide

PowerExchange for Hive User Guide

Target Schema Strategy

Target Schema Strategy

When you write data to a Hive target, you can configure a target schema strategy. Click the
Advanced
tab configure the target schema strategy.
You can select one of the following target schema strategies:
RETAIN - Retain existing target schema
The Data Integration Service retains the existing target schema.
CREATE - Create or replace table at run time
The Data Integration Service drops the target table at run time and replaces it with a table based on a target table that you identify.
APPLYNEWCOLUMNS - Alter table and apply new columns only
The Data Integration Service alters the target table by applying new columns from the associated data object or mapping flow to the target table. If the mapping flow includes changes to existing columns in the target table, the Data Integration Service does not apply these changes to the target table. This option is applicable when you run the mapping in the native environment or on the Spark engine.
APPLYNEWSCHEMA - Alter table and apply new schema
The Data Integration Service alters the target table and applies the new schema from the associated data object or mapping flow to the target table. The Data Integration Service applies changes to existing columns and adds new columns to the target table based on the mapping flow. This option is applicable when you run the mapping in the native environment or on the Spark engine.
  • If you apply a new schema to a partitioned column in a Hive target, the mapping fails. You cannot drop or rename columns in a Hive target by using the APPLYNEWSCHEMA target schema strategy.
  • If a column is missing in the associated data object or mapping flow, then null values are inserted into the table.
FAIL - Fail mapping if target schema is different
The Data Integration Service fails the mapping if the target schema from the mapping flow is different from the schema of the target table. This option is applicable when you run the mapping in the native environment or on the Spark engine.
Assign Parameter
You can assign a parameter to represent the value for the target schema strategy and then change the parameter at run time.

0 COMMENTS

We’d like to hear from you!