Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: How to pivot the data contain dates change over week

  1. #1
    Join Date
    Sep 2014
    Posts
    8

    Question How to pivot the data contain dates change over week

    Hi ,
    I have below data where i want to covert rows to columns. Dates should be added as a column and respected qty to date. Please Note that date is not fixed , it changes every week, so we cannot consider dates as constant.
    input :
    Part Location Date Qty
    2 788-5000 2017-10-16 0
    2 788-5000 2017-11-13 0
    2 788-5000 2017-12-11 0
    3339 895-0696-000 2018-04-02 0.5
    3339 895-0696-000 2018-04-30 0.3
    3701 895-0696-000 2018-03-05 0.5
    3701 895-0696-000 2018-04-02 0.5
    18463 895-0696-000 2017-10-16 0.1
    18463 895-0696-000 2017-11-13 0.1
    18463 895-0696-000 2017-12-11 0.1
    18463 895-0696-000 2018-01-08 0.1
    18463 895-0696-000 2018-02-05 0.1
    18463 895-0696-000 2018-03-05 0.1
    0000000DD461 895-0696-000 2018-02-05 0.1


    I want below output .

    Part Location 2017-10-16 2017-11-13 2017-12-11 2018-01-08 2018-02-05 2018-03-05 2018-04-02 2018-04-30
    2 788-5000 0 0 0
    3339 895-0696-000 0.5 0.3
    3701 895-0696-000 0.5 0.5
    18463 895-0696-000 0.1 0.1 0.1 0.1 0.1 0.1
    0000000DD461 895-0696-000 0.1



    I am attaching input and output files for reference.
    Thanks in advance
    Attached Files Attached Files

  2. #2
    Join Date
    Jun 2016
    Posts
    107

    Default

    Hi ,

    You can use the row denormaliser step.
    Please refer the below link.

    https://dwbi.org/etl/pentaho-data-in...ormaliser-step

    Thank you,
    Janu

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

    Default

    Pivoting is one thing, but you must be able to cope with advancing 28-day intervals, too.

    So, read about ETL-Metadata-Injection.
    Attached Files Attached Files
    So long, and thanks for all the fish.

  4. #4
    Join Date
    Sep 2014
    Posts
    8

    Default

    Thanks Jahnavi for reply , I tried denormaliser in early stage .
    In given example of denormaliser the fields which mentioned in target field are fixed string , but my data has dates which get changed week over week .
    So this option is not for my case, its not working for me.

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.