vaibhav kumar
vaibhav kumar

Reputation: 11

Mload error While execution

When executing the below script for MLOAD m getting the below error in the putty :

    output:
    $ ./multiload.sh
    ./multiload.sh: .LOGTABLE:  not found.
    ./multiload.sh[2]: .logon:  not found.
    ./multiload.sh[4]: .begin:  not found.
    ./multiload.sh[5]: .layout:  not found.
    ./multiload.sh[6]: 0403-057 Syntax error at line 6 : `(' is not expected.

======= Script Starts Here===============

    Multiload.sh:

    .logtable ETLT5.INFA_SOURCE12_LOG
    .logon ttdbia/a0c9sx,blue@126;
   drop error,Work Tables
    .begin import mload tables ETLT5.INFA_SOURCE12 SESSIONS 20;
    .layout InputFile_layout;
     .field col1
    .dml label Table_InsertDML;
    .insert into ETLT5.INFA_SOURCE12

values

    .import infile /nas/infred/data/SrcFiles/fastload.txt
     format vartext  ','
     display errors
     layout InputFile_Layout
     apply Table_InsertDML;
    .end mload;
     .logoff;

I cannot find any useful link present on the internet ,for fastload there were too many but Mload has very less. Please help me in this .Thanks in Advance :)

Have tried the script from the provided links:

http://forgetcode.com/Teradata/1945-MULTILOAD-Example

Upvotes: 0

Views: 619

Answers (1)

dnoeth
dnoeth

Reputation: 60482

Each MLoad command must be preceded by a period and must end with a semicolon.

Each Teradata SQL command must end with a semicolon (and must be valid SQL).

.logtable ETLT5.INFA_SOURCE12_LOG -- missing semicolon
.logon ttdbia/a0c9sx,blue@126;
drop error,Work Tables  -- that's not valid SQL
.begin import mload tables ETLT5.INFA_SOURCE12 SESSIONS 20;
.layout InputFile_layout;
 .field col1 -- missing semicolon
.dml label Table_InsertDML;
.insert into ETLT5.INFA_SOURCE12 -- no period

 values -- which values?

.import infile /nas/infred/data/SrcFiles/fastload.txt
 format vartext  ','
 display errors
 layout InputFile_Layout
 apply Table_InsertDML;
.end mload;
 .logoff;

Why don't you look at the official Teradata docu?

MLoad Examples

Upvotes: 1

Related Questions