loading multiple files using multiload

Tools
Enthusiast

loading multiple files using multiload

Hi,

my requirement is , I am getting some files every day to unix server and I need to load them to teradata tables using multiload . I need to develop a shell script which will read the files from the particuler directory and pass to multiload . please can any one help in this how to pass the shell variable to multiload script. It is very easy in oracle sqlloader but i dont know how to do it in teradata multiload the input file is stored in the script. please can any one help in this.
Thank you.
3 REPLIES

Re: loading multiple files using multiload

Use .IMPORT statement for multiple input file as you need. See example below

.IMPORT
INFILE ${filename1}
FORMAT VARTEXT DISPLAY ERRORS NOSTOP
LAYOUT LAYOUT_LABEL
APPLY DML_LABELL;
.IMPORT
INFILE ${filename2}
FORMAT VARTEXT DISPLAY ERRORS NOSTOP
LAYOUT LAYOUT_LABEL
APPLY DML_LABEL;
.IMPORT
INFILE ${filename3}
FORMAT VARTEXT DISPLAY ERRORS NOSTOP
LAYOUT LAYOUT_LABEL
APPLY DML_LABEL;

Senior Apprentice

Re: loading multiple files using multiload

MLoad allows just up to 4 files within a script.
If you got lots of small files better use the Named Pipes Access Module instead and concat all the files into that.

Dieter
Teradata Employee

Re: loading multiple files using multiload

I believe MultiLoad supports more than just 4 IMPORT statements.

Another option to think about is TPT, which has the capability of reading entire diirectories of files
and sending them to an Update operator (which uses the MultiLoad protocol) to load Teradata.

-- SteveF