17.1.2 Optional functions of the adbimport command
The adbimport command provides the following optional functions:
-
Logical error data output function
-
Re-execute facility that starts from the processing to create B-tree indexes and text indexes
-
Background-import facility
- Organization of this subsection
(1) Logical error data output function
When the adbimport command imports data, it imports only valid data. It does not import invalid data (logical error data). Any row of data that contains logically erroneous data is output to the logical error data file. You can correct logical error data that has been output to the logical error data file, and then re-execute the adbimport command to import the corrected data.
The following figure provides an overview of the logical error data output function.
- ■ About logical error data
-
The following constitute logical error data:
-
Data with an invalid data length
-
Data with invalid enclosing characters
-
Data resulting in an error during input data conversion processing
-
Input data to be imported does not exist
-
Input data containing more or fewer columns than exist in the table
-
Column data subject to the NOT NULL constraint that contains an empty string#
-
Input data files with an invalid format
- #
-
An empty string is a string that does not contain any field data in the input data.
-
(2) Re-execute facility that starts from the processing to create B-tree indexes and text indexes
Data import processing involves importing table data and then creating B-tree and text indexes. If the adbimport command terminates abnormally during B-tree and text index creation, the command restarts data import processing beginning with B-tree and text index creation when the command is re-executed. This reduces the time required to re-execute data import processing.
The following figure provides an overview of the re-execute facility that starts from the processing to create B-tree indexes and text indexes.
The re-execute facility that starts from the processing to create B-tree indexes and text indexes is applied when all of the following conditions are satisfied:
-
Either or both of the following indexes have been defined for the table to be imported:#
-
B-tree indexes (including when a primary key has been defined for the target table).
-
Text indexes
- #
-
If all the B-tree indexes and text indexes for the table to be processed are deleted before the adbimport command is re-executed, only command termination processing is performed.
-
-
The table data has been imported (when table data import processing is completed, the KFAA80203-I message is issued).
-
The processing was canceled for one of the following reasons:
-
The adbimport command terminated abnormally.
-
The adbcancel command was used to forcibly terminate the adbimport command.
-
The adbstop --force command was used to forcibly terminate the HADB server.
-
The server process was forcibly terminated by the OS's kill command or because of a power shutdown.
-
If the adbimport command stops while the table data is being imported (before the KFAA80203-I message is issued), the re-execute facility that starts from the processing to create B-tree indexes and text indexes is not applied.
If the adbimport command is re-executed with the --force option specified, data import processing is forcibly executed from the beginning, and therefore the re-execute facility that starts from the processing to create B-tree indexes and text indexes is not applied.
(3) Background-import facility
The background-import facility enables you to perform data retrieval and import processing on the same table concurrently (data is not subject to retrieval while it is undergoing background import processing).
The following figure provides an overview of the background-import facility.
The background-import facility is applied only if all the following conditions are satisfied:
-
CHUNK was specified when the table to be imported was defined. (The table to be imported is a multi-chunk table.)
-
The data import processing is performed in the addition mode (the -d option is omitted from the adbimport command).
-
The -b option is specified in the adbimport command.
-
The total of the number of chunks that will be created during the background import processing added to the number of chunks already created for the table so far will not exceed the value specified for CHUNK when the table was defined.
- Note
-
The following information is output to the message log file while the background import processing is being performed:
-
The remaining number of chunks that can be created for the table
-
The chunk IDs of the chunks that have been created during background import processing
-
- Note
-
- ■ Background import for creating chunks in wait status
-
If you want to exclude data imported by background import as a target of processing by data manipulation SQL statements, specify the --status wait option in addition to the -b option. Data is imported to chunks that are in wait status during background import processing.
Note that the PURGE CHUNK and TRUNCATE TABLE data manipulation SQL statements can be executed on chunks that are in wait status.