17.1.1 Functional overview
The adbimport command is used to import data into a table. If a range index has been defined for the target table, the command creates the range index while it is importing the table data. If a B-tree index or a text index has been defined for the target table, the command creates the B-tree index or text index after table data has been imported (if a primary key has been defined for the target table, the command creates the B-tree index corresponding to the primary key after the table data has been imported).
This series of processing steps is called the data import processing. The following figure provides an overview of data import processing.
|
- Explanation:
-
-
When the adbimport command is executed, the command imports the data contained in the input data files into a table.
If the table to be imported is a row store table, data in the input data files is stored in the database in row store format. If the table to be imported is a column store table, data in the input data files is stored in the database in column store format.
Note that if the table to be imported is a column store table, data in each column is compressed before being stored in the database. Multiple column-data compression types are available. The HADB server automatically selects the compression type based on the data in the input data files. However, if the column-data compression type is specified when a column store table is defined, column data is compressed with the specified compression type.
- Note
-
-
For details about row store tables and column store tables, see Row store tables and column store tables in the HADB Setup and Operation Guide.
-
For details about the types of column-data compression, see Column-data compression types for column store tables in Criteria for selecting row store tables and column store tables in the HADB Setup and Operation Guide.
-
-
If a range index has been defined for the table, the command creates the range index when it has finished storing the table data in each segment. If a B-tree index or a text index has been defined for the table, the command creates the B-tree index or text index after table data has been imported (if a primary key is defined for the table, the command creates the B-tree index corresponding to the primary key after it has finished importing the table data).
-
The following explains the files:
-
Input data files
These files store the data that is to be imported. You must create input data files in one of the following formats:
-
CSV format
-
Fixed-length format
For details about the CSV format, see 17.5 Format of input data files (CSV format specifications).
For details about the fixed-length format, see 17.6 Format of input data files (fixed-length format specifications).
The following compression files can also be used as input data files:
-
CSV-format file compressed in GZIP format
-
Fixed-length format file compressed in GZIP format
Files compressed in any other format cannot be used. For details about the compression format of input data files, see 17.7 Compression format of input data files.
- Note
-
The format of the input data files is the same regardless of whether the table to be imported is a row store table or column store table.
-
-
Input data path file
This file is used to specify a list of path names of the storage locations of the input data files.
-
Import option file
This file contains the options that are to be used to set up an execution environment for the adbimport command. The options specify information such as the output destination for the logical error data file.
-
Column structure information file
This file specifies the relationship between the target table and the input data. It is specified when there is a difference between the input data and the sort order of column definitions or the number of columns in the target table.
-
Temporary work files
These are work files that are created temporarily during data import processing. These files are deleted automatically when data import processing terminates normally.
-
Logical error data file
This file is used for the output of logical error data (such as data with invalid data lengths) contained in the input data files. For details about the logical error data file, see (1) Logical error data output function in 17.1.2 Optional functions of the adbimport command.