Question regarding Fastload

Database

Question regarding Fastload

I have created a test fast load file to load fixed width file.  

SESSIONS 64 2 ;
LOGON ip/user,pwd;
DATABASE DT_DQM ;
Drop table DT_DQM.TEST1234 ;

CREATE SET TABLE DT_DQM.TEST1234 ,NO FALLBACK ,     NO BEFORE JOURNAL,     NO AFTER JOURNAL,     CHECKSUM = DEFAULT    
(
Field001 VARCHAR(2) CHARACTER SET LATIN NOT CASESPECIFIC,     
Field002 VARCHAR(10) CHARACTER SET LATIN NOT CASESPECIFIC,     
SECNAM VARCHAR(255) CHARACTER SET UNICODE NOT CASESPECIFIC     
);
DROP TABLE DT_DQM.ICMSLL_DBSVEC_ERR1 ;
DROP TABLE DT_DQM.ICMSLL_DBSVEC_ERR2 ;

SET RECORD TEXT;

DEFINE
Field001 (CHAR(2)),
Field002 (CHAR(2)),
SECNAM (CHAR(1))
FILE = "E:\Abhijit STC\CHANNEL.dat";

show;

BEGIN LOADING DT_DQM.TEST1234 ERRORFILES DT_DQM.ICMSLL_DBSVEC_ERR1 , DT_DQM.ICMSLL_DBSVEC_ERR2 CHECKPOINT 100;

INSERT INTO DT_DQM.TEST1234
values
(
:Field001
,:Field002
,:SECNAM
);

END LOADING ;
LOGOFF ;

 It fails when my source file does not contain a new line character at the end of the file. However, if there is a new line at the end of the file it runs fine. How can I ensure it runs successfully irrespective of presence/absence of newline character at the end of the file:

88SOC

68BRN

13 REPLIES
Teradata Employee

Re: Question regarding Fastload

Its a limitation of FL, you need to have a newline character at the end of file. What is the source of your file or are you fetching it from some DB yourself?

Re: Question regarding Fastload

I dont understand why Teradata cant fix such basic things. There is the issue of fastexporting variable-length delimited file, where output gets prefixed with some characters

N/A

Re: Question regarding Fastload

Most data is created by exporting it from a DBMS or any other source and those exports usually add that final EOL.

Regarding delimited output: FastExport is an old legacy tool it will probably not be enhanced anymore. But there's TPT and you can easily create delimited output with it.

Teradata Employee

Re: Question regarding Fastload

As Dieter suggested, usually exporting utilities do that on their own. Hence if the data-file is generated manually .... EOL needs to be there as well.

Re: Question regarding Fastload

Ok I will check that. It will be helpful if you can send some sample scripts for TPT. Also, how to load files with enclosing data values  ?

"value1","value2","val,ue,3",,,

Re: Question regarding Fastload

One more question? Will anyone go for fastload, multiload, fastexport while doing development now instead of TPT? If so why? What are the drawbacks of TPT over fastload, multiload, fastexport?

Teradata Employee

Re: Question regarding Fastload

Teradata Employee

Re: Question regarding Fastload

Teradata recommends using TPT, older implementations still use them.

As for the drawbacks, there isn't much to say .... generally speaking .... idea of TPT was to be have single platform for all activities. And it does use block-level architecture, hence its as good as FL/ML.

Teradata Employee

Re: Question regarding Fastload