All Forums Tools
marcin1213 3 posts Joined 07/11
11 Dec 2012
TPT: How to load file without delimiter exceeding File Data Defintion

Hi everybody,
I have to load file that contains 2 or 3 columns (there is no field delimiter).
Into target table I want to load only 2 columns; 3rd column (if exists in file) has to be ignored.
FileReader: VARCHAR Format='Text'
DEFINE SCHEMA SourceFile
        DESCRIPTION 'Desc1'
        (
         COL1  CHAR(10),
                COL2 CHAR(10)
 )
With above definition TPT expects alway 20 characters in File; if 3rd column exists, file does not fit file definition and error occurs:
FileReader: TPT19113 Data length implied by Data Schema (20) is not the same as record length (25)
If I extend file defintion by one column (CHAR(5)), I will get the same error if 3rd column is not delivered in file.
Is there any way to laod such file?
According to post
http://forums.teradata.com/forum/tools/tpt- acceptexcesscolumns-with-strange-behaviour-in-file- reader
parameter AcceptExcessColumns cannot be used for loading fixed length files.
Any help would be great
Kind Regards,
Marcin

feinholz 1234 posts Joined 05/08
20 Dec 2012

The AcceptExcessColumns feature is currently only supported with the "Delimited" record format. It is not supported with "Text" or any of the binary record formats.
 

--SteveF

marcin1213 3 posts Joined 07/11
07 Jan 2013

Is there any other way to load such file?

feinholz 1234 posts Joined 05/08
07 Jan 2013

You will have to pre-process the file before loading (i.e. write an INMOD or access module). Or convert the file into a delimited file.

--SteveF

You must sign in to leave a comment.