All Forums Database
31 Jan 2014
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

Adeel Chaudhry 773 posts Joined 04/08
31 Jan 2014

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?

-- If you are stuck at something .... consider it an opportunity to think anew.

02 Feb 2014

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

dnoeth 4628 posts Joined 11/04
02 Feb 2014

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.

Dieter

Adeel Chaudhry 773 posts Joined 04/08
02 Feb 2014

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.

-- If you are stuck at something .... consider it an opportunity to think anew.

03 Feb 2014

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",,,
 

03 Feb 2014

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?

Adeel Chaudhry 773 posts Joined 04/08
03 Feb 2014

Have a look at Jimm's reply on following link:
 
http://forums.teradata.com/forum/enterprise/how-to-load-data-without-single-quotes

-- If you are stuck at something .... consider it an opportunity to think anew.

Adeel Chaudhry 773 posts Joined 04/08
03 Feb 2014

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.

-- If you are stuck at something .... consider it an opportunity to think anew.

Adeel Chaudhry 773 posts Joined 04/08
03 Feb 2014

For more information, visit:
 
http://www.info.teradata.com/htmlpubs/DB_TTU_14_00/index.html#page/Load_and_Unload_Utilities/B035_2436_071A/2436title.html

-- If you are stuck at something .... consider it an opportunity to think anew.

04 Feb 2014

Hi can you pls tell me where I can download utility guide for TPT 14.1 which will have different scenarios covered

M.Saeed Khurram 544 posts Joined 09/12
04 Feb 2014

Here you go:
http://www.info.teradata.com/templates/eSrchResults.cfm?prodline=&txtpid=&txtrelno=&txtttlkywrd=TTU14.10&rdsort=Title&srtord=Asc&wNew=True&nm=Teradata+Tools+and+Utilities+14.10
 

Khurram

vikas_yadav 19 posts Joined 09/12
08 Feb 2014

@singhabh....jitlumar:

 

Q:how to load files with enclosing data values  ?

 

Ans: if you want to load encolsing value you can specify following attrbiutes in TPT 

 

OpenQuoteMark='"',CloseQuoteMark='"',

 

Q:Will anyone go for fastload, multiload, fastexport while doing development now instead of TPT? If so why?

Ans: TPT and stand alone utilities works on similar protocol so it totally depends  on the developer's  which utilities they want to use for development.

 

 

Dominiq 11 posts Joined 12/13
31 Mar 2014

Being new to Teradata, I still love old utilities about which you are complaining.
I just feel, we can not handle error properly so that might lead to such feelings. Agreed, that most of these utilities are preety tough, but they still hold their pros. Teradata might have favoured those pros more than such cons. Even Teradata has provided lot of options like TPT, so i dont find reason, why they should make even a small change to FLOAD.

Swapnil

You must sign in to leave a comment.