[ 
https://issues.apache.org/jira/browse/LENS-752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14907740#comment-14907740
 ] 

Hudson commented on LENS-752:
-----------------------------

UNSTABLE: Integrated in Lens-Commit #1091 (See 
[https://builds.apache.org/job/Lens-Commit/1091/])
LENS-752: Support flattening of columns selected through 
bridge-tables(many-to-many relationships) (rajatgupta59: rev 
b2c8fc02c8e194eb9b11151fc4a805b6b77d68cf)
* lens-cube/src/test/java/org/apache/lens/cube/parse/TestJoinResolver.java
* lens-cube/src/main/java/org/apache/lens/cube/parse/CubeQueryConfUtil.java
* lens-server/src/main/java/org/apache/lens/server/metastore/JAXBUtils.java
* lens-cli/src/test/java/org/apache/lens/cli/TestLensCubeCommands.java
* lens-cube/src/test/java/org/apache/lens/cube/parse/CubeTestSetup.java
* lens-cube/src/main/java/org/apache/lens/cube/metadata/JoinChain.java
* 
lens-server/src/test/java/org/apache/lens/server/metastore/TestMetastoreService.java
* lens-cube/src/main/java/org/apache/lens/cube/metadata/TableReference.java
* lens-api/src/main/resources/cube-0.1.xsd
* src/site/apt/user/olap-cube.apt
* lens-cube/src/main/resources/olap-query-conf.xml
* src/site/apt/user/olap-query-conf.apt
* lens-cube/src/main/java/org/apache/lens/cube/metadata/MetastoreUtil.java
* lens-cube/src/main/java/org/apache/lens/cube/metadata/SchemaGraph.java
* lens-cube/src/main/java/org/apache/lens/cube/parse/JoinResolver.java


> Support flattening of columns selected through bridge-tables(many-to-many 
> relationships)
> ----------------------------------------------------------------------------------------
>
>                 Key: LENS-752
>                 URL: https://issues.apache.org/jira/browse/LENS-752
>             Project: Apache Lens
>          Issue Type: New Feature
>          Components: cube
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Amareshwari Sriramadasu
>             Fix For: 2.4
>
>         Attachments: LENS-752.3.patch
>
>
> Data warehousing concepts suggests to use bridge-tables to implement 
> many-to-many relationships between cube & dimension or between two dimensions.
> Here are few links explaining the bridge-tables
> http://www.pythian.com/blog/implementing-many-to-many-relationships-in-data-warehousing/
> http://www.kimballgroup.com/2012/02/design-tip-142-building-bridges/
> http://stackoverflow.com/questions/2785158/star-schema-fact-1n-dimension-how
> http://www.askjohnobiee.com/2013/08/how-to-bridge-tables-and-many-to-many.html
> If we look at the following schema :
> User :
> |ID|Name|Gender|
> |1|A|M|
> |2|B|M|
> |3|C|F|
> User interests :
> |UserID| Sports ID|
> |1|1|
> |1|2|
> |2|1|
> |2|2|
> |2|3|
> Sports :
> |SportsID| Description|
> |1|Football|
> |2|Cricket|
> |3|Basketball|
> User Interests is the bridge table which is capturing the many-to-many 
> relationship between Users and Sports.
> If we have a fact as follows :
> |UserId| Revenue|
> |1|100|
> |2|50|
> If analyst is interested in analyzing with respect to user's interest, then 
> the report would the following :
> |User Interest|Revenue|
> |Football|150|
> |Cricket|150|
> |BasketBall|50|
> Though the individual rows are correct and the overall revenue is actually 
> 150, looking at above report makes people assume that overall revenue is 350.
> The feature ask here is to optionally flatten the selected fields, if fields 
> involved are coming from bridge tables in join path. If flattening is 
> enabled, the report would be the following :
> |User Interest|Revenue|
> |Football, Cricket|100|
> |Football, Cricket, BasketBall|50|



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to