cancel
Showing results for 
Search instead for 
Did you mean: 

Context vs Alias

vijaymuniraj
Active Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I think one of the points would be if you have multiple fact tables then go for context.

Answers (2)

Answers (2)

vijaymuniraj
Active Participant
0 Kudos

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?

Former Member
0 Kudos

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.

Former Member
0 Kudos