All Forums Teradata Applications
Jayakumar.mm 4 posts Joined 02/16
24 Feb 2016
Import Tab delimited file through Teradata fast load utility is not working.

I am facing an issue in executing below scritp  through fast load utility for tab delimited .txt file
1. First issue in .RECORD 1;
2. IF I remove .RECORD 1; from the code, I am getting "Specified string does not have matchSpecified string does not have match FDL4800 Invalid FastLoad statement" 
Please help on this issue.
 

.SESSION 4;

 

.LOGON server/user;

 

BEGIN LOADING TABLENAME

 

 

.RECORD 1;

 

.IMPORT INFILE name_arch FORMAT VARTEXT '09'XCV";

 

DEFINE

 

COLUMN1 VARCHAR (10)),

COLUMN2 VARCHAR (10)),

COLUMN3 VARCHAR (10)),

COLUMN4 VARCHAR (10)),

COLUMN5 VARCHAR (20)),

COLUMN6 VARCHAR (10)),

COLUMN7 VARCHAR (5)),

COLUMN8 VARCHAR (30)),

COLUMN9 VARCHAR (10)),

COLUMN10 VARCHAR (10)),

COLUMN11 VARCHAR (20)),

COLUMN12 VARCHAR (20)),

COLUMN13 VARCHAR (10)),

COLUMN14 VARCHAR (20)),

COLUMN15 VARCHAR (10))

 

FILE="C:\sample.txt"

 

.BEGIN LOADING TABLE_NAME

 

INSERT INTO TABLE_NAME

VALUES

(

:COLUMN1,

:COLUMN2,

:COLUMN3,

:COLUMN4,

:COLUMN5,

:COLUMN6,

:COLUMN7,

:COLUMN8,

:COLUMN9,

:COLUMN10,

:COLUMN11,

:COLUMN12,

:COLUMN13,

:COLUMN14,

:COLUMN15

);

 

END LOADING;

.LOGOFF;

dnoeth 4628 posts Joined 11/04
24 Feb 2016

There's a missing semicolon:

.BEGIN LOADING TABLENAME;
.RECORD 1;
.IMPORT INFILE name_arch FORMAT VARTEXT '09'XCV";

 

Dieter

Jayakumar.mm 4 posts Joined 02/16
24 Feb 2016

Thanks a lot. It works great now.

Jayakumar.mm 4 posts Joined 02/16
24 Feb 2016

Hi Team,
I am able to execute the script successfully now but 60% of records go to error table2 and only 40% records inserted into actual table. I am not able to find any difference in records inserted into error and actual table.
Please help to identify the issue.
 

Fred 1096 posts Joined 08/04
26 Feb 2016

Your target table has a Unique Primary Index and your input has multiple records with the same PI value. For each PI value, one row is loaded and the others go to Error Table 2.

You must sign in to leave a comment.