Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Additional fields depending on existing ones

  1. #1
    Join Date
    Oct 2017
    Posts
    7

    Default Additional fields depending on existing ones

    Hello! I am pretty new to PDI and facing a small problem. I have following ticket history data:


    ticket_id status_id
    queue_id
    created
    1 1 1 201701
    1 2 1 201701
    1 2 2 201703
    1 3 3 201705
    2 1 1 201701
    ...


    Where created 201701 is January 2017.
    I want to fill values for rest months for every ticket. Like this:


    ticket_id status_id queue_id created
    1 1 1 201701
    1 2 1 201701
    1 2 1 201702
    1 2 2 201703
    1 2 2 201704
    1 3 3 201705
    1 3 3 201706
    1 3 3 201707
    ...
    1 3 3 201711
    1 3 3 201712
    2 1 1 201701
    ...


    New coming rows are marked as red.
    As you can see generated values are repeating values of status_id and queue_id from previuos month.
    Any help will be appreciated, thanks.
    Last edited by laziz; 10-13-2017 at 04:09 AM.

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

    Default

    Which input step will you use to process the input data?
    Also, can you attach your sample data as a file?
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Oct 2017
    Posts
    7

    Default

    Thanks for quick response.
    For generating data I use "Input table" step. I join 2 tables: ticket and ticket_history. For ticket_history I use the following SQL:

    Name:  Screen Shot 2017-10-13 at 09.15.26.jpg
Views: 34
Size:  15.3 KB

    For now the whole transformation looks like:

    Name:  Screen Shot 2017-10-13 at 09.07.12.jpg
Views: 25
Size:  22.8 KB

    Actually my goal is to show in reports ticket history data. For example To see how many tickets were closed in January 2017, or how many tickets were in specific queue in May 2017, etc.
    What else can I use for these purposes?
    Thanks a lot in advance.
    Last edited by laziz; 10-13-2017 at 03:22 AM.

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

    Default

    You picked the right input step - not, that you would have had much choices, though.
    Here's something you might want to analyze.
    And, please, always bring sample input as an attached file, not as an image.
    Attached Files Attached Files

  5. #5
    Join Date
    Oct 2017
    Posts
    7

    Default

    Thanks Marabu,

    very elegant solution!

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.