Resolving Ambiguous Queries

Objective

After completing this lesson, you will be able to explain why a context may appear when executing a query in a Web Intelligence document.

Contexts in a Query

An ambiguous query contains one or more objects that can return more than one type of information. The universe designer defines how you can use objects and organizes them into contexts to avoid ambiguity. A context is a group of objects that share a common business purpose, usually based on the type of information they represent.

For example, a sales context includes all objects you use to create sales queries. A rentals context includes all objects for rent-related queries. You can combine any objects within the same context to create a query. You can also combine objects from different contexts. If you use an object that belongs to more than one context and the system cannot determine the best context for your query, the system prompts you to choose which context to apply.

Data refresh triggers context selection, which generates a table, while the context is defined by interconnected rentals and sales tables within the universe schema.

You must choose a context each time you run the query if you select the Reset Contexts on Refresh Query property in the Query Properties. You must also choose a context if you select the Clear Contexts option in the Query Properties.

Let's Summarize What You've Learned

  • Use contexts to resolve query ambiguity by grouping related business objects.
  • Select the correct context when prompted to clarify results from ambiguous queries.
  • Combine objects from the same context to build clear and focused queries.