Hitachi

Hitachi Advanced Database Command Reference


17.2.4 Relationship between the column structure information file and the input data

Depending on the specified content of the column structure information file, you can store only part of the input data in the table to be processed.

This subsection explains the patterns of input data to be stored in the table to be processed, and the handling of input data that is not destined to be stored.

Organization of this subsection

(1) Input data to be stored in the columns of the table to be processed

Depending on the specified content of the column structure information file, the data to be stored in the columns of the table to be processed varies.

The following two tables show, for each input data file, the relationship between the specified content of the column structure information file and the data to be stored.

Table 17‒10: Input data (in CSV format) to be stored in the table to be processed

No.

Specification of the column structure information file

Specification of the column structure information option or the value specified

Field data number used

Whether the data indicated by the field data number used exists in the input record

Input data to be stored

adbcolumninfo operand

-n option

-r option

1

Specified

Specified

Column name

Field data number

Value specified in the -r option

Exists

Data indicated by the field data number used

2

Does not exist

N

3

empty_string

--

--

Empty string

4

Not specified

The same number as the definition order of the column with the column name specified in the -n option

Exists

Data indicated by the field data number used

5

Does not exist

N

6

Not specified

--

--

The same number as the definition order of the column for which the adbcolumninfo operand was not specified

Exists

Data indicated by the field data number used

7

Does not exist

N

8

Not specified

--

--

--

The same number as the definition order of the column defined in the table to be processed

Exists

Data indicated by the field data number used

9

Does not exist

N

Legend:

N: A logical error occurs and no value is stored.

--: Not applicable

Table 17‒11: Input data (in fixed-length format) to be stored in the table to be processed

No.

Specification of the column structure information file

Specification of the column structure information option or the value specified

Input data to be stored

adbcolumninfo operand

-n option

-p option

1

Specified

Specified

Column name

Input data positional information

Data at the position indicated by the -p option

2

Not specified

N

3

Not specified

--

--

Empty string

4

Not specified

--

--

--

N

Legend:

N: Because specification of both the column structure information file and the -p option is required, an error occurs.

--: Not applicable

(2) Input data not destined to be stored in the table to be processed

When input data is not destined to be stored in the table to be processed, handling of the applicable data differs depending on the input data file format and whether the column structure information file is specified.

The following table shows handling of input data not destined to be stored in the table to be processed.

Table 17‒12: Handling of input data not destined to be stored in the table to be processed

No.

File format of the input data files

Specification of the column structure information file

Handling of input data not destined to be stored

1

CSV

Specified

The applicable data is read but not used during data storage.

2

Not specified

A logical error occurs because the number of columns in the input data is greater than the number of columns in the table to be processed.

3

Fixed-length

Specified

The applicable data is read but not used during data storage.

4

Not specified

An error occurs because specification of the column structure information option is required.

Note:

If an input data logical error occurs, take the necessary corrective action based on the explanation in 17.9.1 How to handle logical errors in input data.