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
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
parameter AcceptExcessColumns cannot be used for loading fixed length files.
Any help would be great
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.
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.