Default: There is no default
REMAP_DATA parameter allows you to remap data as it is being inserted into a new database. A common use is to regenerate primary keys to avoid conflict when importing a table into a preexisting table on the target database.
You can specify a remap function that takes as a source the value of the designated column from either the dump file or a remote database. The remap function then returns a remapped value that will replace the original value in the target database.
The same function can be applied to multiple columns being dumped. This is useful when you want to guarantee consistency in remapping both the child and parent column in a referential constraint.
Syntax and Description
The description of each syntax element, in the order in which they appear in the syntax, is as follows:
schema: the schema containing the table to be remapped. By default, this is the schema of the user doing the import.
tablename: the table whose column will be remapped.
column_name: the column whose data is to be remapped.
schema: the schema containing the PL/SQL package you created that contains the remapping function. As a default, this is the schema of the user doing the import.
pkg: the name of the PL/SQL package you created that contains the remapping function.
function: the name of the function within the PL/SQL that will be called to remap the column table in each row of the specified table.
The data types of the source argument and the returned value should both match the data type of the designated column in the table.
Remapping functions should not perform commits or rollbacks except in autonomous transactions.
The use of synonyms as values for the
REMAP_DATA parameter is not supported. For example, if the
regions table in the
hr schema had a synonym of
regn, an error would be returned if you specified
regn as part of the
Remapping LOB column data of a remote table is not supported.
Columns of the following types are not supported by
REMAP_DATA: User Defined Types, attributes of User Defined Types, LONGs, REFs, VARRAYs, Nested Tables, BFILEs, and XMLtype.
The following example assumes a package named
remap has been created that contains a function named
plusx that changes the values for
first_name in the
> impdp hr DIRECTORY=dpump_dir1 DUMPFILE=expschema.dmp TABLES=hr.employees REMAP_DATA=hr.employees.first_name:hr.remap.plusx