The Loader exports the data from databases into data streams or imports data from data streams into databases. The data can be transformed in this process.
A range of syntax elements are available for describing the data stream. These syntax elements can be used in the export and import commands.
<outstream_spec> ::= OUTSTREAM [<mediumtype_spec>] '<valSTREAM_NAME>' [<stream_format_spec>] [<stream_extract>]
<instream_spec> ::= INSTREAM [<mediumtype_spec>] '<valSTREAM_NAME>' [<stream_format_spec>] [<stream_extract>] [<noheader_spec>]
· You enter the keyword OUTSTREAM in the syntax rule outstream_spec to specify that the data is to be exported from a MaxDB database instance to a data stream.
· You enter the keyword INSTREAM in the syntax rule instream_spec to specify that the data is to be imported from a data stream to a MaxDB database instance.
<mediumtype_spec> |
Type of medium The data is
exported to the specified medium or imported from this medium. |
<valSTREAM_NAME> |
Name and path of the medium |
<stream_format_spec> |
Specification of the data format
|
<stream_extract> |
START <valSTART_POS> (MAXROWS |
MAXRECORDS) |
<valSTART_POS> |
Number of the first data record to be imported |
<valEND_POS> |
Number of the last data record to be imported |
<noheader_spec> |
NOHEADER <valRECORD_LENGTH> |
<valRECORD_LENGTH> |
Length of an individual data record in the data stream |
IMPORT TABLE hotel.room
DATA INSTREAM FILE 'room.data'
Data stream room.data is imported into table room. It contains application data.
Syntax rule stream_extract is only evaluated for EXPORT TABLE and IMPORT TABLE-commands if the data format is RECORDS, COMPRESSED or FORMATTED.
The meaning varies for EXPORT and IMPORT commands: In the case of an import you can specify from which data record from a data file how many data records are to be loaded. In the case of an export you can specify from data record of a table how many data records are to be exported.
The syntax rule noheader_spec is only evaluated for IMPORT TABLE commands if the data format is FORMATTED BINARY.
For data streams with binary values (FORMATTED BINARY) you can use noheader_spec to specify that the data stream does not have a special header containing the sizes of a data record. At the same time, you specify the length of an individual data record in the data stream.
If the data stream was generated with the EXPORT TABLE, it contains a special header with the length of an individual data record in the data stream.
If this header is missing, the Loader can use noheader_spec to specify the length of an individual data record. If this rule is missing, the Loader calculates the length of an individual data record using the information on the column positions in the load command.
The keywords CATALOG, DATA, CONFIGURATION and PACKAGE are used in the commands for exporting and importing to differentiate by the type of data that is exported or imported.
<catalog_outstream_spec> |
CATALOG <outstream_spec> |
<catalog_instream_spec> |
CATALOG <instream_spec> Data streams for the database catalog definitions |
<data_outstream_spec> |
DATA <outstream_spec> |
<data_instream_spec> |
DATA <instream_spec> Data streams for the application data |
<configuration_instream_spec> |
CONFIGURATION <instream_spec> The application data of selected tables can be excluded from the export or import |
<package_outstream_spec> |
PACKAGE <outstream_spec> Data streams with entries of system table TRANSFORMATIONMODEL |
See also: