Creating a Repository Using the Oracle Business Intelligence Administration Tool

Purpose This tutorial shows you how to use the Oracle BI EE Administration Tool to build, modify, enhance, and manage an Oracle BI repository. Time to Complete Approximately 4 hours

Topics
This tutorial covers the following topics: Overview Prerequisites Building the Physical Layer of a Repository Building the Business Model and Mapping Layer of a Repository Building the Presentation Layer of a Repository Testing and Validating a Repository Creating Calculation Measures Organizing the Presentation Layer Using Initialization Blocks and Variables Adding Multiple Sources Executing Direct Database Requests Using Aggregates Creating Time Series Measures Summary Related information Viewing Screenshots Place the cursor over this icon to load and view all the screenshots for this tutorial. (Caution: This action loads all screenshots simultaneously, so response time may be slow depending on your Internet connection.) Note: Alternatively, you can place the cursor over each individual icon in the following steps to load and view only the screenshot associated with that step. Click a screenshot to hide it.

Overview

This tutorial shows you how to build an Oracle BI metadata repository. You learn how to import metadata from databases and other data sources, simplify and reorganize the imported metadata into a business model, and then structure the business model for presentation to users who request business intelligence information via Oracle BI user interfaces, such as Oracle BI Answers and Oracle BI Interactive Dashboards. Back to Topic List

Prerequisites
Create a directory named SetupFiles under <InstallDrive>. Download and extract the SH.zip file from here to this directory named SetupFiles. This tutorial is for a Windows environment only. Note: If you are a Oracle employee and are using the VMWare environment, you can skip the subtopic Create an ODBC Data Source. Make sure you have 2 GB RAM and 15 GB hard disk space and have VMWare 1.5.x installed on your machine. If you do not have VMWare software, download a copy of VMWare Player from http://www.vmware.com/download/player/. For all others, before starting this tutorial, you should meet the following prerequisites: 1. Have access to or have installed Oracle 10g Database. 2. Have access to or have installed the sample schema. This tutorial uses the SH schema included in the Oracle10g Database. You can also install the schema by following the instructions found in the Installing the Sample Schemas and Establishing a Database Connection OBE tutorial. 3. Have access to or have installed Oracle BI EE 10.1.3.2.

Back to Topic List

Building the Physical Layer of a Repository
In this topic you use the Oracle BI Administration Tool to build the Physical layer of a repository. The Physical layer defines the data sources to which Oracle BI Server submits queries and the relationships between physical databases and other data sources that are used to

process multiple data source queries. The recommended way to populate the Physical layer is by importing metadata from databases and other data sources. The data sources can be of the same or different varieties. You can import schemas or portions of schemas from existing data sources. Additionally, you can create objects in the Physical layer manually. When you import metadata, many of the properties of the data sources are configured automatically based on the information gathered during the import process. After import, you can also define other attributes of the physical data sources, such as join relationships, that might not exist in the data source metadata. There can be one or more data sources in the Physical layer, including databases, spreadsheets, and XML documents. In this example, you import and configure tables from the sample SH schema included with the Oracle 10g database. To build the Physical layer, you perform the following steps: Create a New Repository Create an ODBC Data Source Import SH Schema Create Physical Joins Create a New Repository To create a new repository, perform the following steps: 1. Click Start > Programs > Administrative Tools > Services. 2. In the Services dialog box, stop the Oracle BI Server service.

3. Click Start > Programs > Oracle Business Intelligence > Administration to open the Oracle BI Administration Tool. 4. Click File > New to open the New Repository dialog box.

5. In the New Repository dialog box, the Repository folder is selected by default. Name the file SH.rpd.

6. Click Save. The new repository opens in the Administration Tool and displays three empty layers: Presentation, Business Model and Mapping, and Physical. If necessary, select Tools > Options > Show toolbar to display the toolbar.

The Physical layer is where information on physical data sources is stored. The Business Model and Mapping layer is where measurements and terms used in business are mapped to the physical data sources. The Presentation layer is where the business model is customized for presentation to the user. You can work on each layer at any stage in creating a repository, but the typical order is to create the Physical layer first, then the Business Model and Mapping layer, and then the Presentation layer. Leave the Administration Tool open. Back to Topic Create an ODBC Data Source An ODBC data source is needed to import schema information about a data source into an Oracle BI Server repository. To create an ODBC data source for importing the SH schema information, perform the following steps: 1. Click Start > Programs > Administrative Tools > Data Sources (ODBC) to open the ODBC Data Source Administrator.

Click the System DSN tab and click Add. .2.

. select the Oracle driver.The Create New Data Source dialog box opens. 3. In the Create New Data Source dialog box.

enter a Data Source Name (this can be any name). . and enter SH as the User ID for the SH schema. select the appropriate TNS Service Name from the drop down list (ORCL in this example). 5.4. Click Finish to open the Oracle ODBC Driver Configuration dialog box. In the Oracle ODBC Driver Configuration dialog box.

Click Test Connection to open the Oracle ODBC Driver Connect dialog box. .6. 8. enter the password SH for the SH schema and click OK. In the Oracle ODBC Driver Connect dialog box. You should see a "Testing Connection" message indicating the connection is successful. 7.

perform the following steps: . Click OK to close the Testing Connection message.9. Back to Topic Import SH Schema To import the SH schema information into the repository. Verify that the SH system data source is added in the ODBC Data Source Administrator and click OK to close the ODBC Data Source Administrator. 11. 10. Click OK to close the Oracle ODBC Driver Configuration dialog box.

1. . locate the SH schema folder. enter SH as the user name and password. and click OK to open the Import dialog box. click File > Import > from Database . In the Import dialog box. select the SH ODBC DSN you created in a previous step. 2. In the Select Data Source dialog box. . In the Oracle BI Administration Tool. . 3.

CUSTOMERS.4. SALES. COSTS. TIMES . Expand the SH schema folder and use Ctrl + Click to select the following tables: CHANNELS. PRODUCTS. COUNTRIES. PROMOTIONS.

. verify that the call interface is set to Default (OCI 10g) and change the data source name to the appropriate tnsnames. In the Connection Pool dialog box. which is the default. However. The Connection Pool dialog box opens. Please note that this is the TNS service name. on the General tab.5. You can always delete objects later if they do not support your business model. Verify that only the Tables and Keys checkboxes are selected.ora entry ( ORCL in this example). and click the Import button. It is best practice to only import objects needed to support your business model. not the ODBC DSN. don’t worry if you import extra objects at this point. 6.

7. 9. expand the SH schema folder and verify that the correct tables are imported. 8. In the Physical layer of the repository. The import process starts. When the Import process completes. Leave the rest of the settings as they are and click OK to close the Connection Pool dialog box. . click Close to close the Import dialog box.

verify that the row counts are displayed in the Physical layer of the Administration Tool: Back to Topic Create Physical Joins To create physical joins in the Physical layer of the repository. you can select the SH database object and then click the Physical Diagram button on the toolbar. . In the Physical layer. When update all row counts completes.10. To verify connectivity. Alternatively. 11. perform the following steps: 1. right-click the SH schema folder and select Physical Diagram > Object (s) and All Joins. click Tools > Update All Row Counts.

select Zoom. right-click in the white space. and adjust the size.2. if the tables are too big. In the Physical Diagram. .

Click the New Foreign Key button on the toolbar. 5. Click the Channels table and then the Sales table.3. Rearrange the tables so they are all visible in the Physical Diagram. . 4. The Physical Foreign Key dialog box opens.

The Administration Tool makes a best "guess" and automatically determines which columns should be included in the join.It matters which table you click first. Click OK to close the Physical Foreign Key dialog box. The join is creating a one-to-many (1:N) relationship that joins the key column in the first table to a foreign key column in the second table. The join between Channels and Sales is displayed in the Physical Diagram. . Make sure the join expression is: CHANNELS.CHANNEL_ID 6.CHANNEL_ID = SALES.

CUST_ID = SALES. .PROD_ID CUSTOMERS.PROD_ID = SALES.TIME_ID = SALES.COUNTRY_ID Note that Countries joins to Customers and Costs in not joined for now.TIME_ID PRODUCTS.COUNTRY_ID = CUSTOMERS.PROMO_ID TIMES. Continue to create the following joins: PROMOTIONS.CUST_ID COUNTRIES. All other tables join directly to Sales.PROMO_ID = SALES.7.

You learn more about consistency check later in this tutorial. Select File > Save or click the Save button on the toolbar to save the repository. Checking Global Consistency checks for errors in the entire repository. click the X in the upper right corner to close the Physical Diagram. 10. Back to Topic Back to Topic List . bypass this check until the other layers in the repository are built. imported a table schema from an external data source into the Physical layer. set up an ODBC data source. Since these layers are not defined yet. Some of the more common checks are done in the Business Model and Mapping layer and Presentation layer. 8. In the next topic you learn how to build the Business Model and Mapping layer of a repository. and defined keys and joins. 9. Click No when prompted to check global consistency. Congratulations! You have successfully created a new repository. Leave the Administration Tool and the SH repository open for the next topic.When you are finished.

Most of the vocabulary translates into logical columns in the business model. Logical fact tables contain the measures by which an organization gauges its business operations and performance. A business model object contains the business model definitions and the mappings from logical to physical tables for the business model. . There are two main categories of logical tables: fact and dimension. Collections of logical columns form logical tables. perform the following steps: 1. The Business Model and Mapping layer of the Administration Tool can contain one or more business model objects.Building the Business Model and Mapping Layer of a Repository In this topic you use the Oracle BI Administration Tool to build the Business Model and Mapping layer of a repository. you perform the following steps: Create a Business Model Create Logical Tables Create Logical Columns Create Logical Joins Rename Business Model Objects Delete Unnecessary Business Model Objects Build Dimension Hierarchies Create a Business Model To create a new business model. Each logical column (and hence each logical table) can have one or more physical objects as sources. In the Business Model and Mapping layer. Logical dimension tables contain the data used to qualify the facts. right-click the white space and select New Business Model. model of the data and specifies the mappings between the business model and the Physical layer schemas. The business model simplifies the physical schema and maps the users’ business vocabulary to physical sources. The Business Model and Mapping layer of the Administration Tool defines the business. or logical. The main purpose of the business model is to capture how users think about their business using their own vocabulary. To build the Business Model and Mapping layer. This is where the physical schemas are simplified to form the basis for the users’ view of the data.

