When you add a mapping or a mapping configured in advanced mode to a mapping task, you can choose how Data Integration handles changes in the data object schemas. To refresh the schema every time the task runs, you can enable dynamic schema handling in the task.
A schema change includes one or more of the following changes to the data object:
•Fields added, deleted, or renamed.
•Fields updated for precision.
Configure schema change handling on the Runtime Options page when you configure the task.
The following table describes the schema change handling options:
Option
Description
Asynchronous
Default. Data Integration refreshes the schema when you edit the mapping or task, and when Informatica Intelligent Cloud Services is upgraded.
Dynamic
Data Integration refreshes the schema every time the task runs.
You can choose from the following options to refresh the schema:
- Alter and apply changes.Data Integration applies the following changes from the source schema to the target schema:
- New fields: Alters the target schema and adds the new fields from the upstream transformation.
- Renamed fields: Adds renamed fields as new columns in the target.
- Precision updates. Applies these changes to the target.
- Deleted fields: Ignores deleted fields.
- Drop current and recreate. Drops the existing target table and then recreates the target table at runtime using all the incoming metadata fields from the upstream transformation.
- Don't apply DDL changes.Data Integration does not apply the schema changes to the target.
For more information, see the "Schema change handling" topic in Tasks in the Data Integration help.
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.