Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Put a field between "" automatically

  1. #1

    Default Put a field between "" automatically

    I have several fields from a DB, and I want to put those fields between "" automatically without to use the concat fields step.

    Is there a better way to get that ?


    Thanks a million.

  2. #2

    Default

    I have seen that using Concat fields step , with:
    Enclosure "
    Force the enclosure around fields checked.
    I got it.

    But I need to use a concat step for each field , is there a better way to that?

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

    Default

    More detail is required.
    Do you mean that you are getting fields from a database, and then putting them back into the DB as strings?
    Are you outputting into a text file?

  4. #4

    Default

    Quote Originally Posted by gutlez View Post
    More detail is required.
    Do you mean that you are getting fields from a database, and then putting them back into the DB as strings?
    Are you outputting into a text file?
    Really sorry, you r right.

    Im getting files from a database, and my final target is to concat those fileds in this way:

    "name1","name2","name3","name4"...,"nameN" and outputting into a text file.


    Currently I'm doing in this way:


    Table input --> Getting all the fields.
    Concat Fields --> in Fields (name) ,Target field Name (NewName), Separator (), Enclosure ("),Force the enclosure around fields (checked).
    Add constant --> I define a constant integer with value 1.
    Group by step --> In the Group fields section I put Every field less the field name.
    --> In the Agregate section I put name field
    Select values

    I'm not sure if there is a better way to to that.

    Thanks a million.

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

    Default

    Why not just use the enclosure option in the text file output?
    You don't to put them into a single field before you put them into the text file do you?

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.