一般的なオプションの選択は次のとおりです。
mload -r '.RUN FILE mld.startup;' < infilename >outfilename
ログオン内容の例
.LOGTABLE SAMPLESCRIPT_LOG; .LOGON NODEID/mlntuser,mlntuser;
MLOADジョブの例
DROP TABLE WT_ML0020; DROP TABLE ET_ML0020; DROP TABLE UV_ML0020; DROP TABLE ML0020; CREATE TABLE ML0020,FALLBACK( F1 INTEGER, F2 BYTEINT, F3 SMALLINT, F4 INTEGER, F5 BIGINT, F6 DECIMAL(9,2), F7 FLOAT) primary index(F1); .BEGIN IMPORT MLOAD TABLES ML0020 SESSIONS 4; .LAYOUT LAY1A; .FIELD FF1 * INTEGER; .FIELD FF2 * FLOAT; .FIELD FF3 * FLOAT; .FIELD FF4 * FLOAT; .FIELD FF5 * FLOAT; .FIELD FF6 * FLOAT; .FIELD FF7 * FLOAT; .DML LABEL LABELA; INSERT INTO ML0020 VALUES(:FF1,:FF2,:FF3,:FF4,:FF5,:FF6,:FF7); .IMPORT INFILE INDAT94 LAYOUT LAY1A APPLY LABELA; .END MLOAD; .LOGOFF;
サンプル コマンド:
mload -r ".run file logon;" < samplescript
サンプル出力
======================================================================== = = = MultiLoad Utility Release MLOD.17.10.00.02 = = Platform WIN 64-bit = = PID 1632 = = = ======================================================================== = = = Copyright 1990-2021 Teradata Corporation. ALL RIGHTS RESERVED. = = = ======================================================================== **** 11:48:23 UTY2411 Processing start date: WED APR 17, 2021 ======================================================================== = = = Logon/Connection = = = ======================================================================== **** 11:48:25 UTY8400 Teradata Database Release: 17.10.00.00 **** 11:48:25 UTY8400 Teradata Database Version: 17.10.00.00 **** 11:48:25 UTY8400 Default character set: ASCII **** 11:48:25 UTY8400 Current RDBMS has interval support **** 11:48:25 UTY8400 Current RDBMS has UDT support **** 11:48:25 UTY8400 Current RDBMS has Large Decimal support **** 11:48:25 UTY8400 Current RDBMS has TASM support **** 11:48:25 UTY8400 Maximum supported buffer size: 1M **** 11:48:25 UTY8400 Data Encryption supported by RDBMS server **** 11:48:27 UTY6211 A successful connect was made to the RDBMS. **** 11:48:27 UTY6217 Logtable 'FLUSER.SAMPLESCRIPT_LOG' has been created. ======================================================================== = = = Processing Control Statements = = = ======================================================================== 0004 DROP TABLE WT_ML0020; **** 11:48:28 UTY1008 RDBMS failure: 3807, Object 'WT_ML0020' does not exist. 0005 DROP TABLE ET_ML0020; **** 11:48:28 UTY1008 RDBMS failure: 3807, Object 'ET_ML0020' does not exist. 0006 DROP TABLE UV_ML0020; **** 11:48:29 UTY1008 RDBMS failure: 3807, Object 'UV_ML0020' does not exist. 0007 DROP TABLE ML0020; **** 11:48:31 UTY1016 'DROP' request successful. 0008 CREATE TABLE ML0020,FALLBACK( F1 INTEGER, F2 BYTEINT, F3 SMALLINT, F4 INTEGER, F5 BIGINT, F6 DECIMAL(9,2), F7 FLOAT) primary index(F1); **** 11:48:32 UTY1016 'CREATE' request successful. 0009 .BEGIN IMPORT MLOAD TABLES ML0020 SESSIONS 4; ======================================================================== = = = Processing MultiLoad Statements = = = ======================================================================== 0010 .LAYOUT LAY1A; 0011 .FIELD FF1 * INTEGER; 0012 .FIELD FF2 * FLOAT; 0013 .FIELD FF3 * FLOAT; 0014 .FIELD FF4 * FLOAT; 0015 .FIELD FF5 * FLOAT; 0016 .FIELD FF6 * FLOAT; 0017 .FIELD FF7 * FLOAT; 0018 .DML LABEL LABELA; 0019 INSERT INTO ML0020 VALUES(:FF1,:FF2,:FF3,:FF4,:FF5,:FF6,:FF7); 0020 .IMPORT INFILE INDAT94 LAYOUT LAY1A APPLY LABELA; 0021 .END MLOAD; ======================================================================== = = = MultiLoad Initial Phase = = = ======================================================================== **** 11:48:32 UTY0829 Options in effect for this MultiLoad import task: . Sessions: 4 session(s). . Checkpoint: 15 minute(s). . Tenacity: 4 hour limit to successfully connect load sessions. . Errlimit: No limit in effect. . AmpCheck: In effect for apply phase transitions. **** 11:48:32 UTY0817 MultiLoad submitting the following request: Select NULL from FLUSER.SAMPLESCRIPT_LOG where (LogType = 125) and (Seq = 1) and (MloadSeq = 0); **** 11:48:32 UTY0817 MultiLoad submitting the following request: Select NULL from FLUSER.SAMPLESCRIPT_LOG where (LogType = 120) and (Seq = 1); **** 11:48:37 UTY0817 MultiLoad submitting the following request: SET QUERY_BAND='UTILITYNAME=MULTLOAD;' UPDATE FOR SESSION; **** 11:48:37 UTY0817 MultiLoad submitting the following request: CHECK WORKLOAD FOR BEGIN MLOAD ML0020; **** 11:48:37 UTY0817 MultiLoad submitting the following request: CHECK WORKLOAD END; **** 11:48:41 UTY0812 MLOAD session(s) requested: 4. **** 11:48:41 UTY0815 MLOAD session(s) connected: 4. **** 11:48:41 UTY0817 MultiLoad submitting the following request: BEGIN MLOAD ML0020 WITH INTERVAL; **** 11:48:42 UTY0817 MultiLoad submitting the following request: INS FLUSER.SAMPLESCRIPT_LOG (LogType, Seq, MLoadSeq)VALUES(130, 1, 10); **** 11:48:42 UTY0817 MultiLoad submitting the following request: MLOAD ML0020 with WT_ML0020 errortables ET_ML0020, UV_ML0020; ======================================================================== = = = MultiLoad DML Transaction Phase = = = ======================================================================== **** 11:48:43 UTY0817 MultiLoad submitting the following request: BT; **** 11:48:43 UTY0817 MultiLoad submitting the following request: USING FF1(INTEGER), FF2(FLOAT), FF3(FLOAT), FF4(FLOAT), FF5(FLOAT), FF6(FLOAT), FF7(FLOAT) INSERT INTO ML0020 VALUES(:FF1,:FF2,:FF3,:FF4,:FF5,:FF6,:FF7); **** 11:48:43 UTY0817 MultiLoad submitting the following request: INS FLUSER.SAMPLESCRIPT_LOG (LogType, Seq, MLoadSeq)VALUES(130, 1, 20); **** 11:48:43 UTY0817 MultiLoad submitting the following request: ET; ======================================================================== = = = MultiLoad Acquisition Phase = = = ======================================================================== **** 11:48:44 UTY0817 MultiLoad submitting the following request: BEGIN TRANSACTION; **** 11:48:44 UTY0817 MultiLoad submitting the following request: CHECKPOINT LOADING INTERVAL 0; **** 11:48:44 UTY0817 MultiLoad submitting the following request: CHECKPOINT LOADING INTERVAL 0; **** 11:48:45 UTY0817 MultiLoad submitting the following request: CHECKPOINT LOADING INTERVAL 0; **** 11:48:47 UTY0817 MultiLoad submitting the following request: USING Ckpt(VARBYTE(1024)) INSERT FLUSER.SAMPLESCRIPT_LOG (Logtype, Seq, MLoadSeq, MLoadImpSeq, MLoadSrcSeq, MiscInt1,MiscInt2,MiscInt3,MiscInt4, MiscInt5,MiscInt6,MiscInt7,MiscInt8,CkptInterval,byteflag,MLoadCkpt) VALUES (110, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, :Ckpt); **** 11:48:47 UTY0817 MultiLoad submitting the following request: CHECKPOINT LOADING INTERVAL 0; **** 11:48:49 UTY0817 MultiLoad submitting the following request: USING Ckpt(VARBYTE(1024)) INSERT FLUSER.SAMPLESCRIPT_LOG (Logtype, Seq, MLoadSeq, MLoadImpSeq, MLoadSrcSeq, MiscInt1,MiscInt2,MiscInt3,MiscInt4, MiscInt5,MiscInt6,MiscInt7,MiscInt8,CkptInterval,byteflag,MLoadCkpt) VALUES (110, 1, 1, 1, 0, 5, 5, 5, 5, 0, 0, 0, 0, 0, 1, :Ckpt); **** 11:48:49 UTY0826 A checkpoint has been taken, recording that end of file has been reached for IMPORT 1 of this MultiLoad Import task. **** 11:48:49 UTY0817 MultiLoad submitting the following request: CHECKPOINT LOADING INTERVAL 1; **** 11:48:50 UTY0817 MultiLoad submitting the following request: USING Ckpt(VARBYTE(1024)) INSERT FLUSER.SAMPLESCRIPT_LOG (Logtype, Seq, MLoadSeq, MLoadImpSeq, MLoadSrcSeq, MiscInt1,MiscInt2,MiscInt3,MiscInt4, MiscInt5,MiscInt6,MiscInt7,MiscInt8,CkptInterval,byteflag,MLoadCkpt) VALUES (110, 1, 2, 1, 0, 5, 5, 5, 5, 0, 0, 0, 0, 1, 1, :Ckpt); **** 11:48:50 UTY1803 Import processing statistics . IMPORT 1 Total thus far . ========= ============== Candidate records considered:........ 5....... 5 Apply conditions satisfied:.......... 5....... 5 Candidate records not applied:....... 0....... 0 Candidate records rejected:.......... 0....... 0 **** 11:48:50 UTY1821 Aquisition Phase statistics Elapsed time: 00:00:06 CPU time: 0 Seconds MB/sec: 4.33333e-005 MB/cpusec: N/A **** 11:48:50 UTY0817 MultiLoad submitting the following request: CHECKPOINT LOADING INTERVAL 1; **** 11:48:52 UTY0817 MultiLoad submitting the following request: CHECKPOINT LOADING INTERVAL 1 END; **** 11:48:53 UTY0817 MultiLoad submitting the following request: INS FLUSER.SAMPLESCRIPT_LOG (LogType, Seq, MLoadSeq)VALUES(130, 1, 30); **** 11:48:53 UTY0817 MultiLoad submitting the following request: ET; ======================================================================== = = = MultiLoad Application Phase = = = ======================================================================== **** 11:48:53 UTY0817 MultiLoad submitting the following request: EXEC MLOAD ML0020; **** 11:48:54 UTY0818 Statistics for table ML0020: Inserts: 5 Updates: 0 Deletes: 0 **** 11:48:54 UTY1822 Application Phase statistics Elapsed time: 00:00:01 **** 11:48:54 UTY0817 MultiLoad submitting the following request: INS FLUSER.SAMPLESCRIPT_LOG (LogType, Seq) VALUES (115, 1) **** 11:48:54 UTY0817 MultiLoad submitting the following request: BEGIN TRANSACTION; **** 11:48:54 UTY0817 MultiLoad submitting the following request: END MLOAD; **** 11:48:55 UTY0817 MultiLoad submitting the following request: INS FLUSER.SAMPLESCRIPT_LOG (LogType, Seq) VALUES (120, 1) **** 11:48:55 UTY0817 MultiLoad submitting the following request: USING Ckpt(VARBYTE(1024)) INS FLUSER.SAMPLESCRIPT_LOG (LogType, Seq, MLoadCkpt)VALUES(135, 1, :Ckpt); **** 11:48:55 UTY0817 MultiLoad submitting the following request: END TRANSACTION; ======================================================================== = = = MultiLoad Task Cleanup = = = ======================================================================== **** 11:48:56 UTY0817 MultiLoad submitting the following request: SELECT CAST(COUNT(*) AS BIGINT) FROM ET_ML0020; **** 11:48:56 UTY0821 Error table ET_ML0020 is EMPTY, dropping table. **** 11:48:56 UTY0817 MultiLoad submitting the following request: BEGIN TRANSACTION; **** 11:48:57 UTY0817 MultiLoad submitting the following request: INS FLUSER.SAMPLESCRIPT_LOG (LogType, Seq, MLoadSeq)VALUES(125, 1, 1) **** 11:48:57 UTY0817 MultiLoad submitting the following request: DROP TABLE ET_ML0020; **** 11:48:57 UTY0817 MultiLoad submitting the following request: END TRANSACTION; **** 11:48:58 UTY0817 MultiLoad submitting the following request: SELECT CAST(COUNT(*) AS BIGINT) FROM UV_ML0020; **** 11:48:58 UTY0821 Error table UV_ML0020 is EMPTY, dropping table. **** 11:48:58 UTY0817 MultiLoad submitting the following request: BEGIN TRANSACTION; **** 11:48:58 UTY0817 MultiLoad submitting the following request: INS FLUSER.SAMPLESCRIPT_LOG (LogType, Seq, MLoadSeq)VALUES(125, 1, 2) **** 11:48:58 UTY0817 MultiLoad submitting the following request: DROP TABLE UV_ML0020; **** 11:48:59 UTY0817 MultiLoad submitting the following request: END TRANSACTION; **** 11:48:59 UTY0817 MultiLoad submitting the following request: BEGIN TRANSACTION; **** 11:48:59 UTY0817 MultiLoad submitting the following request: INS FLUSER.SAMPLESCRIPT_LOG (LogType, Seq, MLoadSeq)VALUES(125, 1, 3) **** 11:48:59 UTY0817 MultiLoad submitting the following request: DROP TABLE WT_ML0020; **** 11:49:00 UTY0817 MultiLoad submitting the following request: END TRANSACTION; **** 11:49:00 UTY0825 Error table statistics for: Target table 1: ML0020 Number of Rows Error Table Name ==================== ================================================== 0 ET_ML0020 0 UV_ML0020 **** 11:49:00 UTY0817 MultiLoad submitting the following request: BEGIN TRANSACTION; **** 11:49:00 UTY0817 MultiLoad submitting the following request: USING Ckpt(VARBYTE(1024)) INS FLUSER.SAMPLESCRIPT_LOG (LogType, Seq, MLoadCkpt)VALUES(140, 1, :Ckpt); **** 11:49:01 UTY0817 MultiLoad submitting the following request: INS FLUSER.SAMPLESCRIPT_LOG (LogType, Seq) VALUES (125, 1) **** 11:49:01 UTY0817 MultiLoad submitting the following request: END TRANSACTION; **** 11:49:02 UTY0822 MultiLoad processing complete for this MultiLoad import task. ======================================================================== = = = MultiLoad Task Complete = = = ======================================================================== **** 11:49:04 UTY1024 Session modal request, 'SET QUERY_BAND='UTILITYNAME=MULTLOAD;' UPDATE FOR SESSION;', re-executed. ======================================================================== = = = Processing Control Statements = = = ======================================================================== 0022 .LOGOFF; ======================================================================== = = = Logoff/Disconnect = = = ======================================================================== **** 11:49:05 UTY6216 The restart log table has been dropped. **** 11:49:05 UTY6212 A successful disconnect was made from the RDBMS. **** 11:49:05 UTY2410 Total processor time used = '0.609375 Seconds' . Start : 11:48:23 - WED APR 17, 2021 . End : 11:49:05 - WED APR 17, 2021 . Highest return code encountered = '0'.