You can use the IMPORT USER command to import data that was exported specifically for a user. This imported data then belongs to the database user logged onto the database at the time of the import.
You have exported the required data using the corresponding EXPORT command.
<import_user_command> ::=
IMPORT USER
[<duplicates_clause>]
[<configuration_spec>]
<catalog_data_instream_part_spec>
[<package_spec>]
[<restart_spec>]
<catalog_data_instream_part_spec> ::=
<catalog_instream_spec>
|
<data_instream_part_spec>
|
<catalog_instream_spec>
<data_instream_part_spec>
IMPORT USER |
Imports the data that was user-specifically exported (database catalog and application data) |
IMPORT USER |
Imports the user-specific database catalog information belonging to the application |
IMPORT USER
[<duplicates_clause>] |
Imports the user-specific application data |
|
|
<duplicates_clause> |
REJECT DUPLICATES Default value: REJECT DUPLICATES |
<configuration_spec> |
CONFIGURATION <instream_csv_spec> |
<catalog_instream_spec> |
CATALOG <instream_ddl_spec> |
<data_instream_part_spec> |
DATA <instream_tableformat_spec> |
<package_spec> |
PACKAGE <outstream_csv_spec> |
<instream_csv_spec> |
|
<restart_spec> |
RESTART <package_guid> unsigned_integer: ID that is created by Loader for every command at runtime This integer is always 24 bytes long. See the SQL Reference Manual, Unsigned Integer (unsigned_integer) |
Examples
Loader Tutorial, IMPORT USER
You use the DUPLICATES rule to specify how to proceed when importing data from a data stream if a row with the same key as the new row already exists in the table. This rule is not evaluated if the data is imported into the database in the PAGES format.
REJECT DUPLICATES |
The new line is rejected with an error message. |
IGNORE DUPLICATES |
The new line is not inserted. |
UPDATE DUPLICATES |
The new line overwrites the existing line. |
Depending on whether database catalog and/or application data is imported, the following data streams are required for the import:
● Data stream with database catalog information: CATALOG <instream_ddl_spec>
● Data stream with application data: DATA <instream_tableformat_spec>
Only one of the two PAGES or RECORDS formats is possible for the data stream of the instream_tableformat_spec application data.
See also:
You can exclude tables from the import.
● If you do not specify a data stream by means of CONFIGURATION <instream_csv_spec>, all the application data is imported.
●
By specifying a
data stream using CONFIGURATION <instream_csv_spec>, you can exclude the application data of
selected tables from the import of the instream_tableformat_spec application data. The tables must be identified in
the data stream by specifying their schema and the table name.
The information about which tables are not imported is stored in the system
tables. You can display this information by displaying the system table
SYSLOADERTRANSFORMATIONMODEL. The tables excluded from the import of the
application data have the value TRUE in the EXCLUDE column.
The database catalog entries CATALOG <instream_spec> of all tables are always imported, regardless of the restrictions set using CONFIGURATION <instream_spec>.
You can export system table SYSLOADER.TRANSFORMATIONMODEL.
● If you specify a data stream by means of PACKAGE <outstream_csv_spec>, all entries of the SYSLOADER.TRANSFORMATIONMODEL table are exported to this data stream. We recommend you use this option to log the import process well.
● If you do not specify a data stream by means of PACKAGE <outstream_csv_spec>, the system table SYSLOADER.TRANSFORMATIONMODEL is not exported.
See also:
Additional Log Functions (package_spec)
You can restart the import.
The user can determine the package_guid of the corresponding import commands from the SYSLOADER.TRANSFORMATIONMODEL table or the log file. You can restart the command with the corresponding package_guid by using the restart_spec syntax element.
See also:
The application data and/or the database catalog are imported into the data_instream_part_spec and catalog_instream_spec data streams.
If necessary, all entries in the table SYSLOADER.TRANSFORMATIONMODEL are exported to the package_spec data stream.
The import cannot be completed successfully. In this case, the Loader logs the cause of the error in the log file.
The values PACKAGEGUID and CLIENTNODE are also written to the log file. The PACKAGEGUID is required if you want to restart the import.
See also: