I have a delimited text file with a spaces appended to all the fields and thus it appear to be a delimited fixed width file. I read the file with delimiter defining the columns. If the actual length of the field is less than the defined column length, then the field will have space appended to them. A sample text is given below
Code: Select all
LOGISTIC_TYPE~LOGISTIC_REF~TRADE_GROUP
MR ~(747-400).MR-17-122 ~ENGINE
MR ~(747-400)MR-17-122 ~ENGINE
MR ~(767).MR-15-151/03 ~ENGINE
MR ~(767)MR-15-151 ~ENGINE
AMM ~(767/747-400)MM.71-00-00 ~ENGINE
I have 1000 of files and each file has 100-300 columns. Defining the metadata, pointing the NULL field length equivalent to column length and triming the space on the columns (in a transformer) is very tedious. Is there any better way to trim the trailing space in all the columns using a combination of environmental variable and filter program ?
Thanks
MSR
The minute you start talking about what you're going to do if you lose, you have lost