Sei sulla pagina 1di 2

Teradata MultiLoad Utility Introduction 01) Used for loading, updating or deleting data quickly 02) Slower than

FASTLOAD but more functional can load populated tables 03) Can support five populated tables 04) Ability to do INSERTS, UPDATES, DELETES and UPSERTS 05) Uses conditional logic for applying changes 06) Full Restart Capability 07) Supports INMODS 08) Two Distinct Tasks performed by MultiLoad a) IMPORT Task Default .BEGIN [IMPORT] MLOAD b) DELETE Task .BEGIN DELETE MLOAD 09) IMPORT Task a) Import a table and perform multiple SQL/DML statements of up to five tables depending on different conditions 10) MultiLoad IMPORT Task Phases a) Priliminary b) DML Transaction c) Aquisition d) Application e) Cleanup 11) MultiLoad IMPORT Task Source File Format a) BINARY b) FASTLOAD c) TEXT d) VARTEXT e) UNFORMAT 12) MultiLoad IMPORT Task Phase : Priliminary a) Validate all the statements b) Start all the sessions c) Create One Work Table for each Target Table d) Create two error tables for each Target Table e) Create re-start log f) Apply locks on the target table to prevent DDL operations g) ET_ For general errors h) UV_ For uniqueness violations 13) MultiLoad IMPORT Task Phase : DML Transaction a) Send DML prototype to Teradata Databaase b) Keep the DML details in the work table c) submits the DML statements specifying the insert, update and delete tasks to the Teradata RDBMS. 14) MultiLoad IMPORT Task Phase : Aquisition a) There is no acquisition phase activity for a MultiLoad delete task. b) Imports data from the specified input data source into work tables. c) Evaluates each record according to specified application conditions. (APPLY steps) d) Loads the selected records into the worktables. e) Concurrent DML in target tables is allowed 15) MultiLoad IMPORT Task Phase : Application a) Acquires locks (WRITE) on the specified target tables and views in the Teradata RDBMS. b) For an import task, inserts the data from the temporary work tables into the target tables

or views. c) For a delete task, deletes the specified rows from the target table in the Teradata RDBMS. d) Updates the error tables associated with each MultiLoad task. 16) MultiLoad IMPORT Task Phase : Cleanup a) Forces an automatic restart/rebuild if an AMP went down and came back online during the application phase. b) Releases all locks on the target tables and views. c) Drops the temporary work tables and all empty error tables from the Teradata RDBMS. d) Reports the transaction statistics associated with the import and delete tasks. e) LogTable is dropped (if ErrorCode = 0) 17) DELETE Task a) Execute a single DELETE statement on a single table b) Faster than SQL DELETE c) No transient journaling d) No rollback of work e) Restartable from checkpoint Features 01) Can limit the number of records 02) Error limit in number and percentage 03) CheckPoint option 04) Supports up to five populated tables with multiple operations with one pass of input file 05) Avoids Transient and Permanent Journaling overhead 06) Provides full restart capability 07) Allows for maximum access to table during processing (minimum locking) 08) Provides extensive processing statistics 09) Can perform UPSERTs Limitations 01) Limit of 15 FL/ML/FE runs at one time 02) Cannot process tables with Unique Secondary Indexes (USIs) or Referential Integrity (RI) defined 03) Import tasks require use of Primary Index 04) Concatenation of input data files is not allowed 05) Greater than double permanent space required to load data Note 01) In the case of a paused MultiLoad job, do not drop the work tables or the error tables until the MultiLoad utility completes. .IMPORT INFILE filename FORMAT UNFORMAT LAYOUT .IMPORT INFILE filename FORMAT VARTEXT '~' LAYOUT Multiload Graceful Termination 01) In the event that a MLOAD task is suspended or aborted before the application phase use the command a) RELEASE MLOAD dbname.tablename <in apply phase>; 02) RELEASE MLOAD is a SQL command and can be run from BTEQ only 03) Releases locks on Target table only 04) Once finished, need to drop error tables, work tables and restart log table

Potrebbero piacerti anche