Sep 18 2009

Use Contexts, Dammit

Categories: Rants, Universe Contexts, Universe Design Dave Rathbun @ 7:27 am

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.

22 Responses to “Use Contexts, Dammit”

  1. Comment by Mak 1

    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”!

  2. Comment by Josh Fletcher

    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

  3. Comment by Dave Rathbun

    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.

  4. Comment by nod

    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.

  5. Comment by Andreas

    @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 ;)

  6. Comment by nod

    @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.

  7. Comment by Mark Prosser

    @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.

  8. Comment by VP

    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.

  9. Comment by Dave Rathbun

    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.

  10. Comment by Mohammed Hussain

    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

  11. Comment by Dave Rathbun

    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.

  12. Comment by Mohammed Hussain

    Hi Dave,

    Thanks for the quick response. Aand yes, its OK, I’ll take the standard route.

    Mohammed Hussain

  13. Comment by Joel

    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

  14. Comment by Dave Rathbun

    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.

  15. Comment by naveen

    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..

  16. Comment by Dave Rathbun

    You typically would not have one context for every join in your universe… so perhaps I am misunderstanding your comment. :-?

  17. Comment by naveen

    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

  18. Comment by Dave Rathbun

    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.

  19. Comment by naveen

    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.

  20. Comment by Dave Rathbun

    It sounds like you have a loop if you are getting more joins that those between the two tables in question…

  21. Comment by naveen

    no,there is no loop,,

  22. Comment by Nive

    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! :)

Leave a Reply

If you want to include formulas or code in your comment, please read my Tips for formatting comments first. Tags you can use are listed below.

XHTML: You can use these tags: <a href="" title=""> <acronym title=""> <blockquote cite=""> <code> <em> <strike> <strong> <sup> <sub> <u>

Confirm submission by clicking only the marked checkbox:

         []         

Please remember that comments that are not related to this blog post may be ignored or deleted without notice. If you're looking for help on a topic you have already posted on BOB then please do not repost your question here.