Leave it empty. The Description edit box is used to add a comment for yourself or another developer. name the business model SH and leave the Available for queries box unchecked. In the Business Model dialog box.2. .

The new SH business model appears in the Business Model and Mapping layer. You enable the business model for querying later after the Presentation layer is defined and the repository passes a global consistency check.3. The red symbol on the business model indicates it is not yet enabled for querying. 2. In the Logical Table dialog box. . perform the following steps: 1. In the Business Model and Mapping layer. right-click the SH business model and select New Object > Logical Table. Back to Topic Create Logical Tables To create a new logical table. name the table Sales Facts. Click OK to close the Business Model dialog.

Click OK to close the Logical Table dialog. perform the following steps: 1. In the Physical layer. The Sales Facts logical table appears in the SH business model in the Business Model and Mapping layer. . expand the Sales physical table. The Sources folder is populated in the next step when you create a logical column.3. Back to Topic Create Logical Columns To create a logical column.

.2. A new AMOUNT_SOLD logical column is added to the Sales Facts logical table. Drag the AMOUNT_SOLD column from the Physical layer to the Sales Facts logical table in the Business Model and Mapping layer. Select the column AMOUNT_SOLD. 3.

is the same name as the physical table. Because you dragged a column from the Physical layer. SALES. it is possible to change names in the Business Model and Mapping layer without impacting the mapping. However. . A logical table’s Sources folder contains the logical table sources. Logical table sources define the mappings from a logical table to a physical table. Expand the Sources to see the logical table source that was created automatically when you dragged the AMOUNT_SOLD column from the Physical layer.4. the logical table source name.

5. double-click the AMOUNT_SOLD logical column to open the Logical Column dialog box. 6. In the Business Model and Mapping layer. Click the Aggregation tab. .

select SUM. In the Default aggregation rule drop down list. .7.

8. Back to Topic Create Logical Joins To create logical joins in the business model. Select only these tables: . Notice that the logical column icon is changed to indicate an aggregation rule is applied. Click OK to close the Logical Column dialog box. perform the following steps: 1. Select the following tables in the Physical layer.

TIMES 2. PRODUCTS. CUSTOMERS. .CHANNELS. Because you have not yet created the logical joins. this indicates a fact table. In the Business Model and Mapping layer. This automatically creates logical tables in the Business Model and Mapping layer. all table icons are yellow. PROMOTIONS. The icon color for dimension tables changes to white in a later step when you create logical joins. Notice that each logical table has a yellow table icon. Drag the selected tables from the Physical layer onto the SH business model folder in the Business Model and Mapping layer. 3. Right-click the SH business model and select Business Model Diagram > Whole Diagram.

4. 5. Rearrange the table icons so they are all visible. Place the Sales Facts table in the middle. . Adjust the zoom factor. if desired. Click the New Complex Join button in the toolbar.

when defining logical joins. Do not change the default values.6. you leave the defaults as they are. The second table clicked is the many side of the relationship. The Logical Join dialog box opens. is at the many end of the join: . Leave the default values as they are. Also note which properties you cannot set: the join expression and the join columns. 7. tables. driving table. join type. but note which properties you can set: name. Sales Facts. click OK. and verify your work in the Logical Table Diagram. The order is important. business model. Notice that the fact table. Typically. and cardinality. Click the Channels table icon first and then click the Sales Facts table icon in the Logical Table Diagram window.

Notice that the color of the table icons for the dimension tables has changed to white in the business model. Defining the join relationships determined which tables are the logical dimension tables and which is the logical fact table. and five logical dimension tables: Channels. and Times. Click the X in the upper right corner to close the Logical Table Diagram. Your final result should look similar to the picture. Promotions. Repeat the steps for the remaining tables. A fact table is always on the many side of a logical join. You now have a logical star schema consisting of one logical fact table. . Products. In a business model. Customers. 9. a yellow icon indicates a fact table and a white icon indicates a dimension table. Sales Facts.8.

Save the SH repository. click Rename Wizard and then Execute. Do not check global consistency. Back to Topic Rename Business Model Objects To use the Rename Wizard to rename the objects in the business model. 2. perform the following steps: 1.10. In the Utilities dialog box. Click Tools > Utilities. .

Click the Add Hierarchy button. In the Rename Wizard. click the Business Model and Mapping tab and select the SH business model. . 4.3.

Click Next. 6.5. . Click Select None.

. Check Logical Table and Logical Column.7.

9. . Select All text lowercase. Click Next.8.

10. Click Add. .

In the Replace box. type an underscore. Click Change specified text. type a space. . In the Find box.11.

. Click Add.12.

13. Click First letter of each word capital and click Add. .

In the Replace With box. Click Change specified text. type a space and the letters Id. type a space and the letters ID. .14. In the Find box. Check Case sensitive.

15. Click Add. .

Click Next and review changes.16. .

. Click Finish and verify that logical tables and logical columns in the Business Model and Mapping layer are changed as expected.17.

Back to Topic Delete Unnecessary Business Model Objects To delete logical columns that are not needed in the business model. For the Channels logical table in the Business Model and Mapping layer. use Ctrl + click to select the Channel Class ID and the Channel Total ID logical columns. . 2. Right-click either of the highlighted columns and select Delete to delete the columns. perform the following steps: 1.18. Save the repository. Do not check global consistency.

you can use the Delete key on your keyboard. 4. 3. Verify that the Channels logical table now has only four logical columns. Click Yes to confirm the delete.Alternatively. .

Repeat the steps to delete the following logical columns in the Customers table: Cust City ID Cust State Province ID Country ID Cust Main Phone Number Cust Total ID Cust Src ID Cust Eff From Cust Eff To Cust Valid .5.

. Place the cursor over the icon to display the screenshot and verify that the Customers logical table has only the following logical columns: 7. Place the cursor over the icon to display the screenshot and repeat the steps to delete the highlighted logical columns in the Products table.6.

Place the cursor over the icon to display the screenshot and repeat the steps to delete the highlighted logical columns in the Promotions table. .8. Place the cursor over the icon to display the screenshot and verify that the Products logical table has only the following logical columns: 9.

customers. Common dimension hierarchies used in a business model are time periods. Do not check global consistency. 12. suppliers. In a business model. a dimension hierarchy represents a hierarchical organization of logical columns belonging to a single logical dimension table. and so forth. Do not delete any columns in the Times table. . Save the repository. Back to Topic Build Dimension Hierarchies Dimension hierarchies introduce formal hierarchies into a business model.10. products. Place the cursor over the icon to display the screenshot and verify that the Promotions logical table has only the following logical columns: 11. allowing Oracle BI Server to calculate useful measures and allowing users to drill down to more detail.

Right-click the Channels logical table and select Create Dimension. In each dimension hierarchy.Dimension hierarchies are created in the Business Model and Mapping layer and end users do not see them in end user tools such as Oracle BI Answers or Interactive Dashboards. Right-click the ChannelsDim object. 2. They provide the structure that Oracle BI Server uses to drill into and across dimensions to get more detailed views of the data. configure level-based measure calculations. To build the Channels dimension hierarchy in the SH business model. and determine what attributes appear when Oracle BI users drill down in their data requests. . you organize dimension attributes into hierarchical levels. Dimension hierarchy levels are used to perform aggregate navigation. These levels represent the organizational rules and reporting needs required by your business. and select Expand All. which was created by the action in the previous step. perform the following steps: 1.

3. Place the cursor over the icon to display the screenshot and verify that the ChannelsDim dimension hierarchy matches the picture. Right-click the Channels Detail level and select New Object > Parent Level. 4. .

The ratio from one level to the next is more important than the absolute number.5. name the logical level Class and set the Number of elements at this level to 3. This number does not have to be exact. In the Logical Level dialog box. These numbers only affect which aggregate source is used (optimization. . not correctness of queries).

6. Click OK to close the Logical Level dialog box. The new Class level is added to the hierarchy.

7. Right-click the Class level and select Expand All.

8. Drag the Channel Class column from the Channel Detail level to the Class level to associate the logical column with this level of the hierarchy.

9. Right-click Channel Class and select New Logical Level Key.

10 In the Logical Level Key dialog box, verify that Channel Class and Use for drilldown are selected. The level key defines the unique elements in each logical level. Each level key can consist of one or more columns at this level.

11. Click OK to close the Logical Level Key dialog box. The Channel Class column now displays with a key icon.

12. Right-click the Class level and select New Object > Parent Level.

13. In the Logical Level dialog box, name the logical level Channel Total Attribute and set the Number of elements at this level to 1.

. 15. The Channel Total Attribute level is added to the hierarchy. Click OK to close the Logical Level dialog box. Right-click the Channel Total Attribute level and select Expand All.14.

16. level. 17. Drag the Channel Total column from the Channel Detail level to the Channel Total Attribute . . Right-click Channel Total and select New Logical Level Key.

18. verify that Channel Total and Use for drilldown are selected. . In the Logical Level Key dialog box.

19. 20. The Channel Total column now displays with a key icon. Click OK to close the Logical Level Key dialog box. . Right-click the Channel Desc column and select New Logical Level Key.

Both Channel Desc and Channel ID display with key icons.21. 22. notice that Use for drilldown is selected. Click OK to close the Logical Level Key dialog. In the Logical Level Key dialog box. .

23. Double-click the Channels Detail level to open the Logical Level dialog box. .

Click Channels Detail_Key.24. Click the Keys tab. . 25.

.26. Click the Edit button.

uncheck Use for drilldown.27. In the Logical Level Key dialog box. .

not the Channels Detail_Key column. Later. when a user drills down from the Channel Class column (the next highest level). the default is to drill down to the Channel Desc column. when a user drills down in Answers or a dashboard. the default drill is to the level key that has Use for drilldown checked in the next lowest level. .28. Channel Desc is used for drill down Channels Detail_Key is not. Based on this example. Notice that the key icons are different. Click OK to close the Logical Level Key dialog box.

Click OK to close the Logical Level dialog box. Place the cursor over the icon to display the screenshot and verify that the finished ChannelsDim hierarchy looks like the picture.29. 30. .

