Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: handling many to many relations in mondrian

  1. #1

    Default handling many to many relations in mondrian

    Hi ,

    How do we handle many to many relation ship in mondrian. I will give 2 scenarios
    1. In the below scenario ,customer to account and account to customer is a many to many . And so to do that we need a bridge table (CustomerAccount) that holds the mapping . How do I handle this scenario using Mondrian (to bring the CustomerAccount table) . In this case the output I need should not aggregated at the customer level as it leads to recounting(but should only be aggregated at the account level and then values shown duplicated at the customer level )



    2. For the sales and salesreason scenario, where I have a fact table which has the Fact_Sales and a Sales_Reason bridge table,here I would like to see the total sales aggregated to each sales reason(this includes recounting as opposed to the above scenarios)


    What is the best way to implement this with Mondrian ?

  2. #2
    Join Date
    Jan 2013
    Posts
    796

    Default

    Mondrian does not currently support many-to-many, and will do nothing to handle the semi-additive measures that arise. There is a desire for adding support in the not-too-distant future, though- vote for MONDRIAN-1572 if it's important to you.

  3. #3

    Default

    You may create necessary VIEWs in your DB to make Mondrian do its usual job fine.

  4. #4
    Join Date
    Nov 2011
    Posts
    2

    Default

    Hi pled76. Can you explain this suggestion?

    I am trying to find a way to describe the implementation that is in this image in Mondrian.

    Name:  relation.png
Views: 153
Size:  21.4 KB

    Quote Originally Posted by pled76 View Post
    You may create necessary VIEWs in your DB to make Mondrian do its usual job fine.
    Thanks!
    Last edited by yuri; 08-30-2013 at 06:58 PM.

  5. #5

    Default

    yuri, please, specify what particularly you want to show in the cube?

    From the provided info one can only derive the trivial example (if you were more specific in your request, the "*" in the provided "select" would be something more precise):

    create view v_agente_ficha as
    select *
    from dim_agente_bridge ab
    join ficha f on f.dim_agente_bridge_sk = ab.sk
    join dim_agente a on a.sk = ab.dim_agente_sk

    And there is no "many-to-many" problem here to solve, so the question, possibly, is off-topic 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.