MLoad and multiple input files


MLoad and multiple input files

I'm not finding much in documentation, so I'll pose the question here:

Can you import multiple files simultaneously with a single mload? What is the limit?

I'm working with multiple source files, that are currently being loaded to individual staging tables. I'd like to 'join' these source files in the mload to a single staging table if possible. If it's doable, what's the limit to number of input files?

Any help here would be greatly appreciated! Thanks!

Re: MLoad and multiple input files

I ran the following test script which ran fine without any problem. I hope there should not be any problem inserting from multiple files into a single table as long as layout and other parameters are valid.

.logtable test1020;
.logon mltest,mldtest;

.begin mload tables test30;

.layout lo1;
.field a * integer;
.field b * integer;

.dml label lbl1;
insert into test30(:a,:b);

.dml label lbl2;
insert into test30(:a,:b);

.import infile c:\t10 layout lo1
apply lbl1;

.import infile c:\t20 layout lo1
apply lbl2;

.end mload;

Documentation says that there can be as many as 100 Import statements in a singel mload script. I assume, we can use upto 100 files in each of the import statements.ofcourse, there could be more restrictions that might be imposed here.

please refer to relevent documentation..I mean RTFM ;-)

Re: MLoad and multiple input files

to add on above:
Hi All,

Can anybody clear on below:

We are trying to load 3 files in 3 different tables within same multiload script.
As a part of impact analysis we have been asked if suppose 1 of file loading failed...will all the insert statements will be rolled back?
Basically we want to know :
1)These 3 inserts will be executed parallely or sequentiallly at RDBMS level?
2)Will these be part of same BT/ET or 3 different BT/ET will be submiited?
3)can we load multiple files into same table within same mload....will that be sequential or parallel....
4)insert...update ...delete on same table...will it be parallel or sequential

A sample script will help a lot for any of above scenarios
Teradata Employee

Re: MLoad and multiple input files

The example given above, with the multiple .IMPORT statements will actually execute those load tasks sequentially, not in parallel.

If you would like to load data from multiple files in parallel you would need to use a utility such as TPT.
-- SteveF