Optional: Build a dimension hierarchy for the Products logical table. Save the repository. In Part Two of this OBE. For the Product Total Attribute level. set Number of elements at this level to 1. For the Category level. 32. The ProductsDim dimension hierarchy should have the following characteristics: For the Subcategory level. Don't worry if you cannot complete this step. set Number of elements at this level to 21. you use a different repository that already has the dimension hierarchies prebuilt. and the characteristics below as a guide.31. . set Number of elements at this level to 5. Use the preceding steps. Do not check global consistency. the screenshot.

You typically create Presentation layer objects by dragging objects from the Business Model and Mapping layer. Back to Topic Back to Topic List Building the Presentation Layer of a Repository In this topic you use the Oracle BI Administration Tool to build the Presentation layer of a repository. such as Oracle BI Answers. Presentation layer objects can then be renamed and reorganized. If you complete this step. Simplifying the view of the data for users makes it easier to craft queries based on users’ business needs because you can expose only the data that is meaningful to the users. The Presentation layer is built after the Physical layer and Business Model and Mapping layer and adds a level of abstraction over the Business Model and Mapping layer. . and rename data as necessary for the set of users. For example. To build the Presentation layer. you can organize columns into catalogs and folders. Do not check global consistency. organize the data in a way that aligns with the way users think about the data. The Presentation layer provides a means to further simplify or customize the Business Model and Mapping layer for end users.For the Products Detail level. Corresponding objects are automatically created in the Presentation layer. Drag the SH business model from the Business Model and Mapping layer to the Presentation layer to create the SH catalog in the Presentation layer. you perform the following steps: 1. uncheck Use for drill down for Products Detail_Key (Prod ID). save the repository. It is the view of the data seen by end users in client tools and applications. Check Use for drill down for all other keys in the ProductsDim hierarchy.

Expand the SH catalog in the Presentation layer. Notice also that dimension hierarchies are not displayed. 3. Save the repository. Notice that the tables and columns in the Presentation layer exactly match the tables and columns in the Business Model and Mapping layer.2. Do not check global consistency. .

For each message the Consistency Check Manager identifies the message type. but is not a requirement for a consistent repository.ini Start Oracle BI Services Use Oracle BI Answers to Execute Queries Use Query Log to Verify Queries Run a Consistency Check Consistency check is a utility in the Administration Tool that checks if a repository has met certain requirements. if there are physical tables with no keys defined. To test and validate a repository. depending upon the intent of the Oracle BI Server administrator. There are options to display only selected message types. check all objects in the repository. a best practice message is displayed. Repositories and the business models within them must pass the consistency check before you can make business models available for queries. You begin by checking the repository for errors using the check consistency option. Warning messages indicate conditions that may or may not be errors. You then test the repository by running queries using Oracle BI Answers. For example. Best Practices messages provide information about conditions but do not indicate an inconsistency. and provides a detailed description of the message. a detailed message alerts you to the nature of the inconsistency. the object. The Consistency Check Manager displays three types of messages: Error messages indicate errors that need to be fixed to make the repository consistent. Defining keys for physical tables is best practice. you examine the query log file to verify the SQL generated by Oracle BI Server. Finally. display results using qualified names.Back to Topic List Testing and Validating a Repository You have finished building the initial business model and now need to test the repository before continuing your development. and copy the results to another file. When a repository or business model is inconsistent. but is not a requirement for a consistent repository. the object type. if the Administrator user has an empty password this should be addressed. For example. you perform the following steps: Run a Consistency Check Enable Query Logging Modify NQSConfig. .

To check consistency. Select File > Check Global Consistency. . 2. You should receive a message indicating that the repository is consistent and asking if you want to make it available for queries. you perform the following steps: 1. Click Yes to make the SH business model available for queries. The Consistency Check Manager displays. 3.

you can ignore the messages for now and click Close. If you see only Warning and Best Practices messages. . If the Consistency Check Manager displays any Error messages.4. edit the repository to correct the inconsistencies and run the consistency check again.

notice that the SH business model icon has changed to indicate the business model is now available for queries (the red circle with a line is gone). In the Business Model and Mapping layer. Notice that Available for queries is checked. 6. Double-click the SH business model object to open the Business Model properties dialog box. .5.

7. Click OK to close the Business Model properties dialog box. Click No when asked to check global consistency (you just checked it). perform the following steps: 1. Back to Topic Enable Query Logging To enable query logging for the Administrator user. Save the repository. 8. . Select Manage > Security.

3.2. In the right pane. set the value to 2. In the Security Manager. select Users in the left pane. In the Password field. The User dialog box opens. Verify that the User tab is selected. 4. double-click Administrator. type Administrator and then confirm in the Confirm Password field. . The Administrator user appears in the right pane. In the Logging level field.

Do not check global consistency. 6. debugging. you need to generate some queries. Save the repository. In production mode. . and examine the query log.To test the repository. Select File > Close to close the repository. 8. logging is normally disabled because query logging can impact performance by producing very large log files. Logging is intended for testing. and technical support. 7. 5. You log query activity at the individual user level. Click Action > Close to close the Security Manager. retrieve the results. Click OK to close the User dialog box.

.ini. except to test the cache. 1. Locate the [ REPOSITORY ] section and change the entry to Star = SH.rpd. such as Notepad.ini In this step. Caching is typically not used during development. DEFAULT. 2. it logs the error to the server log file (. NQSConfig. Select File > Exit to close the Administration Tool.INI with a text editor.9. Back to Topic Modify NQSConfig. . Navigate to . You also disable caching.. An entry in the Repository section of the initialization file instructs Oracle BI Server to load a specific repository into memory upon startup..\OracleBI\server\Config\ and open NQSConfig..\\OracleBI\server\Log\NQServer. you update the Repository and Cache sections of the initialization file. If Oracle BI Server detects a syntax error while loading the repository.log).

Start the Oracle BI Server service. 4. start them.3. In the [ CACHE ] section.INI. It is not necessary to start the Oracle BI Scheduler or Oracle BI Cluster Controller services. Back to Topic Start Oracle BI Services In this step. The services can be started in any order. immediately below the [ REPOSITORY ] section. change the ENABLE parameter from YES to NO. 2. you start the Oracle BI Server service to load the SH repository into memory. Select Start > Programs > Administrative Tools > Services. Save the changes and close NQSConfig. If they are not started. . 1. Verify that the Oracle BI Presentation Server and Oracle BI Java Host services are started.

Click the Answers link.3. Minimize the services window. Log in to Oracle Business Intelligence as Administrator with password Administrator. 2. . perform the following steps: 1. 4. Select Start > Programs > Oracle Business Intelligence > Presentation Services. Back to Topic Use Oracle BI Answers to Execute Queries To start Oracle BI Answers and execute a query. 3. Click the SH subject area.

click the Customers folder to expand it. .5. In the left pane. Notice that the folders and columns in Answers match the folders and column in the Presentation layer of the repository.

6. . Click the Cust State Province column in the left pane to add it to the request criteria on the right.

7. . Click the Sales Facts folder in the left pane to expand it.

By default. Click the Amount Sold column to add it to the request criteria. 9. . results are displayed in a compound layout. consisting of a title and a table view. 10. Click the Results tab.8.

. 2. Click Settings > Administration to open the Oracle BI Presentation Services Administration Window.Back to Topic Use Query Log to Verify Queries 1. Click the Manage Sessions link to open the Session Management window.

The log file should look similar to the picture. click the View Log link for the last entry. The log displays the last query executed by Administrator. .3. 4. under Cursor Cache. In the Session Management window.

Close the query log. 5. . subject area. This section identifies the repository. The rest of the file contains information such as query status. Locate the General Query Info section. number of rows returned. just below the General Query Info section. and presentation catalog from which the query was run.Locate the SQL Request section. This section identifies the physical data source to which Oracle BI Server is connecting and the physical SQL that was generated. Locate the Sending query to database named SH section. and so forth. This section contains the logical SQL issued from Answers. just below the SQL Request section.

and tested the repository using Oracle BI Answers. The advantages to building calculation measures in the repository is the measures are built once and can be made available to all users. You can also build calculation measures in Answers. There are different methods for creating calculation measures in the Administration Tool. and so forth. a business wants to compare values of a measure and needs a calculation to express the comparison. In the examples in this lesson. You can use existing logical columns as objects in a formula. You use logical columns for calculation formulas that require an aggregation rule that is applied before the calculation. Click Close Window to close the Oracle Bi Presentation Services Administration window. Oracle BI Server has a calculation engine to perform a multitude of calculations. The advantage of defining a logical column formula based on existing logical columns is that you only have to define it once. Congratulations! Up to this point you have successfully built the Physical. you use the Expression Builder to create calculation measures that appear as columns to users in Answers. mapping to aggregate tables. Users can then easily build queries using familiar terminology.6. Business Model and Mapping. You use physical columns for calculations that require and aggregation rule to be applied after the calculation. To create calculation measures. Calculation measures allow end users to ask business questions like “Show me the accounts receivable balance as of Q3” or “Show me the difference between units ordered and units shipped. 8. For the remainder of this OBE you enhance the repository by performing tasks such as building calculation measures. and Presentation layers of a repository. building variables and initialization blocks. Leave Answers open. you perform the following steps: . or use the Calculation Wizard to automate the process. run a consistency check.” An Expression Builder enables you to create expressions that are similar to expressions created with SQL. Back to Topic Back to Topic List Creating Calculation Measures Often. use physical columns as objects in a formula. Click Finished to close the Session Management window. 7. When you create formulas based on physical columns. adding multiple logical table sources. All three methods are covered in this OBE. you have to map for each physical source it could be derived from.

