Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Row Denormaliser aggregation not working?

  1. #1

    Default Row Denormaliser aggregation not working?

    Hello chaps,

    I have the attached Row Denormaliser step. It takes stock adjustment codes and quantities and denormalises them into "flat" fields.

    The key is the so-called Reason (reason code for the adjustment). There are cases in which several reasons must be added into one denormalised field. For example, reasons 27a, 27b, 27c... all go to the 'qty_credit' field.

    As far as I understood, if I put the same target name and an aggregation function, the step would aggregate all into that target. Following the former example, setting all 27x reasons to go to target qty_credit with SUM aggregation should sum all of them into one field. Am I right?

    The actual behaviour is that the step is creating new fake fields like qty_credit_1, qty_credit_2, etc, and does not sum the values in the main field. Am I doing something wrong?

    Thanks for your help,

    --
    Julio.
    Attached Files Attached Files

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

    Default

    I didn't know we had a row denormaliser aggregation... so chances are big you're doing something wrong

    And please attach the transformation file, I don't know how you got the current file you attached. We need the file ending on .ktr

    Regards,
    Sven

  3. #3

    Default

    Hello Sven,

    Hehe, ok, if it does not sound a bell there, yes, I guess something went wrong on my side!

    I probably misunderstood, but there is an option at the end of each row in the denormaliser step that says "aggregation". If you leave the mouse there it shows a context help saying something like "if field names are the same, this aggregation method is used. If it is empty, it means overwrite". I cannot tell the exact text as I am not logged into the machine right now.

    Anyway, find attached the whole transformation. The step I'm talking about is the only denormaliser there. I fixed the situation with a small javascript right after it, but I would appreciate your feedback regarding this "feature".

    Ah, and FYI, the file I originally attached is the row denormaliser step, copied to the clipboard and pasted on Notepad. I thought it was enough, please forgive my inexperience.

    Thanks for your help,

    --
    Julio.
    Attached Files Attached Files

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

    Default

    That is only useful in the case of key-value lookups where the key is not really unique.
    The question then becomes what to do with the various values and this is where the aggregation comes in. Very rare situation.

  5. #5

    Default

    Thanks for the answer, Matt. However, just for my clarification, then the example I'm showing is not the intended behaviour of the aggregation, is it?

    This "key value lookups where the key is not really unique", can you please give me an example? This will help me understand it better.

    Anyway I have solved it through this Javascript step but would like to know how is this step intended to work.

    Thanks and Cheers,

    --
    Julio.

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

    Default

    Sorry, can't be bothered.

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.