PDA

View Full Version : Transform a delimited text file into a fixed position one?



kettle_anonymous
03-13-2006, 10:09 AM
Attachment: Example for loading a CSV and writing fixed length.pdf (http://forums.pentaho.org/archived_att/kettle/Example for loading a CSV and writing fixed length.pdf) Is it possible to do this? Take a delimited text file and convert it into a fixed width. This would be a nice to have feature in case it is not avialable.

jbleuel
03-14-2006, 01:00 AM
Attachment: Example for loading a CSV and writing fixed length.pdf (http://forums.pentaho.org/archived_att/kettle/Example for loading a CSV and writing fixed length.pdf) Yes, itÂÂ's very easy (check "Right pad fields" in text file output step).
More details in the enclosed PDF.
Good luck,
Jens

kettle_anonymous
03-15-2006, 11:53 AM
it would be nice if the output occupied the width of the longest value in that column without having to specify a width. a lot of times you dont know what this value will be.

MattCasters
03-15-2006, 11:58 AM
Hi AC,

Mmm, and what would be a possible solution for this?
;-)

Cheers,
Matt

clement
12-17-2007, 12:06 PM
Hi,

I try to make an output as a Fixed width file with the Text file output step.
I notice that when using a header, this one won't respect the fixed width configuration made in the Fields tab.
Please see the sample attached which shows that the header in the output is not fixed width.
Is there a way of making the header respect the fixed width format ?
If not I may post this issue as a new feature.

Configuration :
PDI v3.0.0.GA

a+, =)
-=Clément=-

mallim
10-20-2008, 11:55 AM
Hi,

I try to make an output as a Fixed width file with the Text file output step.
I notice that when using a header, this one won't respect the fixed width configuration made in the Fields tab.
Please see the sample attached which shows that the header in the output is not fixed width.
Is there a way of making the header respect the fixed width format ?
If not I may post this issue as a new feature.

Configuration :
PDI v3.0.0.GA

a+, =)
-=Clément=-

I gotten the same issues as described here in 3.1.0 (build version 826) and it is a major show stopper for me in order for me to use PDI to ETL about 30+ fixed width files.

Is there any workarounds for this?

yeoj
03-20-2009, 04:03 PM
My source is a db, and i have decimal values with potentially a leading - sign. Shifts my whole fixed width output and I can't get my bulk loaders hands on it...

any suggestions?

-0000542.75I TEST1 0000542.75 0000000.00
-0000483.25I TEST1 0000501.49 0000018.24
-0000619.34I TEST1 0000619.34 0000000.00
0000000.00I TEST1 0000234.08 0000234.08
-0000246.50I TEST1 0000246.50 0000000.00
-0000412.75I TEST1 0000425.74 0000012.99