Hitachi Vantara Pentaho Community Forums
Results 1 to 9 of 9

Thread: Value Mapper - Get Value of a Field

  1. #1
    Join Date
    Jan 2013
    Posts
    108

    Default Value Mapper - Get Value of a Field

    hi all

    Who knows if there is a step, which is like Value Mapper, but setting a value of a field(Target Value)?


    thank you in advance

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

    Default

    If you want to keep the original field value, just let Value Mapper operate on a copy of that field.
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Jan 2013
    Posts
    108

    Default

    hi marabu

    i really didn't get what you mean.

    i have to bring several date columns to one column depending on the group it belongs. I managed the all columns of Fact table except the DateId column of it. I tried it with Value-Mapper depending on the Groups, which are known.

    source
    PatientID Category DateGroup1 Hear Speak Walk DateGroup2 Heart Lungs Liver
    111 1 01.01.2012 3 2 5 01.02.2012 1 4 6
    111 2 - - - - 01.03.2012 2 3 5
    222 - 01.02.2012 1 2 3 - - - -

    dimension
    AbilityId Category Group Ability
    1 1 Group1 Hear
    2 1 Group1 Speak
    3 1 Group1 Walk
    4 1 Group2 Heart
    5 1 Group2 Lungs
    6 1 Group2 Liver
    7 2 Group2 Heart
    8 2 Group2 Lungs
    9 2 Group2 Liver
    10 - Group1 Hear
    11 - Group1 Speak
    12 - Group1 Walk
    .. .. ..

    Fact
    PatientID AbilityId DateId Scale
    111 1 01.01.2012 3
    111 2 01.01.2012 2
    111 3 01.01.2012 5
    111 4 01.02.2012 1
    111 5 01.02.2012 4
    111 6 01.02.2012 6
    111 7 01.03.2012 2
    111 8 01.03.2012 3
    111 9 01.03.2012 5
    222 10 01.02.2012 1
    222 11 01.02.2012 2
    222 12 01.02.2012 3
    Last edited by verynew; 10-21-2013 at 05:49 AM.

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

    Default

    Quote Originally Posted by verynew View Post
    i really didn't get what you mean.
    Considering your original question, I still think it was the best answer I could come up with.
    Attached Files Attached Files
    So long, and thanks for all the fish.

  5. #5
    Join Date
    Jan 2013
    Posts
    108

    Default

    appreciate your replies so much, not only in this thread..

    the attached ktr doesn't work with my datas, smth is wrong..i mean it works, but doesn't give out full/all datas. i look at it further.

    Can't we use anything like Value-Mapper.. if we take the tables from my previous post, and after normalising the DateGroups(Type:Group and NewField: Date) and Abilities and creating Groups:

    Field to use: Group
    Target Fieldname: (Date)
    source value: group1, group2,..
    target value: (values of Date: dategroup1, dategroup2,..)
    Last edited by verynew; 10-22-2013 at 08:50 AM.

  6. #6
    Join Date
    Jan 2013
    Posts
    108

    Default

    the attached ktr misses some datas to the resulting fact table. i have a feeling that it's because of those Filtered Dates which are renamed to the one name(Date), some confusions may happen

  7. #7
    Join Date
    Jan 2013
    Posts
    108

    Default

    and think that i do have many many rows of those fields.., maybe there it's confusing/loosing datas while normalising the fields..

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

    Default

    You can avoid confusion by providing suitable test data.

    And no, I don't see Value Mapper doing you much good here.
    So long, and thanks for all the fish.

  9. #9
    Join Date
    Jan 2013
    Posts
    108

    Default

    Oh, the mistake i made was, that i have distributed the datas from source to each group, but not copy. so, now it works perfectly if i do copy them.

    very thankfull to you marabu..

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.