Professional Documents
Culture Documents
Applies to:
SAP BusinessObjects Enterprise Universe Designer, Web Intelligence and Desktop Intelligence. For more information, visit the Business Objects homepage.
Summary
This article explains the universe design techniques to avoid the Ambiguous queries in Web Intelligence / Desktop Intelligence. Author: Saminathan Murugaiyan
Author Bio
Saminathan Murugaiyan is a Senior System Analyst with experience in end-to-end SAP BI/BOBJ implementations across diverse industries such as telecommunication, banking, and healthcare.
Table of Contents
Introduction ......................................................................................................................................................... 3 Ambiguous Queries ............................................................................................................................................ 3 Avoiding Ambiguous Queries Generation .......................................................................................................... 4 Using an Alias ................................................................................................................................................. 4 Using the Where Clause ................................................................................................................................. 5 Related Content .................................................................................................................................................. 6 Disclaimer and Liability Notice ............................................................................................................................ 7
Introduction
Ambiguous queries prompt users to choose one query path or another in the reports. Therefore, the end user should know about the contexts to get the right data. Sometimes it becomes incompatible to the user to select the query path every time. This query generation can be avoided by adding the condition in the Where clause or using Alias.
Ambiguous Queries
As per definition from the BusinessObjects universe designer guide, the ambiguous queries occur when a query includes objects that when used together do not give enough information to determine one context or the other. When a query is ambiguous, Web Intelligence displays a dialog box that prompts the user to select one of two contexts. When the user selects a context, the corresponding tables and joins are inserted into the SQL query. In the picture below, No. of Product Types is created with a formula
COUNT(Distinct(SAM_PRODUCT_DIM.PRODUCT_TYPE_CODE))
where the table SAM_PRODUCT_DIM is identified in both contexts Sales and Order. A report can be created with the objects Customer Name and No. of Product Types from the Order class to list the customer names with their ordered product type count for the orders. The Web Intelligence then displays a dialog box that prompts the user to select one of two contexts.
Using the Where Clause The join path can be identified with the Where clause by adding the join condition in that clause as below. The table SAM_Order_Fact join condition is added in the Where clause of the object No. of Product Types of Order class. Similarly, the table SAM_Sales_Fact join condition should be added in the where class of the object No. of Product Types of Sales class.
Now, Web Intelligence would not show the prompt, but the report SQL will have duplicated join conditions: one from the join and another one from the Where clause.
This technique helps when the ambiguous query is generated by one or two objects from the same table. Once the join condition is added in the Where clause of the object, the condition-related tables can be tracked by the menu options View Associated Tables or View Associated Objects. These techniques can be used based on the number of objects and the universe design. There are some limitations in both techniques. For example, if aliases are created for each new table, maintenance becomes difficult. In the same way, a join in a Where clause wont be considered by Detect Contexts or aggregate aware incompatibility detection. The best practice is that all joins should be available to the Designer automatic detection tools.
Related Content
Universe Designer Using Functions, Formulas and Calculations in SAP BusinessObjects Web Intelligence SAP BusinessObjects Desktop Intelligence Access and Analysis Guide For more information, visit the Business Objects homepage.