Multiple files in Fastload script

Teradata Applications

Multiple files in Fastload script

Hi Dieter,

can you please help me to load the data from two files to single target table using FASTLOAD.

below is the code:

 

sessions 2;

errlimit 25;

.logon username/password;

database supportdb;

drop table SUPPORTDB.emp_f1;

drop table supportdb.err_f1;

drop table supportdb.uv_f1;

CREATE TABLE SUPPORTDB.emp_f1

(

eno NUMBER(10,0),

ename VARCHAR(30),

sal NUMBER(10,0))

PRIMARY INDEX ( eno );

.SET RECORD VARTEXT ",";

define

eno (VARCHAR(30)),

ename (VARCHAR(30)),

sal (VARCHAR(30))

file='/users/mbukkala/practice_fastload/i3.txt';

show;

begin loading supportdb.emp_f1 errorfiles supportdb.err_f1,supportdb.UV_f1;

insert into supportdb.emp_f1 values

(

:eno,

:ename,

:sal)

;

file='/users/mbukkala/practice_fastload/i4.txt';

show;

begin loading supportdb.emp_f1 errorfiles supportdb.err_f2,supportdb.UV_f2;

insert into supportdb.emp_f1 values

(

:eno,

:ename,

:sal)

;

.end loading;

.logoff;

.quit;

Thanks in advance

Regards,

Malli

2 REPLIES

Re: Multiple files in Fastload script

Hi All,

Please help me on above issue.

Thanks in advance

Regards,

Malli

N/A

Re: Multiple files in Fastload script

Hi,

U can easily load the multiple input files into a single table using FASTLOAD.

After the .LOGOFF command repeat the loading process, i.e.; define another file for load and so on for other files.

Remember that after loading of every file use the .LOGOFF statement as this will pause the FASTLOAD process and then logon again using the .LOGON statement to load another file.

At last when all the files are loaded use the .END LOADING command, this will start the 2nd phase(Application Phase) in FASTLOAD.

Thanks.