Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: Transform a delimited text file into a fixed position one?

  1. #1
    Join Date
    Sep 2005
    Posts
    1,403

    Default Transform a delimited text file into a fixed position one?

    Attachment: 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.

  2. #2
    Join Date
    Nov 1999
    Posts
    459

    Default RE: Transform a delimited text file into a fixed position one?

    Attachment: 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

  3. #3
    Join Date
    Sep 2005
    Posts
    1,403

    Default RE: Transform a delimited text file into a fixed position one?

    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.

  4. #4
    Join Date
    Nov 1999
    Posts
    9,729

    Default RE: Transform a delimited text file into a fixed position one?

    Hi AC,

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

    Cheers,
    Matt

  5. #5
    Join Date
    Mar 2007
    Posts
    216

    Smile

    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=-
    Attached Files Attached Files

  6. #6
    Join Date
    Oct 2008
    Posts
    4

    Default

    Quote Originally Posted by clement View Post
    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?

  7. #7
    Join Date
    Dec 2008
    Posts
    11

    Default fixed-width right-pad with integers with potentially negative sign...

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.