Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: Dynamic pivot data

  1. #1

    Default Dynamic pivot data

    I have a requirement to consume data and output it in a pivoted format. The problem is that the data that needs to be pivoted is not pivoted over static values. The "type" column that is used to pivot the data can be anything. Here is a example

    The input data looks something like this:
    customer type value
    123 points 100
    123 punches 500
    456 currency 50
    456 points 500
    456 custom 30

    And the desired output is something like this:
    customer points punches currency custom
    123 100 500
    456 500 50 30

    I know I could probably pivot this data if it had static "type" values but I am not sure how to handle an example like this. Is there anyway I could use some metadata injector or other type step to pivot this data? Any help is appreciated

    Thanks in advance
    -Simon
    Pentaho Version: 5.2.0.0

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Eventually you need a fixed set of fields, so you will have to determine it by selecting all unique "types".
    If you can make ETL Metadata Injection work with Row Denormalizer in your Kettle version, that's the way to go.
    So long, and thanks for all the fish.

  3. #3

    Default

    Hmmm....I can't seem to get a Metadata Injection step working with the Row Denormalizer. I have looked at various examples of the metadata injection step but none of them are with the row denormalizer. I can't seem to figure out what my issue is.
    -Simon
    Pentaho Version: 5.2.0.0

  4. #4

    Default

    Scratch that! I figured it out!

    I will say the metadata injector to denormalizer was not as straight forward as I was expecting. The injector fields had me confused and I swapping some fields based on the injector name and the matching denormalizer name

    I have attached an example to help anyone looking to do the same thing

    inject-denorm.zip
    -Simon
    Pentaho Version: 5.2.0.0

  5. #5
    Join Date
    Dec 2012
    Posts
    29

    Default

    Thank u Simon for the attatchment. It hepled!!!

  6. #6
    Join Date
    Sep 2016
    Posts
    3

    Default

    Quote Originally Posted by simon View Post
    Scratch that! I figured it out!

    I will say the metadata injector to denormalizer was not as straight forward as I was expecting. The injector fields had me confused and I swapping some fields based on the injector name and the matching denormalizer name

    I have attached an example to help anyone looking to do the same thing

    inject-denorm.zip
    Thanks

  7. #7

    Default

    Hi,

    Just download ur example...and the output is not the same as yours....

    The output just come out now:
    Name:  Cattura1.jpg
Views: 1076
Size:  11.4 KB


    The output you put in the folder:
    Name:  Cattura2.jpg
Views: 1115
Size:  25.1 KB



    Someone can explain to me how to make it works? Thanks
    Last edited by ov3rt1me; 03-24-2017 at 09:42 AM.

Tags for this Thread

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.