Fixed Length CSV File Column Field names

More
5 years 1 week ago - 5 years 1 week ago #21190 by bruce.gibbins
AETLP v6.3.7.23 x32

Hi, I suspect you may have come across this and may have a neat workaround that may be more affective that the one I am considering.

One of our trading partners supplies what is supposed to be a CSV file. However, it comes to us with each row padded to a 2000 byte length! There are over 60 fields in each row. In general AETL handles this. However, when it comes to the last field in the definition it has difficulties establishing the final field names and I suspect there may be some physical size limits being hit.

I should also point out that the content of the file is in fact comma separated. it is just the last column in each row gets PADDED and then the End-Of-Line marker is put in.

The screenshots attached will explain better what we receive. What would help in this case is a RTRIM() of the row we nominate contains the column names. That way the final column name will be derived correctly.

I am considering parsing the file with AWK first and to RTRIM each row before it gets into this transformation/ but obviously this introduces another moving part in the package that could fail.

I have tried to manually manipulate the final column names in the AETL Reader File Definition without much luck.

Ideas? Thanks





Last edit: 5 years 1 week ago by bruce.gibbins.

Please Log in or Create an account to join the conversation.

More
5 years 1 week ago #21193 by admin
We will trim it by default

Working with fixed-width files can be a real pain especially if it is very wide.
What I do is export the definition into excel edit it or even better, paste the definition from spec if I have one and paste it back.
Saves a lot of time


Mike
ETL Architect
Attachments:

Please Log in or Create an account to join the conversation.

Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Read more
Marketing
Set of techniques which have for object the commercial strategy and in particular the market study.
Google
Accept
Decline
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Google Analytics
Accept
Decline
Functional
Tools used to give you more features when navigating on the website, this can include social sharing.
Advertisement
If you accept, the ads on the page will be adapted to your preferences.
Google Ad
Accept
Decline
Save