on 09-03-2015 2:58 PM
Dear expert,
I have seen many blogs that were posted about context and alias.
I understand what is loop and traps but being said that both context and alias can resolve loop, can anyone say which scenario we have to go for context and alias?
Thanks
I think one of the points would be if you have multiple fact tables then go for context.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Victor and Swapnil.
Please clarify this scenario: Lets say i have 2 fact tables and 3 dimension tables and i can create two contexts for each fact table with 3 dimension table and if i wanted to create report by using objects from both fact tables and dimension tables, what would you suggest to overcome this requirement?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If the dimension tables are really common dimensions than you should create two contexts :
ctx 1 : The joins between fact table 1 and the 3 dimensions
ctx 2 : The joins between fact table 2 and the 3 dimensions
In your report you can have 3 situations :
1. A report with only objects from the dimensions : 1 SQL query will be generated
2. A report with objects from the dimensions and 1 fact table : 1 SQL query will be generated
3. A report with objects from the dimensions and 2 fact tables : 2 SQL queries will be generated
If a dimension serves 2 purposes, for instance a time dimension used for start date end end date, you should create an alias of that table: one for the start date and one for the end date.
Context and alias each serve a different purpose.
Following links will help you:
http://www.dagira.com/2009/07/22/context-versus-alias-overview/
http://www.geekinterview.com/question_details/46745
Still doubt? then do let me know
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.