All Forums Tools
kkvelmajala 8 posts Joined 02/09
09 Feb 2009
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.

langisser-7419 2 posts Joined 01/09
12 Feb 2009

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;

dnoeth 4628 posts Joined 11/04
12 Feb 2009

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

Dieter

feinholz 1234 posts Joined 05/08
11 Mar 2009

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 filesand sending them to an Update operator (which uses the MultiLoad protocol) to load Teradata.

--SteveF

You must sign in to leave a comment.