Mini-Batch Loading reads data directly from one or more external flat files and writes it to a Teradata Database table. Use this job type when the destination table is already populated, or has join indexes or other restrictions that prevent it from being accessed by the Load operator.
To circumvent the restrictions placed on use of the load operator by conditions in the target table, the job includes an intermediate step that temporarily loads the data into a staging table and then uses the DDL operator with INSERT…SELECT to move the data into the final destination table.
A mini-batch job requires three steps:
- The DDL operator sets up the staging table using the CREATE TABLE statement specified in the APPLY statement.
- The DataConnector reads the data from the flat files and the Load operator executes a high-speed load of the data into the staging table.
- The DDL operator is used again to insert rows from the staging table into the target table using a different DML statement, this time an INSERT…SELECT, in the APPLY statement.
For the sample script that corresponds to this job, see the following script in the sample/userguide directory:
PTS00013: Mini-Batch Loading into Teradata Database Tables.