Sep 18 2009
Use Contexts, Dammit
I haven’t had a good rant in a while. I’m overdue.
Here are some real comments that were posted on BOB.
I already have around 18 contexts in Universe and hence I dont want to add any extra
The last two companies I have worked at, forbade the use of contexts
I only create contexts when I’ve got no other choice.
And this one wins the prize:
Here’s a list of what I cannot do (client requirements)
1. Cannot use contexts in the universe.
…
If you recognize one of your comments, please understand I am not ranting about you as a person, but about the sentiment or opinions expressed in the comment itself.
As a consultant, my job was sometimes to deliver a solution. At other times my job was to provide advice. My advice was based on my assessment of two things: what the client told me they wanted, and what I felt like they really needed. 🙂 As a worst-case scenario I was always prepared to walk away from a job rather than work under rules and restrictions that I knew were incorrect and that would prevent me from delivering the proper solution.
So there is really nothing more frustrating to me than to see comments like what I posted above. If I had a client tell me that I could not use contexts, then my job was to find out why they had that opinion, and then do my best to educate them. Sometimes it was because of a bad experience. Sometimes it was because of a lack of proper understanding of what contexts were supposed to be used for. When building a universe, the number one goal should always be to deliver the correct result. Speed and ease of use are secondary. Contexts are frequently a critical component of a successful universe.
So to the next person who gets a job where the client says to them, “You cannot use contexts,” here is my advice: first try to educate the client as to the proper use of contexts. If that fails, walk away, and take another job. To a client who has a consultant tell them, “You really don’t want to use contexts, they’re much too complicated,” here is my advice: hire another consultant. As a client you’re under no obligation to educate the consultant. 😉
Contexts have a purpose. They’re not a necessary evil, they’re just necessary.
Quote:-“My advice was based on my assessment of two things: what the client told me they wanted, and what I felt like they really needed. 🙂 As a worst-case scenario I was always prepared to walk away from a job rather than work under rules and restrictions that I knew were incorrect and that would prevent me from delivering the proper solution.”
Amen to that :D.
On more than one project I have threatened to walk, “if you want to do it like that” and “Well, if you want to do it like that, get one of your guys to do it and I’ll see you later”
They can be rid of you, on the spot, in my particular case, but no compromise, with some things….
As for contexts, I felt this was a dual rant, some of the best BO solutions I have built have used contexts, in association with having other DB / ETL people that also want to “get it right”!
You’re spot on Dave. I have now worked in several places where there is an anti-context sentiment, and it really is frustrating. I often find the problem is misunderstanding or lack of understanding about how contexts (and maybe even universes!) work, or a mindset of ‘this is how I’ve always done it, and contexts are too complex’.
– Josh
This might be a good time to mention that I owe a big shout-out to Steve Krandel for setting me straight a long time ago about contexts. I wasn’t “anti-context” at the time but I will freely admit that I didn’t completely “get” the concept either. He and I worked together at a location and something he said on the very first day just made the entire picture click into focus.
I know what you’re thinking, you want to know what he said. 🙂 To be honest, I have no idea. I don’t remember.
But what do you do when you’ve got a transactional system with a significant percentage of reports containing no measures and joins that are chosen at run-time? Sometimes you just can’t use contexts.
@Nod:
Again, use the right tool for the job, this ma be contexts and/or aliases.
Back to your OLTP system: Why could you not use contexts with a meaningful name and help text. Either the user will have to choose between different aliased universe objects or between different contexts. The user will have to choose either way 😉
@Andreas: Well, you don’t know our users! Seriously, our business sponsor has gone through 3 directors and is on her second VP – not easy to work with. But we’ve already got several layers of nested prompts and adding contexts (there would be multiple, all reports have at least 2 queries – one for the metadata and one for the data) just wouldn’t cut it. We ended up using linked universes in the end and once we got it all sorted out, it mostly works.
@Nod:
Have you never raised the need for a reporting database (data warehouse, data mart, anything) to improve reporting? Report performance will significantly improve as a result, so to will usability.
Contexts are awesome , if you can handle them! 18 contexts and that’s all :), we have around 15 universes with 70 and more contexts. Yes, I do know that this is not right approach, but unfortunately we do not have different way how to solve this :(, we decided to create multiple context system instead of 35 universe system..Everyone is haapy, at least so far.
Hi, VP, and thanks for your comment. I don’t see anything wrong with the approach, as long as it is working and your users are productive. I have several universes with over 100 contexts due to the time-sliced solution that I have come up with. It’s a bit of a challenge to manage from the designer end of things, but the users love it. They can create all sorts of complex queries simply by dragging and dropping objects on the query panel.
Hi Dave,
Thanks for this great post. I have a question, recently I added a table to out humongous Universe which has some 50 contexts. Now I need to add a join to 35 of those contexts, is there any short cut to add the join to all 35 contexts at a time?
Any help would be very much appreciated.
Thanks
Mohammed Hussain
I am not aware of a shortcut. However, when you add new joins they are listed in the order they’re added to the universe, so it’s relatively easy to open each context, scroll to the bottom of the list, and add the new join. You always know where to find it.
Hi Dave,
Thanks for the quick response. Aand yes, its OK, I’ll take the standard route.
Mohammed Hussain
Hey Dave,
I recently have ran into a contexting issue that is causing me issues in one of my reports. I am using XI 3.1 and have a webi report that spans 4 contexts. The first two contexts both use dimensions: period, location, and product type. The last two contexts both use dimensions: period, location, product type, and inventory type.
There is no relation between inventory type and the first two contexts. Now, I want to add another dimension in my report: delivery period. The delivery period only applies to the first two contexts and has no relationship between the second two contexts (Opposite of inventory type.) When adding this dimension I get the error “The query cannot run, because it contains incompatible objects. See your Business Objects administrator. (Error: WIS 00008)”. It seems I can only pick one dimension that is not conformed to the other contexts. I can either have inventory type or delivery period, but as soon as I put both into my query I get the error. There is no object incompatability setup in the universe. Are there any best practices in dealing with this situation?
Thanks,
Joel
Hi, Joel, interesting question. I think I would need more information so I can draw out a picture before I fully understand what’s going on.
hi dave,
am creating a context for each join..indeed each join refering to a report..requirement that is if there are 40 reorts am creating 40 contexts..
You typically would not have one context for every join in your universe… so perhaps I am misunderstanding your comment. 😕
Hi dave,
here is the thing,i worked on existing universe which containing already more than 35 contexts,now if add new table and make a join,then in the report level,query is partitioned in to two queries,so to avoid this am agin creating new context with the set of tables required and new table.
The problem i am assuming is that and if am right the previous user has created a context for the loop,so eventually if add a new table,then bo will confuse which direction to go,so i think its better to use alias for a loop,as for as my universe am working for oltp databse having more than 50 table sin universe.
so any suggetsions to avoid this.
Thanks
You do not always have to create a new context when you add a new table… instead you should examine the existing contexts to see which of them can appropriately include the new table and join. It may be that more than one of the existing contexts will include the new table.
Hi dave, Even though if i add new join to existing context,all the 6(assume) joins are coming in to picture with respect to that context,where am considering objects from only two tables in web-i report.one table is newly added table and the other table is existing table joined to the new table,so ultimately the number of records not matching,,Thank you.
It sounds like you have a loop if you are getting more joins that those between the two tables in question…
no,there is no loop,,
Thanks for this blog Dave – encourages me, since I’m facing the same situation with my client. And I’m trying to convince them to go for Context! 🙂