Building a Query Based on a Universe

Objective

After completing this lesson, you will be able to describe the steps to create a query based on a universe for data analysis in a Web Intelligence document.

Build a Query Based on a Universe

To create a new Web Intelligence document, go to the BI Launch Pad home screen, select Applications and then Web Intelligence.

The Applications tab is selected, and the Web Intelligence application is highlighted among available options.

Describe Web Intelligence User Interface Elements

You use the toolbars and panels to access features and manage your workspace.

From the Quick Access panel, select SAP BI Platform Repository and then Universe.

Select a universe in the Select a Universe dialog box to create a document.

Main toolbar, application mode, quick access panel, build panel, and main panel are labeled and outlined on a report editing interface.

Query Panel

Watch the video to understand the Query panel.

Query Process

When you run a query in Web Intelligence, the system completes several steps.

A query flows from Web Intelligence Web Client to SAP BI Platform Processing Server, which retrieves data from the Data Source and returns results to the client.
  • Step 1- Query creation:
    • You drag and drop business objects (dimensions, measures, attributes) from the universe.
    • You add conditions to restrict the data.
  • Step 2 - SQL code generation:
    • When you click Run, the Web Intelligence Processing Server receives your selection of objects and filters.
    • It uses the universe as a translation dictionary.
    • The server translates your business query into one or more queries in SQL (Structured Query Language), the only language the database understands.
    • The SAP BusinessObjects server uses the connection information (defined in the universe) to connect to the source database.
    • It then sends the SQL code generated.
  • Step 3 - Execution and data retrieval:
    • The database receives the SQL query.
    • Its engine executes the query.
    • Once the calculation is complete, the database returns a result set to the SAP BusinessObjects server.
  • Step 4 - Microcube creation:
    • The Web Intelligence Processing Server does not directly pass the raw data to your document.
    • It loads the data into an in-memory data structure specific to your Web Intelligence document, called the microcube.
  • Step 5 - Displaying the data in the report:
    • Finally, the Web Intelligence interface reads the data from the microcube (and no longer from the database) to display your tables, charts, and other elements.
    • This is why, once the engine has executed the query, you can manipulate the data very quickly: create new tables, change a table into a chart, add report filters, create variables... You perform all these operations on the local microcube, without having to query the database again.

Note

This process repeats each time you refresh the query.

Insert a Table

After you run the query, the objects appear in the Main panelObjects tab.

You need to add a new report element. Select each object while holding the Ctrl key and drag the selected objects into the report.

A table lists sales revenue by year, sourced from a query panel containing Year and Sales revenue fields, with a dashed arrow linking them.

Save a Document

If you have the appropriate rights, you can save the current document to a personal or public folder.

The Save As function saves the document only in Web Intelligence document format (*.WID).

Clicking the Save icon opens a dialog to select a folder, enter a file name, and confirm saving or canceling.

Let's Summarize What You've Learned

  • Access Web Intelligence from the BI Launch Pad and select a universe to create a new document.
  • Build queries by dragging objects from the universe and applying filters in the Query panel.
  • Web Intelligence translates your query into SQL, retrieves data, and stores it in a local microcube.
  • Manipulate and display data quickly using the microcube, without re-querying the database.
  • Save your document in Web Intelligence format to a personal or public folder if you have the required rights.

Create a Document with a Simple Query

Business Example

Your manager asks you to analyze the annual sales revenue to identify trends over the past few years. Use the eFashion training universe to gather and visualize this data effectively in a vertical table.