When you add a mapping 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 data type, precision, or scale.
Configure schema change handling in the Advanced Options section on the Runtime Options tab when you configure the task. You can configure asynchronous or dynamic schema change handling.
When you configure dynamic schema change handling, 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 source.
- Renamed fields. Adds renamed fields as new columns in the target.
- Data type and precision updates. Applies these changes to the target. Updates to the scale are not applicable.
- Deleted fields. Ignores deleted fields.
Don't apply DDL changes
Data Integration does not apply the schema changes to the target.
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 source.
Rules and guidelines for dynamic schema handling
Consider the following rules and guidelines when you enable dynamic schema change handling:
•Do not include an override for the target or source from the advanced properties. If the mapping is enabled for dynamic schema handling and contains a source or target override, the mapping fails with the following error: Exception: class java.lang.NullPointerException occurred in writeMetadata
However, you can specify an SQL override in mappings enabled for dynamic schema handling.