Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Extra Spaces in text output

  1. #1

    Default Extra Spaces in text output

    Hi,

    I am a newbie to Pentaho, so please bear my silly queries...

    I created a simple transformation job to load data from a csv file to text file. So after running the job, I find large number of spaces in output, let me explain,
    Input row,
    100|James|987654|james@gmail.com|HR

    Output row,
    100;James ;987654;james@gmail.com ;HR

    For integer values it comes fine... but for string, the whole thing gets messed up...

    When setting up the input, I had given data length for integer as 10 and for string I assigned 100.
    From my observation it seems that even the string is of length 5, it will add 95 spaces to keep it to 100 as specified. Am I right?

    Now my questions,
    How do I eliminate these spaces? They are hogging up the file size unnecessarily.

  2. #2
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Which input (Text File Input or CSV Input) are you using?

  3. #3
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    The spaces should go away as soon as output formatting is disabled.

    Name:  no-output-formatting.jpg
Views: 687
Size:  14.6 KB
    So long, and thanks for all the fish.

  4. #4
    Join Date
    Mar 2013
    Posts
    127

    Default

    Hi

    Yes ur observation is wri8.

    Text file output --> fields --> dont specify string length and set trim type to both

    Regards,
    Mateen

Tags for this Thread

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.