Load a Prebuilt Repository Create a New Measure Create a Calculation Measure Using Answers Create a Calculation Measure Using Logical Columns Create a Calculation Measure Using Physical Columns Create a Calculation Measure Using the Calculation Wizard Load a Prebuilt Repository A prebuilt repository is provided to expedite your completion of the remaining exercises in this OBE. The provided repository is similar to the repository you built in the first part of this OBE, but with the following relevant differences: Physical joins are built for the the COSTS physical table in the Physical layer. There are four additional dimension hierarchies: CustomersDim, ProductsDim, PromotionsDim, and TimesDim. To load the prebuilt repository, perform the following steps: 1. Stop the Oracle BI Server service. 2. Using Windows Explorer, navigate to <InstallDrive>\OracleBI\server\repository. 3. Change the name of the SH.rpd file to SH_PartOne.rpd. 4. Using Windows Explorer, navigate to the SetupFiles folder and copy the SH_PartTwo.rpd file to <InstallDrive>\OracleBI\server\repository. 5. Rename SH_PartTwo.rpd to SH.rpd. There is no need to update the NQSConfig.ini file, because, in an earlier step, you modified the entry in the Repository section of the initialization file to instruct Oracle BI Server to load the SH repository into memory upon startup. 6. Start the Oracle BI Server service. 7. Click Start > Programs > Oracle Business Intelligence > Administration to open the Administration Tool. 8. Click File > Open > Online.

9. In the Open Online AnalyticsWeb dialog box, type Administrator in the Password field and click Open.

10.The SH repository opens in online mode.

Up to this point , all the changes you have made to the repository have been in offline mode. Now that you have a consistent repository and Oracle BI Server is running and using the repository, you can make changes to the metadata in online mode. In offline mode the relationship between the Administration Tool and the repository is like the relationship between any Windows application and a file. An application, the Administration Tool in this case, opens a file for editing, makes changes to its in-memory copy, and tells the OS to save the changed file. In online mode, the relationship is different. Oracle BI Server has already opened the repository file and the operating system has put a write-lock on the file. In this mode, Oracle BI Server can act as an agent of the Administration Tool. When the Administration Tool tells it to, Oracle BI Server sends the Administration Tool a copy of its in-memory repository. Then it listens for messages from the Administration Tool about changes, makes those changes to its in-memory

copy, and, when told by the Administration Tool, tells the OS to save the changed file. When you start the Administration Tool in online mode, you pick an Oracle BI ODBC DSN that points to the repository you want to edit (i.e., the repository that is the default repository in the DSN). The Administration Tool then communicates changes to Oracle BI Server and Oracle BI Server makes the corresponding changes to its in-memory copy. Typically, you develop a repository in offline mode and use online mode for minor updates and changes. If desired, examine the structure of the provided repository before proceeding with the remaining steps in this OBE. In particular, examine the relevant differences: the physical joins for the COSTS physical table, and the four additional dimension hierarchies: CustomersDim, ProductsDim, PromotionsDim, and TimesDim. 11.To verify connectivity, click Tools > Update All Row Counts. This may take a few minutes. 12.When Update Row Counts completes, expand the Physical layer and verify that row counts appear for all tables and columns.

Notice that the objects have a red check mark. Since Oracle BI Server may be processing queries while you are editing the repository in online mode, you must check out objects before editing them. Once the objects have been edited, you check them in again. At that point the changes you

made become active. When you are finished editing, you can save the changes to the repository. In this example, the Administration Tool is configured to check out objects automatically. Thus, objects were checked out automatically when you ran Update Row Counts. If you do not see the red check marks, select Tools > Options > General Tab > Check out objects automatically.

Back to Topic Create a New Measure To add a new measure to the Sales Facts table, perform the following steps: 1. In the Physical layer, navigate to COSTS > UNIT_COST.

2. Drag UNIT_COST from the Physical layer to the SALES logical table source for the Sales Facts logical table. UNIT_COST appears as a logical column in the Sales Facts logical table.

3. Right-click the UNIT_COST logical column, select Rename, and rename the column to Unit Cost. Alternatively, slowly double-click the column to make it editable.

4. Set the aggregation rule for the Unit Cost logical column to SUM. Hint: double-click the column to open the Logical Column properties dialog box and click the Aggregation tab..

5. Drag the Unit Cost logical column to the Sales Facts presentation folder.

.6. Click Yes when prompted to check global consistency. 7. Review the messages. Click File > Check In Changes or click the Check In Changes button on the toolbar to check in changes. The Consistency Check Manager opens and displays Warnings and Best Practices messages.

you disable the Warnings and Best Practices messages. Click the Options tab.8. For the purposes of this OBE. . and then click the Disable button. Expand Warnings folder. 9. select Check Features Match Default.

Click the Messages tab. indicating a consistent repository. 12.If you desire. review the other Best Practices items that are checked. 10. . review the other Warnings items that are checked. The Consistency Check Manager displays with no messages. If you desire. 11.Select Best Practices > Physical Table > Search for Tables With No Keys.Click Check All Objects. and then click the Disable button.

Sales Facts.Calendar Year. If Answers is not open. . Sales Facts.Return to Answers to test the new column in Answers. 15. 16.Save the repository.13.Amount Sold. and click the SH subject area. log in as Administrator with password Administrator.Build the following request: Times.Unit Cost. click the Answers link. 14. 17. select Start > Programs > Oracle Business Intelligence > Presentation Server.Click Close to close the Consistency Check Manager.Click Reload Server Metadata.

19. 4. To create a calculation measure using Answers. Click the Criteria tab. 2. You do this so you can compare your results later when you create similar calculations measures in the repository."Amount Sold" in the Column .Click Settings > Administration > Manage Sessions > View Log to view the query log and examine the SQL generated by the request. you create a calculation measure using Answers. 3. perform the following steps: 1. Back to Topic Create a Calculation Measure Using Answers Before you create calculation measures in the metadata using the Administration Tool. Click the Edit Formula button for the Amount Sold column that you just added.18.Click Results. The Edit Column Formula dialog box displays with "Sales Facts". Add another Amount Sold column to the request. The request from the previous set of steps should still be open.

"Amount Sold" in the Column Formula field. click to the right of "Sales Facts". 5. Click the Minus operator to add it to the formula.formula field. 6. In the Edit Column Formula dialog box. .

In the left panel. click Sales Facts > Unit Cost to add it to the formula. .7.

. Click the Custom Headings check box.8.

In the Custom Heading field.9. . type Gross Profit.

Leave Answers open for the next topic. Click Settings > Administration > Manage Sessions > View Log to view the query log. . Click OK to close the Edit Column Formula dialog box and verify the change to the request. 12. 13. 11. Click Results.10.

. perform the following steps. using existing logical columns to define the calculation formula. 1. which should still be open in online mode in the Administration Tool. 2. 3. Return to the SH repository. Right-click the Sales Facts logical table and select New Object > Logical Column. To create a calculation measure using logical columns. name the logical column Gross Profit and check Use existing logical columns as the source. In the Logical Column dialog box.Back to Topic Create a Calculation Measure Using Logical Columns In this topic. you define a new calculation measure named Gross Profit in the Sales Facts logical table.

click Logical Tables. 5. Click the Expression Builder button (three dots) to open the Expression builder. . In the left pane.4.

Select Sales Facts in the middle pane. 7. . and click Insert. The Amount Sold column is added to the formula. Click the minus sign operator to add it to the formula.6. Amount Sold in the right pane.

Click OK to close the Expression Builder. . Notice that the formula appears in the Logical Column dialog box.8. 9. Double-click Unit Cost in the right pane to add it to the formula.

Drag the Gross Profit logical column to the Sales Facts table in the Presentation layer. 11.Click OK to close the Logical Column dialog box.10. The Gross Profit logical column appears in the business model. .

