Entering content frame

 DATALOAD Command 

With this Loader command, you can control the loading of application data.

Syntax

<dataload_statement> ::=
DATALOAD TABLE <
table_spec> [<duplicates_clause>] <load_column_spec_mlt> <instream_spec> [<longfile_spec_mlt>]

You can also use the keywords LOAD DATA instead of the keyword DATALOAD.

DATALOAD TABLE sqltravel00.customer
  cno         01-04
  name        06-16
  zip         17-22
  address     23-48
INSTREAM 'customer.data' FORMATTED

DATALOAD TABLE edemo.products
  productid     01-10 CHAR
  productname   11-51 CHAR
  unitinstock   52-55 INTEGER
  unitsonorder  56-59 INTEGER
  unitprice     60-67 DECIMAL (2)
INSTREAM 'products.data' FORMATTED

Additional Examples

Use

Like the FASTLOAD command, the DATALOAD command reads data from a data stream and writes it to the tables of a database instance.

DATALOAD commands are processed while the database is running.

A DATALOAD process lasts longer in total than a FASTLOAD process. The writing of the log entries, in particular, can lead to a loss of performance. If errors occur, you can undo DATALOAD entries, as the log entries can be evaluated.

Prerequisites

The table exists in the database instance. Otherwise, it must be created before the DATALOAD command is executed.

Process Flow

The Loader generates an internal mass INSERT statement from the DATALOAD command and then executes it.

During the load operation, all of the tables modified by this DATALOAD command can also be read and changed by other users.

Result

The data in the data stream has been loaded to the target table(s).All the changes made to the target table(s) as a result have also been written to the log area of the database instance.

Errors

If the load operation cannot be ended successfully, the Loader logs the last row that was inserted successfully in the table, the number of rows inserted, and the number of rows rejected in the log file.

 

Leaving content frame