Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: De-Normalize into a coma separated field

  1. #1
    Join Date
    Sep 2013
    Posts
    5

    Default De-Normalize into a coma separated field

    Hi! I need to "de-normalize" a field into a coma separated field but i don´t know how can i do it:

    For example, this input:

    f1 f2 v
    ---------
    -------
    a a 1
    a a 2
    a b 1
    c d 1
    c d 2
    c d 3

    Into this output:

    f1 f2 v
    ---------
    -------
    a a 1,2
    a b 1
    c d 1,2,3

    ¿Can anybody help me?

    Thanks in advance!




  2. #2
    Join Date
    Sep 2013
    Posts
    5

    Default

    No matter... i have found a way. The input is a MySQL Query so I can use the GROUP_CONCAT function.

    Regards!

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

    Default

    The step you were looking for is the Group By step.
    You can do a Concatenate seperated by "," or by any other delimiter that you want.
    **THIS IS A SIGNATURE - IT GETS POSTED ON (ALMOST) EVERY POST**
    I'm no expert.
    Take my comments at your own risk.

    PDI user since PDI 3.1
    PDI on Windows 7 & Linux

    Please keep in mind (and this may not apply to this thread):
    No forum member is going to do your work for you. We will help you sort out how to do a specific part of the work, as best we can, in the timelines that our work will allow us.
    Signature Updated: 2014-06-30

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.