If you have 4-5 contexts in the universe and when you generating reports and if the data is coming from two contexts will the data be in sync and does it always show up in the single table. When does it show up in multiple tables.
Yes I have set the SQL parameters. No this is not an interview question. I am still testing my universe. I know with this option “multiple SQL statements for each context”, it generates multiple SQL statements for each context even it is a single query and displays the results in a single table. But when does it display the results in two tables.
Data shows up in multiple tables if your dimension objects are not shared across all contexts.
If you have 3 dimensions and 2 measures, and each measure comes from a different context but the dimensions are all shared, then you will get a single table. If one of the three dimensions only exists in one context then you get a synchronized query and multiple blocks.
Does it apply to star schemas only. How can we avoid the synchronized query and multiple blocks. I do not have a star schema and it is transcational database so I am using contexts in my universe. I get mutiple blocks.
I didn’t say anything about star or other types of schemas.
Simply put, if your dimensions are common over all contexts in your document, then you will get a single block. If your data providers are at different levels (one has 4 dimensions, the other has 5) then you get multiple blocks. The way to avoid multiple blocks is to only use dimensions that “make sense” and by that I mean that are shared over all contexts used in your query.
A more specific example… let’s say that I have transactions at a daily level and a forecast at a month level. If I include a “day” dimension in a query that includes both transaction measures and forecast measures I will get multiple blocks because it’s impossible to put the forecast at the day level. The lowest level of common dimension is month.
– you have not added required joins into a context(s). Either the join does not exist or the join is not added.
– you will also see a error message ‘incompatible’ objects… sometimes.
In my case I have 4 tables in one context and 2 tables in other context so I am pulling objects from two contexts and I am ending up with two blocks. So should I make sure that the second context contains all the tables as the first context.
Other than what has already been suggested there is nothing else to add. But what do you think adding all of the tables in your first context into the second context will achieve?
Why are your tables in different contexts?
Would you still get the correct answer if you combine them?
Without looking at your universe and understanding your data, it’s difficult to answer that question for you on a web discussion board. You asked why objects end up in different blocks on a report, and I think we’ve answered that. The rest is up to you.
If the dimensions are not shared in multiple contexts, it generates seperate blocks for each contexts. What is the solution for this? I have 3 contexts but the query needs to get the dimensions from 3 contexts and this query has conditions that comes from multiple contexts.