17.2.2 Format of import options
- Organization of this subsection
(1) Specification format
Options related to outputting logical error data [set adb_import_errdata_file_name = logical-error-data-file-name] [set adb_import_errdata_num = maximum-number-of-output-logical-error-data-items] [set adb_import_errmsg_lv = {0|1}] Options related to performance [set adb_import_rthd_num = number-of-processing-real-threads-to-be-used-by-adbimport-command] [set adb_import_read_size = buffer-size] [set adb_import_buff_blk_num = number-of-buffer-blocks] [set adb_import_sort_buff_size = sort-buffer-size] [set adb_import_dividx_rd_buff_size = B-tree-and-text-index-input-buffer-size] [set adb_import_dividx_wt_buff_size = B-tree-and-text-index-output-buffer-size] [set adb_import_txt_buff_size = text-index-creation-buffer-size] [set adb_import_decompress_buff_size = buffer-size-for-decompressing-input-data-files-compressed-in-GZIP-format] Options related to input data [set adb_import_null_string = {DEFAULT|NULL}]
The specification rules for these import options are the same as for the server definitions. For details about the syntax rules for the server definition, see the topic Syntax rules for the server definition in the HADB Setup and Operation Guide.
(2) Explanation of specification format
(a) Options related to output of logical error data
- • adb_import_errdata_file_name = logical-error-data-file-name
-
~<OS path name>((2 to 510 bytes))
Specifies the absolute path name of the logical error data file. Any row data in the input data that contains a logical error is output to the logical error data file.
If this option is omitted, row data containing logical errors is not output to a file.
Make sure that the logical error data file name differs from all other file names. If the logical error data file has the same name as another file, data in the file might be lost. For details about the files whose names must differ from the logical error data file name, see 17.11 Notes.
- • adb_import_errdata_num = maximum-number-of-logical-error-data-items-that-can-be-output
-
~<integer>((1 to 4,294,967,295))<<100>>
Specifies the maximum number of logical error data items that can be output to the logical error data file. For example, if the value 200 is specified, the first 200 logical error data items are output to the file, but no subsequent logical error data items are output.
Note that the command continues import processing even after the number of logical error data items exceeds this option's value.
- • adb_import_errmsg_lv = {0|1}
-
Specifies whether messages indicating the causes of the logical errors are to be output when logical errors occur:
0: Output messages.
1: Do not output messages.
If this option is omitted, 0 is assumed, in which case messages indicating the causes of logical errors are output.
One message is output for each logical error. This means that many messages might be output if a lot of logical errors are detected.
Use the guidelines provided in the following table to determine how to specify the foregoing options related to output of logical error data.
No. |
Case |
Related import options |
Description |
---|---|---|---|
1 |
To correct logical error data and then import the corrected data |
|
Specify the options shown at the left to output logical error data to the logical error data file. |
2 |
Logical error data is not required (there is no need to correct and then import the data) |
|
Specify the options as shown at the left to suppress output of information about logical error data. If there are many logical error data items, a large amount of information related to logical error data would be output, thereby adversely affecting performance. In such a case, specify the import options as shown at the left to suppress output of information related to logical error data. |
3 |
To cancel import processing when logical error data is detected |
There is no need to specify import options. |
Execute the adbimport command with the -e option specified. If a logical error data is detected, importing is canceled and the transaction is rolled back (no data is imported). In this case, the return code is 8. For details about the -e option, see the explanation of the -e option in (3) Explanation of options in 17.2.1 Explanation of the specification format and options. |
(b) Options related to performance
- • adb_import_rthd_num = number-of-processing-real-threads-to-be-used-by-adbimport-command
-
~<integer>((2 to 4,096))
Specifies the number of processing real threads to be used for executing the adbimport command.
Specification of this option is recommended. The adbimport command uses the number of processing real threads specified by this option. Therefore, specify an appropriate number of processing real threads for use by the adbimport command. For details about the processing of the adbimport command that uses processing real threads and the number of processing real threads to be used for each step, see 17.1.3 Relationships among threads used by the adbimport command.
If this option is omitted, the number of processing real threads to be used for executing the adbimport command is determined by the adb_sql_exe_max_rthd_num operand in the server definition. The following table shows the relationship between the value of this option or the adb_sql_exe_max_rthd_num operand in the server definition and the number of processing real threads used for executing the command.
Table 17‒5: Number of processing real threads used for executing the command No.
Value in this option or in the server definition
Number of processing real threads used for executing the command
1
When this option is omitted
If the adb_sql_exe_max_rthd_num operand in the server definition is not specified
The default value of the adb_sql_exe_max_rthd_num operand in the server definition is used.
2
If 0 or 1 is specified in the adb_sql_exe_max_rthd_num operand in the server definition
--
3
If 2 or a greater value is specified for the adb_sql_exe_max_rthd_num operand in the server definition
The value specified for the adb_sql_exe_max_rthd_num operand in the server definition is used.
4
If 2 or a greater value is specified in this option
The value specified in this option is used.
- Legend:
-
--: The adbimport command results in an error.
- Note
-
For details about the adb_sql_exe_max_rthd_num operand in the server definition, see Operands related to performance (set format) in the HADB Setup and Operation Guide.
- Important
-
When you perform background import, the data storage efficiency might vary depending on the value specified for adb_import_rthd_num. For details about how to obtain a value to specify for adb_import_rthd_num that will improve the data storage efficiency, see Storing data in a multi-chunk table (background import) in the HADB Setup and Operation Guide.
- • adb_import_read_size = buffer-size
-
~<integer>((32 to 51,200)) <<1.024>> (kilobytes)
Specifies the size (in kilobytes) of the buffer to be used for reading the input data files. As a guideline, specify the following value:
(Number of records in the data to be imported × length of input data per row) ÷ 10,000
- • adb_import_buff_blk_num = number-of-buffer-blocks
-
~<integer>((5 to 4,096))<<64>>
Specifies the number of buffer blocks to be used for data import processing.
In general, you can use the default value, but a larger value might improve the performance of data import processing.
- • adb_import_sort_buff_size = sort-buffer-size
-
~<integer>((1 to 2,048))<<256>> (megabytes)
Consider specifying this option when B-tree or text indexes are defined for the table subject to import processing. The size (in megabytes) of the sort buffer to be used for building B-tree and text indexes is specified in this option.
Specify a large value if there is sufficient memory. Better performance can be expected as this option's value becomes larger.
- • adb_import_dividx_rd_buff_size = B-tree-and-text-index-input-buffer-size
-
~<integer>((32 to 51,200))<<1,024>> (kilobytes)
Consider specifying this option when B-tree and text indexes are defined for the table subject to import processing.
The size (in kilobytes) of the input buffer to be used for building B-tree and text indexes is specified in this option. Specify a large value if there is sufficient memory. Better performance can be expected as this option's value becomes larger.
- • adb_import_dividx_wt_buff_size = B-tree-and-text-index-output-buffer-size
-
~<integer>((32 to 51,200))<<1,024>> (kilobytes)
Consider specifying this option when B-tree and text indexes are defined for the table subject to import processing.
The size (in kilobytes) of the output buffer to be used for building B-tree and text indexes is specified in this option. Specify a large value if there is sufficient memory. Better performance can be expected as this option's value becomes larger.
- • adb_import_txt_buff_size = text-index-creation-buffer-size
-
~<integer>((1 to 2,048))<<256>> (megabytes)
Consider specifying this option when text indexes are defined for the table subject to import processing.
The size (in megabytes) of the buffer to be used for building text indexes is specified in this option.
Increasing the value specified for this option often improves performance. However, the amount of buffer memory specified by this option will be used for all processing real threads on which text indexes will be built. Therefore, be careful when you increase the value specified for this option.
- • adb_import_decompress_buff_size = buffer-size-for-decompressing-input-data-files-compressed-in-GZIP-format
-
~<integer>((32 to 51,200))<<1,024>> (kilobytes)
Specify the size (in kilobytes) of the buffer used for decompressing input data files compressed in GZIP format.
Use the value specified in the import option adb_import_read_size as a guideline for specifying this option.
When data of input data files compressed in GZIP format is imported, only the buffer amount specified in this option is used for decompressing the compressed data.
(c) Options related to input data
- • adb_import_null_string = {DEFAULT|NULL}
-
Specifies whether the default value for a column or the null value is to be stored when the input data to be stored in a column for which the DEFAULT clause was specified during table definition is the empty string.
- DEFAULT
-
Store the default value for the column. For details about the default values for columns, see the following topics:
-
Specification format and rules for the DEFAULT clause in DEFAULT clause in Constituent Elements in the manual HADB SQL Reference
-
Setting a default value for a column (DEFAULT clause) in Designing a table in Designing a Database in the HADB Setup and Operation Guide
-
- NULL
-
Store the null value.
If this option is omitted, DEFAULT is assumed; that is, when the input data is the empty string, the default value for the column will be stored.
For details about how to specify empty strings in the input data, see 17.5.3 Specification format of field data (CSV format) or 17.6.3 Specification format of field data (fixed-length format).