Save the repository. close the Consistency Check Manager.Click Yes when prompted to check global consistency. If the repository is consistent (no Error messages). 16. . 15. 14. you must correct the errors before continuing.Return to Answers.12.Check in changes.Click Reload Server Metadata. 17. If there are Error messages.Expand Sales Facts and verify that the Gross Profit column is now visible in Answers. 13. which should still be open from the previous topic.

) Times.Amount Sold. 20. Sales Facts. Sales Facts. .Unit Cost.Calendar Year.Click Results. Sales Facts. delete the Gross Profit column you created in Answers and then add the Gross Profit column you created in the repository to the query. Verify that the results are the same as for the query you built using the Gross Profit column created in Answers.Gross Profit 19.Click Settings > Administration > Manage Sessions > View Log to view the query log.18. Your results should look similar to the picture. (If the request from the previous topic is still open.Create the following request.

. 21.SAWITH0.Click Close Window to close Oracle BI Presentation Services Administration. 23. You compare these results to the query results in the next practice.Note that the difference between AMOUNT_SOLD and UNIT_COST is being calculated in the outer query block (SAWITH0. 24.c1 as c4 in the example pictured here).Click Finished to close the Session Management window. Because you defined the Gross Profit calculation using logical columns.Close the query log.Leave Answers open for the next topic.c2 . 22. the columns are summed first and then the difference is calculated.

2. Right-click the Sales Facts logical table and select New Object > Logical Column. you define a new calculation measure named Gross Profit Physical in the Sales Facts logical table. 3. using physical columns to define the calculation formula.Back to Topic Create a Calculation Measure Using Physical Columns In this topic. Return to the SH repository. name the logical column Gross Profit Physical. 1. . which should still be open in online mode in the Administration Tool. In the Logical Column dialog box. perform the following steps. To create a calculation measure using physical columns.

5.4. . Click the Aggregation tab. Set the default aggregation rule to SUM.

Gross Profit Physical is added to the business model. The Logical . 7. Click OK to close the Logical Column dialog box.6. Expand Sales Facts > Sources and double-click the SALES logical table source.

Click the Column Mapping tab.Table Source dialog box opens. 8. .

9. Click the Expression Builder button for the Gross Profit Physical logical column. .

10. select Physical Tables > SALES > AMOUNT_SOLD and then click the Insert button to add the column to the formula.In the Expression Builder. .

Click the minus sign operator to add it to the formula. . 12.Select Physical Tables > COSTS > UNIT_COST and then click the Insert button to add the column to the formula.11.

13. .Click OK to close the Expression Builder. Notice that the expression is added in the Logical Table Source dialog box.

Click OK to close the Logical Table Source dialog box.Drag Gross Profit Physical to Sales Facts in the Presentation layer.14. The icon for Gross Profit Physical changes to indicate an aggregation rule is applied. 15. .

18. which should still be open from the previous topic.Check in changes. . close the Consistency Check Manager. If the repository is consistent (no Error messages). 19.16.Click Reload Server Metadata.Click Yes when prompted to check global consistency. 20. If there are Error messages.Return to Answers. you must correct the errors before continuing. 17.Save the repository.

22.Amount Sold.Click Results. whereas the calculation formula for the physical columns looks like this: sum(AMOUNT_SOLD – UNIT_COST). Because of arithmetic laws.Create the following request. you know that you can sum ColumnA and sum ColumnB and then take the differences of those sums. Times. and have exactly the same results if you calculate the difference first (the value in ColumnA – the value in ColumnB for each row) and then sum the difference. Sales Facts.Expand Sales Facts and verify that the Gross Profit Physical column is now visible in Answers. the results are the same for the .21. Sales Facts. Sales Facts.Calendar Year. So in this example. The calculation formula for the logical columns looks like this: sum(Amount Sold) – sum(Unit Cost).Unit Cost.Gross Profit Physical 23. Verify that the results are the same for the Gross Profit Physical (built using physical columns) as they were for the Gross Profit column (built using logical columns).

24.Click Finished to close the Session Management window. .Leave Answers open for the next topic.Click Close Window to close Oracle BI Presentation Services Administration. 28. 27. Note that the difference between amount sold and unit cost is calculated first and then summed: sum(T245.AMOUNT_SOLD .Click Settings > Administration > Manage Sessions > View Log to view the query log. Back to Topic Create a Calculation Measure Using the Calculation Wizard In this topic. you use the Calculation Wizard to define a new calculation measure named Share of Category in the Sales Facts logical table.logical column and the physical column calculations.T168. 25.UNIT_COST)in the example pictured here.Close the query log. 26. Your results should look similar to the picture.

which should still be open in online mode in the Administration Tool. Return to the SH repository. 2. A new column named Amount Sold#1 is added to the business model. Right-click the Amount Sold logical column and select Duplicate.To create a calculation measure using the Calculation Wizard. perform the following steps: 1. . 3.

Double-click Category Sales to open the Logical Column dialog box. . Rename Amount Sold#1 to Category Sales.4. 5.

You use the Calculation Wizard to create a share measure in the steps that follow. 7.6. Right-click Amount Sold and select Calculation Wizard. . Click OK to close the Logical Column dialog box. Click the Levels tab and select Category as the logical level for ProductsDim. Level-based measures are useful for creating share measures. 8. Category Sales is now a level-based measure that will calculate total sales at the category level when used in a query.

The Calculation Wizard opens. .

9. . 10. Click Next.Check Category Sales as the column to compare with Amount Sold.

12.11. .Uncheck Change and Percent Change and check Percent.Click Next.

13.Change Calculation Name to Share of Category. .

14.Click Next. .

15. 16. Share of Category is added to the business model. .Drag Category Sales and Share of Category to Sales Facts in the Presentation layer.Click Finish.

close the Consistency Check Manager.Save the repository.Return to Answers. 19. 21.Click Reload Server Metadata.Check in changes. If there are Error messages. . If the repository is consistent (no Error messages). 18.Expand Sales Facts and verify that Category Sales and Share of Category are now visible in Answers. you must correct the errors before continuing. 22.17. 20. which should still be open from the previous topic.Click Yes when prompted to check global consistency.

Place the cursor over the icon to display the screenshot and use it as a reference to create a query.23. 25.Expand the Times folder. 24.Hold down the Ctrl key and click the Calendar Year column to open the Create/Edit Filter dialog box. . Notice the sort settings for the Prod Category and Amount Sold columns.

27.Click the All Choices link.Click 2001 to add it to the Value field. .26.

Click OK to close the Create/Edit Filter dialog box. 29.28. The filter is added to the request.Click Results. Only partial results are shown in the picture. .

organize the data in a way that aligns with the way users think about the data. and rename data as necessary for the set of users.Leave Answers open. Corresponding objects are automatically created in the . such as Oracle BI Answers. you can organize columns into catalogs and folders. For example. Back to Topic Back to Topic List Organizing the Presentation Layer The Presentation layer is built after the Physical layer and Business Model and Mapping layer and adds a level of abstraction over the Business Model and Mapping layer. The Presentation layer provides a means to further simplify or customize the Business Model and Mapping layer for end users. It is the view of the data seen by end users in client tools and applications. Simplifying the view of the data for users makes it easier to craft queries based on users’ business needs because you can expose only the data that is meaningful to the users. You typically create Presentation layer objects by dragging objects from the Business Model and Mapping layer.30.

perform the following steps: 1. You also can manually create catalogs and folders based on the needs of your users. or delete Presentation layer tables. Presentation tables appear as folders in the Oracle BI user interface. you can drag a column from a single logical table in the Business Model and Mapping layer onto multiple presentation tables. Use the Columns tab in the Presentation Table properties dialog box to reorder. You can also use this tab to access the Presentation Table dialog box. Return to the SH repository. The presentation column names are. In the Presentation layer. multiple presentation catalogs can refer to the same business model. Presentation catalogs allow you to show different views of a business model to different sets of users. To organize the Presentation layer. Use presentation tables to organize columns into categories that make sense to the user community. You can use the Presentation Tables tab in the Presentation Catalog properties dialog box to reorder. Presentation columns define the columns used to build queries in the Oracle BI user interface. double-click the SH presentation catalog to open the Presentation Catalog dialog box. identical to the logical column names in the Business Model layer. A presentation table can contain columns from one or more logical tables. or delete Presentation layer columns. Presentation tables contain presentation columns. Changes to the Presentation layer do not impact corresponding objects in the Business Model and Mapping layer. However. They cannot span business models. Presentation tables contain presentation columns. To provide a convenient organization for your end users. which should still be open in online mode in the Administration Tool. by default. where you can create and edit tables. Presentation catalogs have to be populated with content from a single business model. 2.Presentation layer. such as Oracle BI Answers. Presentation catalogs contain presentation tables. sort. You can also use this tab to access the Presentation Column dialog box. where you can create and edit columns. . The names and object properties of the presentation tables are independent of the logical table properties. sort.

3. Click the Presentation Tables tab. .

5. To create a new presentation Table.4. Click the General tab and name the presentation table Calendar. click the Add button to open the Presentation Table dialog box. .

.6. Adding -> in the description nests the table under the table above it. The description displays as a tool tip in Answers. type -> Calendar time attributes. In the Description field.

. Repeat the steps and create another presentation table named Fiscal with ->Fiscal time attributes in the Description field. 8.7. Click OK to close the Presentation Table dialog box.

9. Drag the tables or use the Up and Down buttons to rearrange the tables in the following order: Times Fiscal Calendar Products Customers Channels Promotions Sales Facts .

10.Double-click the Channels presentation table to open the Presentation Table dialog box. 11.Click OK to close the Presentation Catalog dialog box. The new tables are added to the Presentation layer and the presentation tables are reordered. .

12.Click the Columns tab. .

.Drag the columns or use the Up and Down arrows to reorder the columns.13. A suggested approach is to order the columns hierarchically from top to bottom.

The column order is changed in the Presentation layer.14.Click OK to close the Presentation Table dialog box. 15.Use cut and paste to move all the fiscal columns from the Times presentation table to the Fiscal presentation table and all the remaining columns from the Times presentation table to the .Expand the Times presentation table. 16.

close the Consistency Check Manager.Save the repository. 17. If there are Error messages. 19.Check in changes. . 18. If the repository is consistent (no Error messages). you must correct the errors before continuing.Click Yes when prompted to check global consistency.Calendar presentation table. Use Shift+click and Ctrl+click to select multiple columns.

Click Reload Server Metadata.Verify that the columns in the Fiscal and Calendar folders appear as expected. . which should still be open from the previous topic. 22.Return to Answers. 23. 21.20.Verify that the Fiscal and Calendar folders are nested under the Times folder.

Verify that the Channels columns appear as expected. .24.

Leave Answers open. System and nonsystem variables are represented by a question mark icon in the Variable Manager. There are two classes of variables: repository variables and session variables.25. Back to Topic List Using Initialization Blocks and Variables You can use variables in a repository to streamline administrative tasks and modify metadata content dynamically to adjust to a changing data environment. such as authenticating users. There are two types of session variables: system and nonsystem. A repository variable has a single value at any point in time. Static repository variables have values that are constant and do not change while Oracle BI Server is running. Variables can be used instead of literals or constants in the Expression Builder in the Administration Tool. System variables have reserved names and are used for specific purposes by Oracle BI Server. Oracle BI Server substitutes the value of a variable for the variable itself in the metadata. You use the Variable Manager to define variables and initialization blocks. Non-system variables are application-specific variables created by an Administrator. There are two types of repository variables: static and dynamic. Dynamic repository variables have values that are refreshed by data returned from queries in initialization blocks. A variable has a single value at any point in time. . Session variables are created and assigned a value when each user logs on. Repository variables are represented by a question mark icon in the Variable Manager.

3. . and nonsystem session variables. Click Session > Initialization Blocks. Oracle BI Server creates new instances of session variables and initializes them. you perform the following steps: Create an Initialization Block for Session Variables Test the Initialization Block and Session Variables Create a Dynamic Repository Variable Create an Initialization Block for Session Variables Session variables are like dynamic repository variables in that they obtain their values from initialization blocks. When a user begins a session. Unlike dynamic repository variables. A session is an instance of a user running the client application. session variables. To create an initialization block for session variables. The session starts when the application is started and ends when the application is exited. To create initialization blocks. 2. however. and dynamic repository variables. the initialization of session variables is not scheduled. system session variables. Click Manage > Variables to open the Variable Manager. there are as many instances of a session variable as there are active sessions on Oracle BI Server. perform the following steps: 1. Unlike a repository variable. Return to the SH repository. which should still be open in online mode in the Administration Tool.Initialization blocks are used to initialize dynamic repository variables. Each instance of a session variable could be initialized to a different value.

4. Right-click in the white space on the right and select New Initialization Block.

5. In the Session Variable Initialization Block dialog box, type setUser in the Name field.

6. Click the Edit Data Source button to open the Session Variable Initialization Block Data Source dialog box.

7. Click the Browse button and select SH > Connection Pool in the Select Connection Pool dialog box.

8. Double-click Connection Pool or click the Select button to add the connection pool to the Session Variable Initialization Block Data Source dialog box.

9. In the Default Initialization String field, type the following initialization string: select ':USER', case when upper(':USER') = 'KURT' then 'Germany' when upper(':USER') = 'KEIKO' then 'Japan' when upper(':USER')= 'CHARLES' then 'United Kingdom' when upper(':USER') = 'KAREN' then 'United States of America' end, 'CountryManagers', 2 from Dual

10. Click OK to close the Session Variable Initialization Block Data Source dialog box. The initialization string is visible in the Session Variable Initialization Block dialog box.

.11. Click Edit Data Target to open the Session Variable Initialization Block Variable Target dialog box.

12. . Click New to open the Session Variable dialog box.

13. . type USER. In the Name field.

14. The USER variable is added to the Session Variable Initialization Block Variable Target dialog box. Click Yes when prompted about the USER session variable having a special purpose. 15. 16. Click OK to close the Session Variable dialog box. .

The order of the variables must match the order of the values for the variables in the initialization string in the initialization block. Click Yes when promoted about the GROUP and LOGLEVEL session variables having a special purpose.17. and LOGLEVEL. GROUP. The order is important. Repeat the steps and add three more variables: UserCountry. .

18. The variables are displayed in the Variable Target section of the Session Variable Initialization Block dialog box. Click OK to close the Session Variable Initialization Block Variable Target dialog box. .

. 20. 21. Check in changes. 22. The setUser initialization block is visible in the Security Manager. Click OK to close the Session Variable Initialization Block dialog box. Save the repository. Click Action > Close to close the Variable Manager.19.

3. Click Manage > Security to open the Security Manager. 2. perform the following steps: 1. Click Groups in the left pane.Back to Topic To test the initialization block and session variables. . Right-click the white space in the right pane and select New Security Group.

. Name the group CountryManagers.4.

Click the Permissions button to open the User / Group Permissions dialog box. .5.

8. Click the Filters tab.6. Click the Add button. Click the Customers presentation table. . 7.

Click the Expression Builder button (three dots) on the right to open the Expression Builder . 10.9. Click Select to add Customers to the User / Group Permissions dialog box.

Select Logical Tables > Customers > Country and then click the Insert button to add Country to the formula.(you may need to scroll to see the button). . 11.

Click the = operator to add it to the formula. .12.

13. Select Session Variables > UserCountry and click the Insert button to add UserCountry to the formula as an argument in the VALUEOF()function. .

Click OK to close the Expression Builder.14. . The filter is added in the User / Group Permissions dialog box.

Save the repository. Log out of Answers. Return to Answers. Charles. Click Action > Close to close the Security Manager. Test the initialization block by logging in to Answers as one of the users in the initialization block: Kurt. 18.Calendar Year.Amount Sold.Country. . Create the following query: Customers. Check in changes. 19. 17. 16. Sales Facts. 21. or Karen. 20. 22. CountryManagers is added as a group in the Security Manager.15. 23. Keiko. Click OK to close the User / Group Permissions dialog box. Click OK to close the Group dialog box.Calendar. Times.

3. Click Repository > Initialization Blocks. Keiko = Japan. The picture shows the results when the user = Kurt. Leave Answers open. Return to the SH repository open in online mode. 2. The results of the query should correspond to the the user's country (Kurt = Germany. Charles = United Kingdom. Karen = United States of America).24. Back to Topic To create a dynamic repository variable. Click Results. . 25. Click Manage > Variables to open the Variable Manager. perform the following steps: 1.

4. . Right-click the white space and select New Initialization Block to open the Repository Variable Init Block dialog box.

5. . Name the initialization block getMaxSalesDate.

6. . Click Edit Data Source to open the Repository Variable Init Block Data Source dialog box.

7. . Click the Browse button to open the Select Connection Pool dialog box.

9. In the Default Initialization String field.8. Double-click the SH > Connection Pool object to add it to the Connection Pool field in the Repository Variable Init Block Data Source dialog box. type the following SQL: select TIME_ID. CALENDAR_MONTH_ID from TIMES WHERE TIME_ID = (select max(TIME_ID) from SALES) . CALENDAR_YEAR. CALENDAR_MONTH_DESC.

10. . The connection pool and initialization string are added to the Repository Variable Init Block dialog box.Click OK to close the Repository Variable Init Block Data Source dialog box.

.Click Edit Data Target to open the Repository Variable Init Block Variable Target dialog box.11.

12. .Use the New button to create four variables: maxSalesDate. maxMonthDesc. and maxMonthID. maxYear. The order of the variables must match the column order in the initialization string. The order is important.

Click OK to close the Repository Variable Init Block Variable Target dialog box.13. The variables appear in the Variable Target field in the Repository Variable Init Block dialog box. .

14. 15. 16. .Click Edit Data Source to open the Repository Variable Init Block Data Source dialog box.Click Test and verify you get the results in the picture.Close Results.

22.Click Action > Close to close the Variable Manager.Click OK to close the Repository Variable Init Block Data Source dialog box. The getMaxSalesDate initialization block is displayed in the Variable Manager.Select File > Check Global Consistency. edit the repository to correct the errors before continuing.Click OK to close the Repository Variable Init Block dialog box. 21.Check in changes.17. 19. If the Consistency Check Manager displays any errors. If there are no error messages.Select Repository > Initialization Blocks > Variables > Dynamic to see the variables displayed in the Variable Manager. close the . 20. 18.

Save the repository. 27.Consistency Check Manager. 26. click Add > Variable > Repository. 23. 25.In the Create/Edit Filter dialog box.Return to Answers.Build the following query: Calendar.Calendar Year.Amount Sold. Sales Facts. .Click the Add Filter button for the Calendar Year column. 24.

Click OK to close the Create/Edit Filter dialog box. The filter is added to the request. type maxYear.In the Server Variable field.28. . 29.

Oracle BI Server can seamlessly access and process data from multiple sources in an efficient manner to satisfy users’ requests. The goal is to provide seamless and efficient access from the users' perspective. To add quota information to the business model. . You incorporate the quota numbers into the business model and create business measures to report variance from quota and percent of quota. When there are multiple sources. When a logical table source does not contain the entire set of data at a given level. The workbook. you perform the following steps. you need to specify the portion of the set that it does contain. the metadata is built so that Oracle BI Server handles the navigation to the appropriate source. In this example. Back to Topic Back to Topic List Adding Multiple Sources Data is often partitioned into multiple physical sources for a single logical table in a business model.Click Results and verify that Calendar Year returns the expected result.xls. sales quota numbers are stored in an Excel workbook. Oracle BI Server needs to know the content of the sources in order to pick the appropriate source for the query. is stored on your machine.30. SHQuota. When individual sources at a given level contain information for a portion or fragment of the domain.

3. 2. Using Windows Explorer.xls file to a location on your machine. . Click the System DSN tab and click Add.Create an ODBC DSN Import the Excel Source Map Logical Dimension Columns Create Quota Measures Test To create an ODBC DSN for the Excel workbook. Click Start > Programs > Administrative Tools > Data Sources (ODBC) to open the ODBC Data Source Administrator. perform the following steps: 1. navigate to the SetupFiles folder and copy the SHQuota.

In the Create New Data Source dialog box. .The Create New Data Source dialog box opens. select the Microsoft Excel Driver. 4.

5. . enter a Data Source Name (this can be any name). Click Finish to open the ODBC Microsoft Excel Setup dialog box. 6. In the ODBC Microsoft Excel Setup dialog box.

xls file.7. Click Select Workbook to open the Select Workbook dialog box and navigate to the location where you saved the SHQuota. Click OK to close the Select Workbook dialog box. The path to the workbook is displayed in the ODBC Microsoft Excel Setup dialog box. 8. .

9. Click OK to close the ODBC Microsoft Excel Setup dialog box. 10. Verify that the Excel system data source is added in the ODBC Data Source Administrator and click OK to close the ODBC Data Source Administrator. Back to Topic .

2. Leave User Name and Password blank. Select File > Import > from Database. In the Select Data Source dialog box. perform the following steps: 1. 4. select the ODBC DSN you created in the previous steps.To import the Excel data source into the repository. The Import dialog box opens. Click OK. Return to the SH repository open in online mode. 3. .

In the Import dialog box. 7.5. . select the SHQuota object. Verify that only Tables and Keys are checked and click Import. close the Import dialog box and verify that all four range tables have been imported into the Physical layer. 6. When import completes.

Click the Features tab. 9. .8. 10. Locate COUNT_DISTINCT_SUPPORTED and uncheck the Value field. Double-click the Excel database object in the Physical layer (SHQuota in this example) to open the Database dialog box.

11. 13. Click OK to close the Database dialog box. . Double-click the Connection Pool for the Excel data source to open the Connection Pool dialog box. Click the General tab and uncheck the property Enable connection pooling. 12.

expand Customers > Sources and note that there are . Check in changes. perform the following steps: 1. 16. In the Business Model and Mapping layer. Click OK to close the Connection Pool dialog box. Back to Topic To map the logical dimension columns.14. 15. Save the repository.

5. Drag the physical column COUNTRY_REGION from Geography in the Physical layer to the logical column Customers. Drag the physical columns COUNTRY_SUBREGION. COUNTRY_NAME. 4. and COUNTRY_TOTAL from Geography in the Physical layer to the corresponding logical columns in the Customers table in Business Model and Mapping layer (Drag COUNTRY_NAME to Country). Click the Column Mapping tab. is created automatically. Double-click the Geography logical table source in the Customers > Sources folder to open the Logical Table Source dialog box. Geography. 2.Country Region in the Business Model and Mapping layer.two logical table sources: CUSTOMERS and COUNTRIES. COUNTRY_ID. Notice that a new logical table source. . 3. Notice the logical to physical column mappings.

Drag the physical column CALENDAR_YEAR from XLDates in the Physical layer to the logical column Times. 7. Notice that a new logical table source.6. Click OK to close the Logical Table Source dialog box. is created automatically. . XLDates.Calendar Year in the Business Model and Mapping layer.

and verify the mappings. 9. 11. 10. .PROD_CATEGORY and verify the logical table source mapping.8. click the Column Mapping tab.Repeat the steps and map Products.Prod Category to ProdCategory. Note that "Show unmapped columns" is unchecked. Drag the remaining physical columns from XLDates in the Physical layer to the corresponding logical columns in the Times table in Business Model and Mapping layer.Click OK to close the Logical Table Source dialog box. Double-click the XLDates logical table source in the Times > Sources folder to open the Logical Table Source dialog box.

CALENDAR_QUARTER_DESC = Quotas.COUNTRY_SUBREGION = Quotas.Country AND Geography. ."Country Region" ProdCategory."Calendar Quarter Number" AND XLDates.Use Ctrl+Click to select all four SHQuota tables in the Physical layer.COUNTRY_REGION = Quotas.CALENDAR_QUARTER_NUMBER = Quotas.In the Physical Diagram."Calendar Quarter Desc" Geography."Prod Category"."Year" AND XLDates. 13.12. 14. XLDates."Country Subregion" AND Geography.Close the Physical Diagram.CALENDAR_YEAR = Quotas. Hint: Use CTRL+click to create the multi-column joins or type the join expressions in the Expression field. 15.COUNTRY_NAME = Quotas.PROD_CATEGORY = Quotas.Right-click any one of the four tables and select Physical Diagram > Selected Object(s) Only to open the Physical Diagram. Create new keys when prompted. use the New foreign key button to create the following joins.

Quota to open the Logical Table dialog box. 3. and a new logical column. Quota. Quotas. . are created. perform the following steps: 1. Click the Aggregation tab and set the aggregation rule to Sum.Quota from the Physical layer onto the Sales Facts logical table. 2. Double-click Sales Facts.Back to Topic To create the quota measures. Drag the column Quotas. Notice that a new logical table source.

Close the Logical Table dialog box. Check Use existing logical columns as the source. The Quota logical column states quota in thousands. 5. 7. so rename Quota to Quota (000). 8. 6. Click the General tab and name the logical column Quota.4. Right-click Sales Facts and select New Object > Logical Column to open the Logical Column dialog box. .

9. Create the following formula: 1000*"SH"."Quota (000)" . 10."Sales Facts". Click the Expression Builder button (three dots) to open the Expression Builder.

11. . The formula displays in the Logical Column dialog box. Close the Expression Builder.

15. 13.Amount Sold and select Calculation Wizard. .12. Right-click Sales Facts. Click Next. Select the Quota column. The Quota column is added to the business model. 14. Close the Logical Column dialog box.

17. name the calculation Variance from Quota.16. Make sure Change is selected. In the Calculation Name field. . Click Next.

18. Check Percent and make sure it is selected. . In the Calculation Name field. 19. leave the name as is: % of Quota. Uncheck Percent Change.

20. . verify the calculations that will be created by the Calculation Wizard. 21. In the Finish window. Click Next.

. The calculation measures are added to the business model. Click Finish.22.

edit the repository to correct the errors before proceeding. 1.23. Return to Answers. If you receive any Error messages. 26. perform the following steps. Variance From Quota. Reload Server Metadata. 2. Add the Quota (000). Save the repository. . and % of Quota measures to the Sales Facts presentation table. 25. Check global consistency. Quota. Back to Topic To test the quota measures. Check in changes. 24. Log out and then log back in as Administrator with password Administrator.

Click Results. 4.% of Quota. 5. Sales Facts. 6.3. (Please note that SHQuota contains data only for 2001). Drill down on 2001.Quota. Sales Facts. Examine the query log. Create the following filter: Calendar Year is equal to / is in 1999. Leave Answers open. 2000.Variance From Quota. 7. Create the following request: Calendar.Amount Sold. Back to Topic . Sales Facts. 2001.Calendar Year. 8. Sales Facts.

In Answers. By default. In the Oracle BI Presentation Service Administration screen. click Settings > Administration. this privilege is not enabled for anyone.Back to Topic List Executing Direct Database Requests Users with the appropriate permissions can create and issue a direct database request directly to a physical back-end database. It can be changed by a Presentation Server Administrator. . 2. The results of the request can be displayed and manipulated within Oracle BI Answers. and subsequently incorporated into Oracle BI Interactive Dashboards and Oracle BI Delivers. click Manage Privileges to open the the Privilege Administration screen. Execute Direct Database Requests: If this privilege is set for you. The following privilege settings in Oracle BI Presentation Services Administration control whether you can create and issue physical requests: Edit Direct Database Requests: If this privilege is set for you. To execute a direct database request. By default. perform the following steps: 1. this privilege is set only for users defined as Presentation Server Administrators. you can issue physical requests. you can create direct database requests.

In the Privilege Administration screen. the Administrator user is a member of this group.3. Note that the Edit Direct Database Requests privilege is granted to Presentation Server Administrators. By default. scroll down to Answers. .

4. Note that the Execute Direct Database Requests privilege is not granted to anyone.

5. Click (not permitted) to open the Change Privilege Permissions screen.

6. Click the Add button next to Presentation Server Administrators to give this group explicit access to this privilege.

7. Click Finished to close the Change Privilege Permissions screen. Notice the change to the privilege permissions for Execute Direct Database Requests.

8. Click Finished to close the Privilege Administration screen. 9. Click Close Window to close the Oracle BI Presentation Services Administration screen. 10.Click the Answers link to return to the Answers start page. 11.Click the Create Direct Request link.

12.In the Connection Pool field, type the connection pool name for the SH data source enclosed in double quotes ("SH"."Connection Pool" in this example). 13.In the SQL Statement field, type SELECT * FROM Channels.

14.Click Validate SQL and Retrieve Columns to display the columns from the Channels table.

15.Click Results. Your results should look similar to the screenshot.

16.Leave Answers open

Back to Topic List

Using Aggregates

Aggregate tables store pre-computed results, which are measures that have been aggregated (typically summed) over a set of dimensional attributes. Using aggregate tables is a very popular technique for speeding up query response times in decision support systems. This eliminates the need for run-time calculations and delivers faster results to users. The calculations are done ahead of time and the results are stored in the tables. Aggregate tables should have many fewer rows than the non-aggregate tables and, therefore, processing should be quicker. The aggregate navigation capability of Oracle BI Server allows queries to use the information stored in aggregate tables automatically, without query authors or tools having to specify aggregate tables in the queries. Oracle BI Server allows users to concentrate on asking the right business questions, because the server decides which tables provide the fastest answers. For Oracle BI Server to have enough information to navigate to aggregate tables, you need to configure certain metadata in the repository. To build and use aggregate tables, perform the following steps: Use Direct Database Request to Create Aggregate Tables Import Aggregate Tables Create Physical Joins Map Existing Logical Columns and Set Aggregation Content Test in Answers and Examine Query Log To use Direct Database Request to create the aggregate tables, perform the following steps: 1. Using Windows Explorer, navigate to the SetupFiles folder and open the aggregate table SQL script file: agg_table_sql.txt.

AGG_ST_CAT_DAY_SALES_F.txt and paste it into the SQL Statement field. Copy the CREATE TABLE SQL for the first table. . Verify that the Connection Pool field is still set to the connection pool name for the SH data source enclosed in double quotes ("SH". from agg_table_sql. Click the Criteria tab to return to the direct database request page."Connection Pool" in this example).2. 4. 3.

Click Results. You should see a No Results message. 8. 7. 6. Type the following SQL in the SQL Statement field: SELECT COUNT(*) FROM AGG_ST_CAT_DAY_SALES_F. Remove the CREATE TABLE SQL from the SQL Statement field.5. Click the Criteria tab. .

Click Validate SQL and Retrieve Columns.9. .

Remove the SELECT COUNT(*) SQL statement from the SQL Statement field. 11. 12.Click the Criteria tab.10.Click Results. You should see COUNT(*) = 158142. .

Remove the CREATE TABLE SQL from the SQL Statement field. 15. . 17.13. AGG_CUSTOMER_STATE_D.Click Results.Copy the CREATE TABLE SQL for the second table. 16. and paste it into the SQL Statement field. You should see a No Results message.Click the Criteria tab. 14.Type the following SQL in the SQL Statement field: SELECT COUNT(*) FROM AGG_CUSTOMER_STATE_D.

Copy the CREATE TABLE SQL for the third table. 21. 22. 20.18. and paste it into the SQL Statement field. . You should see COUNT(*) = 145.Remove the SELECT COUNT(*) SQL statement from the SQL Statement field. AGG_PRODUCTS_CATEGORY_D. 19.Click Results.Click Validate SQL and Retrieve Columns.Click the Criteria tab.

Remove the CREATE TABLE SQL from the SQL Statement field.Click the Criteria tab. 25. You should see a No Results message. 24. .Type the following SQL in the SQL Statement field: SELECT COUNT(*) FROM AGG_PRODUCTS_CATEGORY_D. 26.Click Results.23.

Return to the SH repository. enter SH as User Name and Password. 2. which should still be open in online mode. select the SH data source.Click Validate SQL and Retrieve Columns. 3. . 28. and click OK. Back to Topic To import the aggregate tables.27.Click Results. In the Select Data Source dialog. perform the following steps: 1. Select File > Import > from Database. You should see COUNT(*) = 5.

.4. AGG_CUSTOMER_STATE_D. and AGG_PRODUCTS_CATEGORY_D. expand the SH schema and select the three aggregate tables: AGG_ST_CAT_DAY_SALES_F. In the Import dialog box.

7. close the Import dialog box. When the import process completes. . Click Import. Expand the SH folder in the Physical layer and verify that the aggregate tables are added. 6.5.

. 10. Select the three aggregate tables in the Physical layer.8. 9. use Ctrl+Click to select the three new aggregate tables and the Times table. You should see the expected row counts after each table. In the Physical layer. perform the following steps: 1.Check in changes. Check in changes. 11. right-click and select Update Row Count to verify connectivity. Back to Topic To create physical joins for the aggregate tables.Save the repository.

CUST_STATE_PROVINCE_ID AGG_PRODUCTS_CATEGORY_D.2. Click Yes when prompted to create matching table keys. In the Physical Diagram.TIME_ID .CUST_STATE_PROVINCE_ID = AGG_ST_CAT_DAY_SALES_F.TIME_ID = AGG_ST_CAT_DAY_SALES_F.PROD_CATEGORY_ID TIMES.PROD_CATEGORY_ID = AGG_ST_CAT_DAY_SALES_F. use the New Foreign Key button to create the following joins.: AGG_CUSTOMER_STATE_D. Click the Physical Diagram icon on the toolbar. 3.

COUNTRY_SUBREGION Customers.Cust State Province AGG_CUSTOMER_STATE_D.Country Region AGG_CUSTOMER_STATE_D. Back to Topic To map existing logical columns to aggregate columns and set aggregation content.CUST_STATE_PROVINCE Customers.Amount Sold Physical Column AGG_ST_CAT_DAY_SALES_F.Country AGG_CUSTOMER_STATE_D.AMOUNT_SOLD Customers. Close the Physical Diagram.Country Subregion AGG_CUSTOMER_STATE_D. Check in changes.COUNTRY_REGION .COUNTRY_NAME Customers. 6. perform the following steps: 1. 5. Map existing logical columns to new sources by dragging columns from the Physical layer to corresponding columns in the Business Model and Mapping layer: Logical Column Sales Facts. Save the repository.4.

Use the drop-down menu in the Logical Level field to set the following logical levels: . Double-click the AGG_ST_CAT_DAY_SALES_F logical table source to open the Logical Table Source dialog box. AGG_ST_CAT_DAY_SALES_F.Prod Total AGG_PRODUCTS_CATEGORY_D. expand Sales Facts > Sources and verify that a new logical table source. 5.Country Total Products.PROD_CATEGORY Products. 3.Customers.COUNTRY_TOTAL AGG_PRODUCTS_CATEGORY_D. is created. Click the Content tab. In the Business Model and Mapping layer.PROD_TOTAL 2. 4. and verify the mapping.Prod Category AGG_CUSTOMER_STATE_D. click the Column Mapping tab.

AGG_CUSTOMER_STATE_D. In a subsequent step you set similar levels for the dimension table aggregate sources. For example. the server will access the AGG_ST_CAT_DAY_SALES_F aggregate fact table and the corresponding aggregate dimension table. for example.CustomersDim = State Province ProductsDim = Category TimesDim = Times Detail You are setting aggregation content for the fact table to the corresponding levels in the dimension hierarchies. If a user queries for a level lower than the levels specified here. for . if a user queries for Amount Sold by Country Region. Later. If a user queries for higher level. Subregion or Country. then the server will access the detail tables. after setting aggregation content. Oracle BI Server will access the aggregate tables instead of the detail tables. when a user queries against a particular level.

the aggregate tables will be used as well. Click the Content tab. click the Column Mapping tab. because whenever a query is run against a logical level or above. AGG_CUSTOMER_STATE_D. 6. 10.Use the drop-down menu in the Logical Level field to set the following logical level to specify what level of detail is stored in the aggregate table: CustomersDim = State Province . Expand Customers > Sources and verify that a new logical table source. 8. Country Total. is created.example. Expand Customers > Sources and double-click the AGG_CUSTOMER_STATE_D logical table source. 9. and verify the mappings. Click OK to close the Logical Table Source dialog box. 7. the aggregate tables are used.

12. is created. click the Column Mapping tab. 13.Click OK to close the Logical Table Source dialog box. . and verify the mappings.Expand Products > Sources and verify that a new logical table source. AGG_PRODUCTS_CATEGORY_D.11.Double-click the AGG_PRODUCTS_CATEGORY_D logical table source.

14. 15.Use the drop-down menu in the Logical Level field to set the following logical level to specify what level of detail is stored in the aggregate table: ProductsDim = Category .Click the Content tab.

Fix any errors before proceeding. 19.Click OK to close the Logical Table Source dialog box. 17.Check consistency. Oracle BI Server automatically uses the new sources when appropriate. You made changes in the business model that impact how the queries are processed and which sources are accessed. Note that you did not need to make any changes to the Presentation layer. 18.Check in changes.16. Based on how you specified the aggregation content. .Save the repository.

Amount Sold. 5. perform the following steps: 1. Return to Answers. 2. 3.Country Region. The Create/Edit Filter dialog box opens. Create the filter Calendar Year is equal to / is in 2001. Reload Server Metadata. . 4.Back to Topic To test in Answers and examine the query log. Create the following query: Customers. Sales Facts. Hold down the Ctrl key and click Times > Calendar > Calendar Year.

11. Click Results.Locate the last query run under Cursor Cache and click View Log. The filter is added to the query. 7.Examine the log and verify that the aggregate tables AGG_CUSTOMER_STATE_D and AGG_ST_CAT_DAY_SALES_F were accessed. 10.6. Click Settings > Administration. Click Manage Sessions. 9. Click OK to close the Create/Edit Filter dialog box. . 8.

13. SQL was not designed to make comparisons over time straightforward: ”The most difficult area of data warehousing is the translation of simple business analyses into SQL. and to enable researchers and early developers to proceed with building the first relational systems in the mid-1970s. providing a context for the data. Yet. Back to Topic Back to Topic List Creating Time Series Measures The ability to compare business performance with previous time periods is fundamental to understanding a business.12. .Close the query log. SQL was really an interim language designed to allow relational table semantics to be expressed in a convenient and accessible form. Time comparisons allow businesses to analyze data that spans multiple time periods.Click Finished to close the Session Management screen. SQL was not designed with business reports in mind. as Ralph Kimball states. How else can you explain the fact that there is no direct way in SQL to compare this year to last year?” – Ralph Kimball The solution is to model time series data in the Oracle BI repository. This allows users to make one request for the desired result. The queries that run in the background to support the time measure are transparent to the user. Oracle BI Server runs multiple queries in parallel to get the results. 14.Click Close Window to close the Oracle BI Presentation Services screen.

For example. the Ago function can produce sales for every month of the current quarter. For example. In the Business Model and Mapping layer. The Ago function calculates the aggregated value as of some time period shifted from the current time. The ToDate function is used to aggregate a measure attribute from the beginning of a specified time period to the currently displaying time. Both of these functions operate on measures. double-click the TimesDim dimension hierarchy to open the Dimension dialog box.Oracle BI Server provides Ago and ToDate functions for time series comparisons. perform the following steps: 1. 2. along with the corresponding quarter ago sales. perform the following steps: Identify a Dimension as a Time Dimension Create a Month Ago Measure Create a Change Month Ago Measure Create a ToDate Measure Test the Time Series Measures To identify a dimension as a time dimension. . In the Dimension dialog box. You use the Expression Builder to apply the functions. the ToDate function can calculate Month to Date sales for a given year. To create time series measures. check Time Dimension.

Check the Chronological Key checkbox for Times Detail_Key. Expand TimesDim to the Times Detail level and double-click the Times Detail level to open the Logical Level dialog box. 6. Click OK to close the Dimension dialog box. Click OK to close the Logical Level dialog box. 4. 7.3. Click the Keys tab. . 5.

Select Functions > Time Series Functions > Ago. 5. . 4. Click Insert to add the Ago function to the Expression Builder. 6. 3. Right-click Sales Facts and select New Object > Logical Column to open the Logical Column dialog box. Click the Expression Builder button (three dots) to open the Expression Builder. Check Use existing logical columns as the source. Name the logical column Month Ago Dollars. perform the following steps: 1.Back to Topic To create a Month Ago measure. 2.

Click the first <<expr>> in the expression.7. 8. Select Logical Tables > Sales Facts and then double-click Amount Sold to add it to the expression. .

10. Click the second <<expr>> in the expression.9.Select Time Dimensions > TimesDim and then double-click Month to add it to the expression. .

The Ago function calculates the Amount Sold value one month prior to the current month.11.Click <<integer>> in the expression and type 1. .

12. .Click OK to close the Expression Builder. The formula is displayed in the Logical Column dialog box.

Name the logical column Change Month Ago Dollars.13.Click OK to close the Logical Column dialog box. . 2. Back to Topic To create a Change Month Ago measure. perform the following steps: 1. Right-click Sales Facts and select New Object > Logical Column to open the Logical Column dialog box.

Click the Expression Builder button to open the Expression Builder. . 7. Select Logical Tables > Sales Facts and then double-click Amount Sold to add it to the expression. Check Use existing logical columns as the source. 6.3. 4. Insert a minus sign in the expression. 5. Select Logical Tables > Sales Facts and then double-click Month Ago Dollars to add it to the expression.

8. . Click OK to close the Expression Builder. The formula is displayed in the Logical Column dialog box.

perform the following steps: 1. . 2. Name the new logical column Month To Date Dollars.9. Click OK to close the Logical Column dialog box. Right-click Sales Facts and select New Object > Logical Column. Back to Topic To create a ToDate measure.

4.3. . Select Use existing logical columns as the source. Select Functions > Time Series Functions and double-click ToDate to insert the expression. Open the Expression Builder. 5.

6. 7. Click the first <<expr>>. Select Logical Tables > Sales Facts and then double-click Amount Sold. .

Select Time Dimensions > TimesDim and the double-click Year to add it to the expression. .8. 9. Click the second <<expr>>.

10. The formula is displayed in the Logical Column dialog box. Click OK to close the Expression Builder. .

Click OK to close the Logical Column dialog box. expand the Times logical table. 3. 4. Click the Set button.11. In the Business Model and Mapping layer. perform the following steps: 1. Select Calendar Month Desc and click OK. 2. Double-click Calendar Month Name to open the logical column dialog box. . Back to Topic To test the time series measures.

5. . The Calendar Month Name column is now automatically sorted by Calendar Month Desc whenever it is used in an Answers query. Click OK to close the logical column dialog box. The sort order column displays in the Logical Column dialog box. 6.

Check global consistency. Fix any errors before proceeding.Amount Sold . 10. Check in changes.Create the following query and filter in Answers: Calendar. Drag the three time series measures from the Business Model and Mapping layer to the Sales Facts presentation table. 9.Calendar Month Name Sales Facts.Save the repository. 8. 12. 11.Return to Answers and reload server metadata.7.

Month To Date Dollars Calendar Year is equal to / is in 2001 13. .Change Month Ago Dollars Sales Facts.Month Ago Dollars Sales Facts.Click Results.Sales Facts.

Sign up to vote on this title
UsefulNot useful