Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Concat Fields adds a 'return' (new line) when outputting to CSV

  1. #1
    Join Date
    Feb 2013
    Posts
    1

    Red face Concat Fields adds a 'return' (new line) when outputting to CSV

    I have successfully brought 20 fields from a series of XML files. My goal is to concat the attributes @systemId, @propertyId, and @unitId into a new field called "listing_id" with a dash - between. I then connect the concat transformation to another concat in order to combine several region fields into a new "region_full" field concatenated by slashes /

    I then need to output all of this information into a CSV file. This is successful, except the formatting is wrong. Attached are my files, in file.csv you will see that after each listing_id and region_full field there is a new line inserted. This obviously is unwanted in a CSV file and I cannot find any setting in any of the steps that would suggest adding new lines.

    Also, I realize all of my file references are local rather than in variables. But when I attempt to use ${Internal.Transformation.Filename.Directory}/search.xml it says file cannot be found. So any help in that direction would be fantastic as well.

    Thanks for the help!!
    Attached Files Attached Files

  2. #2
    Join Date
    Apr 2008
    Posts
    1,771

    Default

    Hi.
    I haven't check the actual data that you posted, but my first thought is: do you have a <LF> character in your original data?
    If so, it may not show in the xml file, but once you produce your text (csv) file, then it causes the line to break up.
    It is a common issue when migrating data from Excel to text files.

    Mick

  3. #3
    Join Date
    Nov 1999
    Posts
    459

    Default

    It's a known issue: http://jira.pentaho.com/browse/PDI-8857
    and fixed in the upcoming 4.4.1 / 5.0

    Cheers,
    Jens

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.