Hitachi Vantara Pentaho Community Forums
Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Denormaliser and aggregate (strings concatenation)

  1. #1
    Join Date
    Oct 2007
    Posts
    7

    Default Denormaliser and aggregate (strings concatenation)

    Hello,

    I use Kettle for a while, and I need to "denormalize" a table.
    Unfortunately, I can't use the "comma concatenation" to regroup the data, with the same key value.

    It doesn't work (only one of the values is keeped).

    The only option useable is "sum aggregate". But I need to get back string values.

    Any Idea ? Is it a bug ?

    Thanks a lot.

  2. #2
    Join Date
    Oct 2007
    Posts
    10

    Default

    Hi,

    Did u use the "Group by" step? There you have the option to aggregate again.

    Select type = "Concatenate strings separated by ,"


    I used it a lot and it works perfectly for me.

    CMM

  3. #3
    Join Date
    Oct 2007
    Posts
    7

    Default Yes !

    Using "Group By", "Row denormalizer" and "Split Fields" steps, all work fine.

    Thanks a lot,

    Yoann

  4. #4
    Join Date
    Jan 2009
    Posts
    12

    Default transforming variable rows of data per key to one

    hello,
    I was reading this thread, and the problem that was presented seems to one that I'm trying to deal with today. But I cant' figure out how to accomplish the task from what was said in the thread and the various Spoon tools and I'm hoping someone here could give me some clearcut steps to take to accomplish a solution to the problem.
    I'm trying to turn an Excel file input that has two columns w/ a header row where the number of carrier entries per the key column accountnumber are variable:

    accountnumber carrier
    123 abc
    123 def
    456 ghi
    789 jkl
    789 mno
    789 pqr
    012 stu
    345 vwx
    345 yza

    into this where each unique account number has the collection of carrier data on the same row

    accountnumber carrier collection
    123 abc def
    456 ghi
    789 jkl mno pqr
    012 stu
    345 vwx yza

    Thanks in advance for anyone's assitance with a solution to this!
    david

  5. #5
    Join Date
    May 2006
    Posts
    4,882

    Default

    No answer for you

    S.

  6. #6
    Join Date
    Jan 2009
    Posts
    12

    Default

    Are there some good & visually illustrated tutorials/examples (videos even better) of how to use either the "Group By" or "Row denormalizer" steps somewhere on the internet?
    thanks,
    david

  7. #7
    Join Date
    Jan 2009
    Posts
    12

    Default Further explanation please of how to use 3 steps

    Yoann,
    Hello,
    Could you elaborate on how you used the three types of transformations steps together to denormalize a table? How is the flow of data between the various steps setup?
    Thanks,
    David

  8. #8
    Join Date
    Jan 2009
    Posts
    12

    Default figured the group by transfomation out...

    I figured out how to make the Group By transformation step work correctly so that this input:
    accountnumber carrier
    123 abc
    123 def
    456 ghi
    789 jkl
    789 mno
    789 pqr
    012 stu
    345 vwx
    345 yza

    is changed to this output:

    accountnumber carrier collection
    123 abc, def
    456 ghi
    789 jkl, mno, pqr
    012 stu
    345 vwx, yza


    and I don't have to know beforehand how many variable rows per account # occur in the input data, just have to have the input data sorted on account #

  9. #9
    Join Date
    Jan 2009
    Posts
    3

    Default

    I'm also having issues using the aggregation option "Concatenate strings separated by ," in a Row Denormalizer step.

    Looking at the source, I can't see any payload for:

    public static final int TYPE_AGGR_CONCAT_COMMA = 6;

    in DenormaliserTargetField.java

    Any ideas? Happy to submit a patch if this needs work.

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

    Default

    Looks like you're right. I guess nobody ever needed it before :-)
    Patches are always welcomed in the PDI project!

    File a bug report over here: http://jira.pentaho.org/browse/PDI
    Attach the patch to the new case.

    Thanks a lot in advance!

    Matt

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.