Hitachi

Hitachi Advanced Database Command Reference


14.3.4 Exporting data for specific chunk IDs to files compressed in GZIP format

In this example, table data is exported under the following conditions:

[Figure]

This example uses the following procedure to execute the adbexport command.

Procedure
  1. Create an output data path file.

  2. Create an export option file.

  3. Execute the adbexport command.

Using examples, the following subsections explain each of these steps.

Organization of this subsection

(1) Creating an output data path file

In this example, an output data path file is created, in which paths for all the output data files are specified.

Example specification of an output data path file
/mnt/diska/wwwww/exp1.csv.gz
/mnt/diskb/xxxxx/exp2.csv.gz
/mnt/diskc/yyyyy/exp3.csv.gz
/mnt/diskd/zzzzz/exp4.csv.gz
Explanation:

When exporting to a file containing table data compressed in GZIP format, we recommend that you specify the file extension .gz at the end of the absolute path of the output data file. Specifying the file extension .gz at the end of the path makes it easier to identify the exported file as a GZIP-format file.

(2) Creating an export option file

In this example, an export option file is created, in which export options are specified.

Example specification of an export option file
set adb_export_rthd_num = 3           ...1
set adb_export_scan_buff_size = 64    ...2
Explanation:
  1. Specifies the number of processing real threads to be used for executing the adbexport command.

  2. Specifies the size of the buffer to be used for retaining table data search results.

(3) Executing the adbexport command

adbexport -u ADBUSER01                             ...1
          -p '#HelloHADB_01'                       ...2
          -z /home/adbmanager/exp_file/env01.txt   ...3
          -n TABLE01                               ...4
          -c 10                                    ...5
          --compress GZIP                          ...6
          /home/adbmanager/exp_file/expf01.txt     ...7
Explanation:
  1. Specifies the authorization identifier of the HADB user who executes the adbexport command.

  2. Specifies the password for the authorization identifier that is specified in the -u option.

  3. Specifies the absolute path name of the export option file created in (2) Creating an export option file.

  4. Specifies the table to be processed.

  5. Specifies the chunk ID.

  6. Specifies the option to compress the output data file in GZIP format.

  7. Specifies the absolute path name of the output data path file created in (1) Creating an output data path file.