Rules and guidelines for dynamic schema handling in mappings
Rules and guidelines for dynamic schema handling in mappings
Consider the following general rules and guidelines when you enable dynamic schema change handling for Hive mappings:
You cannot configure dynamic schema handling if the target table is partitioned.
When you use a Hive partitioned table as the target, you cannot enable the Alter and Apply Changes and Drop Current and Recreate options for the task. If you enable the options and run the task, the task fails.
Alter and Apply Changes
Consider the following guidelines when you choose to alter and apply the changes to the target:
You cannot change the precision of the data type, except for target columns that are of the Varchar and Char data types. If the target is of the Varchar, String, and Char data types, you can only increase the precision but you cannot decrease the precision.
When you create a new target at runtime and you specify the Path property in the Create Target window and run the mapping using the Alter and Apply Changes dynamic schema handling option, the mapping fails. You must not specify the path to run the mapping successfully.
Drop Current and Recreate
Consider the following guidelines when you choose to drop and recreate the table:
If you configure a mapping to write to an existing Hive target and you choose to drop and recreate the table, the following properties are lost:
Field extensions such as bucket column and partition column metadata.
Record extensions such as the number of buckets, external or managed table, location, and table properties.
In this scenario, Data Integration creates a plain table in the Hive target.
If you configure a mapping to create a new target at runtime and you choose to drop and recreate the table, the partition and bucket information in the table is lost. Data Integration creates the table without the partition and bucket columns.