Вы находитесь на странице: 1из 348

ORACLE BUSINESS INTELLIGENCE WORKSHOP Prerequisites for Oracle BI Workshop

Introduction....................................................................................................................2 Hardware Requirements.................................................................................................2 Minimum Hardware configuration: ...........................................................................2 Software Requirements..................................................................................................2 Virtual Machine: Runtime .........................................................................................2 Virtual Machine: Content ..........................................................................................3 Client Software ..........................................................................................................3 Oracle BI Client Tools:..........................................................................................3 Freeware local Mail server: ...................................................................................3 Java SDK ...............................................................................................................3 Oracle ODBC Driver .............................................................................................3 Installation steps for the Client Software.......................................................................6 Installation of BI EE Client software.........................................................................6 Installation Oracle ODBC Driver ............................................................................11 Installation of ArGoSoft Mail Server ......................................................................12

Introduction
This document describes all necessary prerequisites for the attendees of the Oracle BI Hands-On workshops, held across Europe in June 2007. Please read all steps carefully and follow the instructions.

Hardware Requirements
During the Workshop you will copy a virtual Machine with installed Servers (Oracle Database, Oracle BI in an Linux Operating System) on your Machine. The virtual Machines require a lot of disk space and RAM in order to perform accurately. Additionally you will install Client software on your local Machine that will consume some disk space and RAM as well. Minimum Hardware configuration: Min. 1.5 GHz CPU, preferably 2 GHz + Min. 2 GB RAM Min. 25 GB free Disk space DVD Drive Browser: Internet Explorer 5.5 or above Mozilla Firefox Swap Space: 1535 MB minimum Monitor: Configured to display at least 256 colors Use of a Mouse as pointing device is highly recommended (for lab work) Warning: if your machine wont fulfil these requirements, either the system wont run at all or incredible slow. It may not be possible to follow the Hands-On sessions.

Software Requirements
As stated above, a VMWare virtual Machine and Client software will be used during the Workshop. The vmware image will be provided during the event; however you are required to install the emulation software in advance of arriving for the course. Virtual Machine: Runtime In order to run a virtual Machine, a runtime environment for VMWare has to be installed on your machine. Several options are possible: 1. VMWare Player (no Licence key, no purchasing required, just run preconfigured VMWare images) Youll find VMWare Player at http://www.vmware.com/products/player/ 2. VMWare Server (Registration required, Serial Key for free, create and run VMWare images) Youll find VMWare Server at http://www.vmware.com/products/server/ (please dont forget to register and remember your Licence Key) Please download one option and install it, following the instructions of the product.

Virtual Machine: Content The content of the virtual machine is provided by Oracle. Youll get the content when attending the training on a DVD. Please ensure enough space on your HDD to copy and unpack the DVD contents (4.5 GB packed, 15 GB unzipped). No other requirements apply in this section.

Client Software The Windows client software has to be installed prior the event. It is not necessary to configure all parts of all programs, but it will save a lot of time, if you download and install the software prior the event. Software needed: Oracle BI Client Tools: The Client Tools are not available as Stand-Alone versions, so please download the complete set of software from http://download.oracle.com/otn/nt/ias/101321/biee_windows_x86_101321_disk1.zip Freeware local Mail server: The workshops suggest a simple mail server called ArGoSoft to test email delivery and also in case a live email delivery is called for during a demo. This can be downloaded in advance of the course from: http://www.argosoft.com/rootpages/Download.aspx Java SDK If you havent got Java SDK installed, download JDK 6u1 from http://java.sun.com/javase/downloads/index.jsp Oracle ODBC Driver If you already have a local Oracle Client installed on your machine you skip this topic because you should already have an Oracle ODBC Driver on your Host machine However, if you need an Oracle ODBC Driver, you can obtain this in one of several ways. In this tutorial the Instant Client has been used. 1. Downloading Instant Client a. For installing ODBC, you need to files from OTN: the basic instant client and the ODBC libraries b. Go to the Oracle Technology Network Instant Client Homepage: http://otn.oracle.com/tech/oci/instantclient/instantclient.html

c. Click on Downloads:

d. Select Windows:

Accept the Licensing Questions and Download the Basic and ODBC package:

Installation steps for the Client Software


Please install the Software on the Client in the following order: Installation of BI EE Client software o If necessary: install Java JDK before Installation / Configuration of an ODBC connection the database located on the VMWare

Configuration will be done after copying the VMWare image as first step during the Hands-On sessions. Installation of BI EE Client software 1. Check if you have a proper installation of Java JDK (1.5 or greater) on your machine. Look for a Java\jdk. Directory:

a. If you havent, install Java JDK from the path mentioned before. 2. Change to the directory where you have downloaded the Oracle BI software and extract it into a single directory. 3. change directory to the BI EE installation files (typically ..\Windows\Server\Oracle_Business_Intelligence):

4. Start the installation by double-clicking setup.exe. The Installation Wizard will start-up:

5. Click Next, if you are sure to meet the requirements. 6. Specify your installation paths and check Basic:

7. Click Next

8. Select Oracle Business Intelligence Client Tools

9. Click Next 10. Specify a valid Java JDK installation directory:

11. Click Next

12. Select a Language:

13. Click Next 14. Review the Settings:

15. Click Next. The Installation will take a few minutes

16. The installation is complete

17. Click Next 18. Another Summary Page appears:

19. Click Next for the last page

10

20. Click Finish and restart you computer

The Installation of BI EE is now complete.

Installation Oracle ODBC Driver This section describes how to install the local ODBC Driver: 1. Extract both downloaded files to the same local directory

11

2. Run odbc_install.exe 3. Add this directory (e.g. C:\Oracle\Client) to the local Windows PATH variable 4. Add a new System Variable TNS_ADMIN and set the value to the same directory path 5. Create a new local file called tnsnames.ora in the same directory. This file will contain the connection information to the Oracle database in the VMWare.
ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST= oracle2go.us.oracle.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl.us.oracle.com) ) )

Your Oracle ODBC connection is now ready to be configured, as it is described in the OBE tutorial.

Installation of ArGoSoft Mail Server This section describes how to install the freeware mail server which can optionally be used to test email delivery by the BI Scheduler: Have the correct privileges to configure and install a mail server on your machine. The workshop uses a simple mail server, ArGoSoft Mail Server Freeware, for demonstration purposes only. If you do not have a mail server, follow these steps: A. You can download this freeware mail server here. B. Select the Mail Server Freeware agsmail.exe link. C. Click Save to download the module onto your local machine. D. Click Start > All Programs > Administrative Tools > Services and stop the Simple Mail Transfer Protocol Service (SMTP). Close Services. E. Navigate to the directory where you stored the downloaded freeware module and double-click the agsmail.exe icon. Follow the vendor instructions for installation. This should not take much longer than one minute as it is a very light install. F. Start the ArGoSoft Mail Server service by double-clicking the ArGOSoft Mail Server Freeware icon stored on your desktop.

12

G. Click Tools > Users on the menu bar. When the User Setup window appears, click icon. the New User H. The Add New User window appears. 1) Enter user in the User Name text box. 2) Enter Delivers User in the Real Name text box. 3) Enter user in the Password and Confirm Password text boxes. 4) Enter user@<yourmachine> in the Return Address text box, where <yourmachine> is the name of your machine domain configuration.

5) Click OK. 6) Click Close. I. Click Tools > Option on the menu bar. The Options window appears. 1) On the General tab, enter <yourmachine> in the Local Host text box.

13

2) On the Local Domains tab, enter <yourmachine> in the available text box and click Add.

3) On the Ports tab, ensure that SMTP is set to 25 and POP3 is set to 110, both defaults. 4) Click OK. J. Launch your email client. This OBE uses MS Outlook Express. Ensure that all user properties correspond to the information annotated above. To do so, perform the 14

following steps: 1) Select Tools > Accounts on the menu bar. The Internet Accounts window appears. 2) Click Add > Mail and enter user into the Display Name text box. 3) Click Next. 4) Enter the same email address that you used above, user@<yourmachine>, and click Next. 5) Enter the email server names, <yourmachine>, for both Incoming and Outgoing servers, POP3 and SMTP respectively. click Next. 6) Enter user into both Account Name and Password text boxes and click Next. 7) Click Finish. Your account is setup. 8) To check the properties for user, click Tools > Accounts, select user and click Properties. The General and Servers tabs should look like the image below:

15

ORACLE BUSINESS INTELLIGENCE WORKSHOP


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 on the BIC2G:EE 10.1.3.2 VMWare image (Linux Edition v1.0). Time to Complete: Approximately 3 hours Topics This tutorial covers the following topics: Page Prerequisites .....................................................................................................2 Building the Physical Layer of a Repository ......................................................3 Building the Business Model and Mapping Layer of a Repository...................16 Building the Presentation Layer of a Repository..............................................44 Testing and Validating a Repository................................................................46 Creating Calculation Measures .......................................................................57 Organizing the Presentation Layer ..................................................................87 Using Initialization Blocks and Variables .........................................................93 Adding Multiple Sources................................................................................110 Executing Direct Database Requests............................................................125 Using Aggregates..........................................................................................129 Creating Time Series Measures ....................................................................137 Summary .......................................................................................................147

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.

Prerequisites
This tutorial is for a Windows client environment connecting to the Linux BIC2G image as a server. Instructions for installing VMWare software and client BI tools and data source drivers are found in the file Prerequisites for Oracle BI Workshop After installing VMWare and opening the BIC2G Linux image, follow these instructions to map a network drive on local client to the Linux Server: Go to http://192.168.209.134/go/setup.html and click on the Map button.

Execute the downloaded file to map the chosen drive letter (G:) to the Linux Server. Open up the mapped drive and rename the existing SH.rpd repository: Open up G:\biee\10.1.3.2\OracleBI\server\Repository in windows explorer Rename the existing SH.rpd to SH_backup.rpd

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. Open the BIC2G Process Control for Services, http://oracle2go.us.oracle.com/go/process_control/pc.html Select the checkbox next to BI Server, click on STOP.

2. Wait for the flag to turn RED. 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 local Repository folder is selected by default. Browse to the Linux server repository folder in the drive mapped during the pre-requisite steps to this section: Browse to G:\biee\10.1.3.2\OracleBI\server\Repository 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.

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.

2. Click the System DSN tab and click Add.

The Create New Data Source dialog box opens.

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

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

6. Click Test Connection to open the Oracle ODBC Driver Connect dialog box.

7. In the Oracle ODBC Driver Connect dialog box, enter the password SH for the SH schema and click OK.

8. You should see a "Testing Connection" message indicating the connection is successful.

9. Click OK to close the Testing Connection message. 10. Click OK to close the Oracle ODBC Driver Configuration dialog box. 11. 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.

Import SH Schema To import the SH schema information into the repository, perform the following steps: 1. In the Oracle BI Administration Tool, click File > Import > from Database . . .

2. In the Select Data Source dialog box, select the SH ODBC DSN you created in a previous step, enter SH as the user name and password, and click OK to open the Import dialog box.

3. In the Import dialog box, locate the SH schema folder.

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

5. Verify that only the Tables and Keys checkboxes are selected, which is the default, and click the Import button. The Connection Pool dialog box opens. It is best practice to only import objects needed to support your business

10

model. However, dont worry if you import extra objects at this point. You can always delete objects later if they do not support your business model. 6. In the Connection Pool dialog box, on the General tab, verify that the call interface is set to Default (OCI 10g) and change the data source name to the appropriate tnsnames.ora entry ( ORCL in this example). Please note that this is the TNS service name, not the ODBC DSN.

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

11

10. To verify connectivity, click Tools > Update All Row Counts. 11. When update all row counts completes, verify that the row counts are displayed in the Physical layer of the Administration Tool:

Create Physical Joins To create physical joins in the Physical layer of the repository, perform the following steps: 1. In the Physical layer, right-click the SH schema folder and select Physical Diagram > Object (s) and All Joins. Alternatively, you can select the SH database object and then click the Physical Diagram button on the toolbar.

12

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

3. Rearrange the tables so they are all visible in the Physical Diagram.

4. Click the New Foreign Key button on the toolbar.

5. Click the Channels table and then the Sales table. The Physical Foreign Key dialog box opens.

13

It matters which table you click first. 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 Administration Tool makes a best "guess" and automatically determines which columns should be included in the join. Make sure the join expression is: CHANNELS.CHANNEL_ID = SALES.CHANNEL_ID 6. Click OK to close the Physical Foreign Key dialog box. The join between Channels and Sales is displayed in the Physical Diagram.

7. Continue to create the following joins:

14

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

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

15

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. The Business Model and Mapping layer of the Administration Tool defines the business, or logical, model of the data and specifies the mappings between the business model and the Physical layer schemas. This is where the physical schemas are simplified to form the basis for the users view of the data. The Business Model and Mapping layer of the Administration Tool can contain one or more business model objects. A business model object contains the business model definitions and the mappings from logical to physical tables for the business model. The main purpose of the business model is to capture how users think about their business using their own vocabulary. The business model simplifies the physical schema and maps the users business vocabulary to physical sources. Most of the vocabulary translates into logical columns in the business model. Collections of logical columns form logical tables. Each logical column (and hence each logical table) can have one or more physical objects as sources. There are two main categories of logical tables: fact and dimension. Logical fact tables contain the measures by which an organization gauges its business operations and performance. Logical dimension tables contain the data used to qualify the facts. To build the Business Model and Mapping layer, 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

16

Create a Business Model To create a new business model, perform the following steps: 1. In the Business Model and Mapping layer, right-click the white space and select New Business Model.

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

3. Click OK to close the Business Model dialog. The new SH business model appears in the Business Model and Mapping layer. The red symbol on the business model indicates it is not yet enabled for querying. You enable the business model for querying later after the Presentation layer is defined and the repository passes a global consistency check.

17

Create Logical Tables To create a new logical table, perform the following steps: 1. In the Business Model and Mapping layer, right-click the SH business model and select New Object > Logical Table.

2. In the Logical Table dialog box, name the table Sales Facts.

3. Click OK to close the Logical Table dialog. The Sales Facts logical table appears in the SH business model in the Business Model and Mapping layer. The Sources folder is populated in the next step when you create a logical column.

18

Create Logical Columns To create a logical column, perform the following steps: 1. In the Physical layer, expand the Sales physical table.

2. Select the column AMOUNT_SOLD.

19

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

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

20

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

6. Click the Aggregation tab.

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

8. Click OK to close the Logical Column dialog box. Notice that the logical column icon is changed to indicate an aggregation rule is applied.

21

Create Logical Joins To create logical joins in the business model, perform the following steps: 1. Select the following tables in the Physical layer. Select only these tables: CHANNELS, CUSTOMERS, PRODUCTS, PROMOTIONS, TIMES

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

22

3. Right-click the SH business model and select Business Model Diagram > Whole Diagram.

4. Rearrange the table icons so they are all visible. Place the Sales Facts table in the middle. Adjust the zoom factor, if desired.

5. Click the New Complex Join button in the toolbar.

6. Click the Channels table icon first and then click the Sales Facts table icon in the Logical Table Diagram window. The order is important. The second table clicked is the many side of the relationship. The Logical Join dialog box opens. Leave the default values as they are, but note which properties you can set: name, business model, tables, driving table, join type, and cardinality. Also note 23

which properties you cannot set: the join expression and the join columns. Typically, when defining logical joins, you leave the defaults as they are.

7. Do not change the default values, click OK, and verify your work in the Logical Table Diagram. Notice that the fact table, Sales Facts, is at the many end of the join:

8. Repeat the steps for the remaining tables. Your final result should look similar to the picture.

24

9. Click the X in the upper right corner to close the Logical Table Diagram. Notice that the color of the table icons for the dimension tables has changed to white in the business model. In a business model, a yellow icon indicates a fact table and a white icon indicates a dimension table. Defining the join relationships determined which tables are the logical dimension tables and which is the logical fact table. 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, Sales Facts, and five logical dimension tables: Channels, Customers, Products, Promotions, and Times.

10. Save the SH repository. Do not check global consistency.

Rename Business Model Objects To use the Rename Wizard to rename the objects in the business model, perform the following steps: 1. Click Tools > Utilities.

25

2. In the Utilities dialog box, click Rename Wizard and then Execute.

3. In the Rename Wizard, click the Business Model and Mapping tab and select the SH business model.

4. Click the Add Hierarchy button.

5. Click Next. 6. Click Select None.

7. Check Logical Table and Logical Column.

26

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

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

12. Click Add.

27

13. Click First letter of each word capital and click Add. 14. Click Change specified text. In the Find box, type a space and the letters Id. In the Replace With box, type a space and the letters ID. Check Case sensitive.

15. Click Add. 16. Click Next and review changes.

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

28

18. Save the repository. Do not check global consistency.

29

Delete Unnecessary Business Model Objects To delete logical columns that are not needed in the business model, perform the following steps: 1. 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. Alternatively, you can use the Delete key on your keyboard.

3. Click Yes to confirm the delete.

30

4. Verify that the Channels logical table now has only four logical columns.

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

31

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

32

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. Place the cursor over the icon to display the screenshot and repeat the steps to delete the highlighted logical columns in the Promotions table.

10. Place the cursor over the icon to display the screenshot and verify that the Promotions logical table has only the following logical columns:

11. Do not delete any columns in the Times table. 12. Save the repository. Do not check global consistency.

33

Build Dimension Hierarchies Dimension hierarchies introduce formal hierarchies into a business model, allowing Oracle BI Server to calculate useful measures and allowing users to drill down to more detail. In a business model, a dimension hierarchy represents a hierarchical organization of logical columns belonging to a single logical dimension table. Common dimension hierarchies used in a business model are time periods, products, customers, suppliers, and so forth. 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. In each dimension hierarchy, you organize dimension attributes into hierarchical levels. These levels represent the organizational rules and reporting needs required by your business. They provide the structure that Oracle BI Server uses to drill into and across dimensions to get more detailed views of the data. Dimension hierarchy levels are used to perform aggregate navigation, configure level-based measure calculations, and determine what attributes appear when Oracle BI users drill down in their data requests. To build the Channels dimension hierarchy in the SH business model, perform the following steps: 1. Right-click the Channels logical table and select Create Dimension.

34

2. Right-click the ChannelsDim object, which was created by the action in the previous step, and select Expand All.

3. Place the cursor over the icon to display the screenshot and verify that the ChannelsDim dimension hierarchy matches the picture.

4. Right-click the Channels Detail level and select New Object > Parent Level.

5. In the Logical Level dialog box, name the logical level Class and set the

35

Number of elements at this level to 3. This number does not have to be exact. The ratio from one level to the next is more important than the absolute number. 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.

36

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.

37

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.

14. Click OK to close the Logical Level dialog box. The Channel Total Attribute level is added to the hierarchy.

38

15. Right-click the Channel Total Attribute level and select Expand All.

16.. Drag the Channel Total column from the Channel Detail level to the Channel Total Attribute level.

17. Right-click Channel Total and select New Logical Level Key.

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

39

drilldown are selected.

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

20. Right-click the Channel Desc column and select New Logical Level Key.

21. In the Logical Level Key dialog box, notice that Use for drilldown is selected.

40

22. Click OK to close the Logical Level Key dialog. Both Channel Desc and Channel ID display with key icons.

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

24. Click the Keys tab.

41

25. Click Channels Detail_Key.

26. Click the Edit button.

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

28. Click OK to close the Logical Level Key dialog box. Notice that the key icons are different. Channel Desc is used for drill down Channels Detail_Key is

42

not. Later, 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. Based on this example, 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, not the Channels Detail_Key column.

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

31. Save the repository. Do not check global consistency. 32. Optional: Build a dimension hierarchy for the Products logical table. Use the preceding steps, the screenshot, and the characteristics below as a guide. Don't worry if you cannot complete this step. In Part Two of this OBE, you use a different repository that already has the dimension hierarchies prebuilt.

The ProductsDim dimension hierarchy should have the following characteristics: For the Subcategory level, set Number of elements at this level to 43

21. For the Category level, set Number of elements at this level to 5. For the Product Total Attribute level, set Number of elements at this level to 1. For the Products Detail level, uncheck Use for drill down for Products Detail_Key (Prod ID). Check Use for drill down for all other keys in the ProductsDim hierarchy. If you complete this step, save the repository. Do not check global consistency.

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. 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. It is the view of the data seen by end users in client tools and applications, such as Oracle BI Answers. The Presentation layer provides a means to further simplify or customize the Business Model and Mapping layer for end users. For example, you can organize columns into catalogs and folders. 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, 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. You typically create Presentation layer objects by dragging objects from the Business Model and Mapping layer. Corresponding objects are automatically created in the Presentation layer. Presentation layer objects can then be renamed and reorganized. To build the Presentation layer, you perform the following steps: 1. 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.

44

2. Expand the SH catalog in the Presentation layer. Notice that the tables and columns in the Presentation layer exactly match the tables and columns in the Business Model and Mapping layer. Notice also that dimension hierarchies are not displayed.

3. Save the repository. Do not check global consistency.

45

Testing and Validating a Repository


You have finished building the initial business model and now need to test the repository before continuing your development. You begin by checking the repository for errors using the check consistency option. You then test the repository by running queries using Oracle BI Answers. Finally, you examine the query log file to verify the SQL generated by Oracle BI Server. To test and validate a repository, you perform the following steps: Run a Consistency Check Enable Query Logging Create an empty Webcatalog to test your RPD Change the metadata files file and 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. Repositories and the business models within them must pass the consistency check before you can make business models available for queries. When a repository or business model is inconsistent, a detailed message alerts you to the nature of the inconsistency. The Consistency Check Manager displays three types of messages: Error messages indicate errors that need to be fixed to make the repository consistent. Warning messages indicate conditions that may or may not be errors, depending upon the intent of the Oracle BI Server administrator. For example, if the Administrator user has an empty password this should be addressed, but is not a requirement for a consistent repository. Best Practices messages provide information about conditions but do not indicate an inconsistency. For example, if there are physical tables with no keys defined, a best practice message is displayed. Defining keys for physical tables is best practice, but is not a requirement for a consistent repository. For each message the Consistency Check Manager identifies the message type, the object type, the object, and provides a detailed description of the message. There are options to display only selected message types, display results using

46

qualified names, check all objects in the repository, and copy the results to another file. To check consistency, you perform the following steps: 1. 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.

3. Click Yes to make the SH business model available for queries. The Consistency Check Manager displays.

47

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

5. In the Business Model and Mapping layer, 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).

6. Double-click the SH business model object to open the Business Model properties dialog box. Notice that Available for queries is checked.

7. Click OK to close the Business Model properties dialog box. 8. Save the repository. Click No when asked to check global consistency (you just checked it).

48

Enable Query Logging To enable query logging for the Administrator user, perform the following steps: 1. Select Manage > Security.

2. In the Security Manager, select Users in the left pane. The Administrator user appears in the right pane.

3. In the right pane, double-click Administrator. The User dialog box opens.

4. Verify that the User tab is selected. In the Password field, type Administrator and then confirm in the Confirm Password field. In the Logging level field, set the value to 2.

49

To test the repository, you need to generate some queries, retrieve the results, and examine the query log. You log query activity at the individual user level. Logging is intended for testing, debugging, and technical support. In production mode, logging is normally disabled because query logging can impact performance by producing very large log files.

5. Click OK to close the User dialog box. 6. Click Action > Close to close the Security Manager. 7. Save the repository. Do not check global consistency. 8. Select File > Close to close the repository. 9. Select File > Exit to close the Administration Tool.

50

Create an empty Webcatalog to test your RPD The end-user report objects are stored in a Web Catalog. We will create a new Web catalog to start our testing of the SH.rpd. 1. Browse to G:\biee\10.1.3.2\OracleBIData\web\catalog Create a new folder in this location called SH_Start

Change the metadata files file and Start Oracle BI Services In this step, you start the Oracle BI Server service to load the SH repository into memory. An entry in the Repository section of the initialization file NQSConfig.ini instructs Oracle BI Server to load a specific repository into memory upon startup. If Oracle BI Server detects a syntax error while loading the repository, it logs the error to the server log file (...\\OracleBI\server\Log\NQServer.log). The Linux image includes a special Process Control page that allows us to easily perform this change to the servers main metadata files through a web GUI. Modify the NQSConfig.ini only if you wish to change system settings like turning caching on. You will find instructions for doing this in the online documentation.

51

The path to the Web Catalog is stored in another initialization file called InstanceConfig.xml. The editing of this file has also been simplified on the Linux image by the Process Control page

1. Open the Process Control Page: http://oracle2go.us.oracle.com/go/process_control/pc.html Select Repository: sh.rpd and Web Catalog SH_Start Click SET

2. If the Oracle BI Server, Oracle BI Presentation Server and Oracle BI Java Host services were not started prior to making the previous change, you will need to explicitly start them. Ensure that the previous step is completed and that the files listed under each service are correct.

Check the BI Server and BI Presentation Server boxes and click Start

Wait until all the relevant flags go green

52

Use Oracle BI Answers to Execute Queries To start Oracle BI Answers and execute a query, perform the following steps: 1. Select Start > Programs > Oracle Business Intelligence > Presentation Services. 2. Log in to Oracle Business Intelligence as Administrator with password Administrator 3. Click the Answers link.

4. Click the SH subject area.

5. In the left pane, click the Customers folder to expand it. 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.

53

8. Click the Amount Sold column to add it to the request criteria.

9. Click the Results tab.

10. By default, results are displayed in a compound layout, consisting of a title and a table view.

54

Use Query Log to Verify Queries 1. Click Settings > Administration to open the Oracle BI Presentation Services Administration Window.

2. Click the Manage Sessions link to open the Session Management window.

3. In the Session Management window, under Cursor Cache, click the View Log link for the last entry.

4. The log displays the last query executed by Administrator. The log file should look similar to the picture.

55

Locate the SQL Request section. This section contains the logical SQL issued from Answers. Locate the General Query Info section, just below the SQL Request section. This section identifies the repository, subject area, and presentation catalog from which the query was run. Locate the Sending query to database named SH section, just below the General Query Info section. This section identifies the physical data source to which Oracle BI Server is connecting and the physical SQL that was generated. The rest of the file contains information such as query status, number of rows returned, and so forth. 5. Close the query log. 6. Click Finished to close the Session Management window. 7. Click Close Window to close the Oracle Bi Presentation Services Administration window. 8. Leave Answers open. Congratulations! Up to this point you have successfully built the Physical, Business Model and Mapping, and Presentation layers of a repository, run a consistency check, and tested the repository using Oracle BI Answers. For the remainder of this OBE you enhance the repository by performing tasks such as building calculation measures, adding multiple logical table sources, building variables and initialization blocks, mapping to aggregate tables, and so forth.

56

Creating Calculation Measures


Often, a business wants to compare values of a measure and needs a calculation to express the comparison. Oracle BI Server has a calculation engine to perform a multitude of calculations. 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. An Expression Builder enables you to create expressions that are similar to expressions created with SQL. In the examples in this lesson, you use the Expression Builder to create calculation measures that appear as columns to users in Answers. Users can then easily build queries using familiar terminology. There are different methods for creating calculation measures in the Administration Tool. You can use existing logical columns as objects in a formula, use physical columns as objects in a formula, or use the Calculation Wizard to automate the process. All three methods are covered in this OBE. You use physical columns for calculations that require and aggregation rule to be applied after the calculation. You use logical columns for calculation formulas that require an aggregation rule that is applied before the calculation. You can also build calculation measures in Answers. The advantages to building calculation measures in the repository is the measures are built once and can be made available to all users. The advantage of defining a logical column formula based on existing logical columns is that you only have to define it once. When you create formulas based on physical columns, you have to map for each physical source it could be derived from. To create calculation measures, you perform the following steps: Create a BI Server ODBC Connection 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

57

Create a BI Server ODBC Connection To edit the RPD while the server is running it is necessary to create a direct connection to the server rather than opening up the .rpd file on its own. The Oracle BI Server provides an ODBC API just for this purpose. This is also the way that Presentation Services connects to the mid-tier BI Server, requests being sent to the server as Logical SQL queries. To connect to this layer to modify the .rpd Online, we need to first create the necessary ODBC DSN: 1. Open Start > Control Panel > Administrative Tools > Data Sources (ODBC) 2. Click on the System DSN tab and select Add 3. Enter a suitable name for the DSN e.g. LinuxPEServer-SalesHistory Enter oracle2go for the Server

Click Next > 4. Login ID: Administrator Password: Administrator Port: 9703 Check the box Connect to the Oracle BI Server to obtain default settings

58

Click Next > 5. Change the default Catalog to SH

Click Finish 6. Hit OK to close the ODBC Administrator

59

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 using the Process control page: http://oracle2go.us.oracle.com/go/process_control/pc.html 2. Using Windows Explorer, navigate to G:\biee\10.1.3.2\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 G:\biee\10.1.3.2\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 from the process control page: http://oracle2go.us.oracle.com/go/process_control/pc.html 7. Click Start > Programs > Oracle Business Intelligence > Administration to open the Administration Tool. 8. Click File > Open > Online. 9. In the Open Online dialog box, select the LinuxPEServer-Sales History DSN you created earlier. Type Administrator in the Password field and click Open.

10 The SH repository opens in online mode.

60

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.

61

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.

62

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.

63

4. Set the aggregation rule for the Unit Cost logical column to SUM. Hint: doubleclick 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 File > Check In Changes or click the Check In Changes button on the toolbar to check in changes.

7. Click Yes when prompted to check global consistency. The Consistency Check Manager opens and displays Warnings and Best Practices messages. Review the messages.

64

8. For the purposes of this tutorial, you disable the Warnings and Best Practices messages. Click the Options tab.

9. Expand Warnings folder, select Check Features Match Default, and then click the Disable button.

If you desire, review the other Warnings items that are checked. 10 Select Best Practices > Physical Table > Search for Tables With No Keys, . and then click the Disable button.

If you desire, review the other Best Practices items that are checked. 11 Click the Messages tab. .

65

12 Click Check All Objects. The Consistency Check Manager displays with no . messages, indicating a consistent repository.

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

18 Click Results. .

19 Click Settings > Administration > Manage Sessions > View Log to view the . query log and examine the SQL generated by the request.

66

Create a Calculation Measure Using Answers Before you create calculation measures in the metadata using the Administration Tool, you create a calculation measure using Answers. You do this so you can compare your results later when you create similar calculations measures in the repository. To create a calculation measure using Answers, perform the following steps: 1. Click the Criteria tab. The request from the previous set of steps should still be open. 2. Add another Amount Sold column to the request.

3. Click the Edit Formula button for the Amount Sold column that you just added.

4. The Edit Column Formula dialog box displays with "Sales Facts"."Amount Sold" in the Column formula field.

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

67

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

8. Click the Custom Headings check box.

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

10.Click OK to close the Edit Column Formula dialog box and verify the change to the request.

68

11.Click Results.

12.Click Settings > Administration > Manage Sessions > View Log to view the query log. 13.Leave Answers open for the next topic.

69

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, using existing logical columns to define the calculation formula. To create a calculation measure using logical columns, perform the following steps. 1. 2. Return to the SH repository, which should still be open in online mode in the Administration Tool. Right-click the Sales Facts logical table and select New Object > Logical Column.

3.

In the Logical Column dialog box, name the logical column Gross Profit and check Use existing logical columns as the source.

4. 5. 6.

Click the Expression Builder button (three dots) to open the Expression builder. In the left pane, click Logical Tables. Select Sales Facts in the middle pane, Amount Sold in the right pane, and click Insert. The Amount Sold column is added to the formula.

70

7. 8.

Click the minus sign operator to add it to the formula. Double-click Unit Cost in the right pane to add it to the formula.

9.

Click OK to close the Expression Builder. Notice that the formula appears in the Logical Column dialog box.

71

10. Click OK to close the Logical Column dialog box. The Gross Profit logical column appears in the business model.

11. Drag the Gross Profit logical column to the Sales Facts table in the Presentation layer.

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

72

17. Expand Sales Facts and verify that the Gross Profit column is now visible in Answers.

18. Create the following request. (If the request from the previous topic is still open, delete the Gross Profit column you created in Answers and then add the Gross Profit column you created in the repository to the query.) Times.Calendar Year Sales Facts.Amount Sold, Sales Facts.Unit Cost, Sales Facts.Gross Profit

73

19. Click Results. Verify that the results are the same as for the query you built using the Gross Profit column created in Answers.

20. Click Settings > Administration > Manage Sessions > View Log to view the query log. Your results should look similar to the picture.

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

74

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

3. In the Logical Column dialog box, name the logical column Gross Profit Physical.

4. Click the Aggregation tab. 5. Set the default aggregation rule to SUM.

6. Click OK to close the Logical Column dialog box. Gross Profit Physical is

75

added to the business model.

7. Expand Sales Facts > Sources and double-click the SALES logical table source. The Logical Table Source dialog box opens. 8. Click the Column Mapping tab.

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

10 In the Expression Builder, select Physical Tables > SALES >

76

AMOUNT_SOLD and then click the Insert button to add the column to the formula.

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

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

77

14 Click OK to close the Logical Table Source dialog box. The icon for Gross . Profit Physical changes to indicate an aggregation rule is applied.

15 Drag Gross Profit Physical to Sales Facts in the Presentation layer. .

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

78

21 Expand Sales Facts and verify that the Gross Profit Physical column is now . visible in Answers.

22 Create the following request. . Times.Calendar Year, Sales Facts.Amount Sold, Sales Facts.Unit Cost, Sales Facts.Gross Profit Physical

23 Click Results. 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).

79

The calculation formula for the logical columns looks like this: sum(Amount Sold) sum(Unit Cost), whereas the calculation formula for the physical columns looks like this: sum(AMOUNT_SOLD UNIT_COST). Because of arithmetic laws, you know that you can sum ColumnA and sum ColumnB and then take the differences of those sums, 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. So in this example, the results are the same for the logical column and the physical column calculations. 24 Click Settings > Administration > Manage Sessions > View Log to view . the query log. Your results should look similar to the picture.

Note that the difference between amount sold and unit cost is calculated first and then summed: sum(T245.AMOUNT_SOLD - T168.UNIT_COST)in the example pictured here. 25 Close the query log. . 26 Click Finished to close the Session Management window. . 27 Click Close Window to close Oracle BI Presentation Services Administration. . 28 Leave Answers open for the next topic. .

80

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. To create a calculation measure using the Calculation Wizard, perform the following steps: 1. Return to the SH repository, which should still be open in online mode in the Administration Tool. 2. Right-click the Amount Sold logical column and select Duplicate.

3. A new column named Amount Sold#1 is added to the business model.

81

4. Rename Amount Sold#1 to Category Sales.

5. Double-click Category Sales to open the Logical Column dialog box. 6. Click the Levels tab and select Category as the logical level for ProductsDim.

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

82

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

11.Click Next. 12.Uncheck Change and Percent Change and check Percent.

83

13.Change Calculation Name to Share of Category.

14.Click Next.

15.Click Finish. Share of Category is added to the business model.

16.Drag Category Sales and Share of Category to Sales Facts in the

84

Presentation layer.

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

23.Place the cursor over the icon to display the screenshot and use it as a reference to create a query. Notice the sort settings for the Prod Category and Amount Sold columns.

24.Expand the Times folder.

85

25.Hold down the Ctrl key and click the Calendar Year column to open the Create/Edit Filter dialog box.

26.Click the All Choices link.

27.Click 2001 to add it to the Value field.

28.Click OK to close the Create/Edit Filter dialog box. The filter is added to the request.

29.Click Results. Only partial results are shown in the picture.

86

30.Leave Answers open.

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. It is the view of the data seen by end users in client tools and applications, such as Oracle BI Answers. The Presentation layer provides a means to further simplify or customize the Business Model and Mapping layer for end users. For example, you can organize columns into catalogs and folders. 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, 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. You typically create Presentation layer objects by dragging objects from the Business Model and Mapping layer. Corresponding objects are automatically created in the Presentation layer. You also can manually create catalogs and folders based on the needs of your users. Presentation catalogs allow you to show different views of a business model to different sets of users. Presentation catalogs have to be populated with content from a single business model. They cannot span business models. However, multiple presentation catalogs can refer to the same business model. Presentation catalogs contain presentation tables. You can use the Presentation Tables tab in the Presentation Catalog properties dialog box to reorder, sort, or delete Presentation layer tables. You can also use this tab to access the Presentation Table dialog box, where you can create and edit tables. Changes to 87

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

3. Click the Presentation Tables tab.

88

4. To create a new presentation Table, click the Add button to open the Presentation Table dialog box. 5. Click the General tab and name the presentation table Calendar. 6. In the Description field, type -> Calendar time attributes. Adding -> in the description nests the table under the table above it. The description displays as a tool tip in Answers.

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

9. Drag the tables or use the Up and Down buttons to rearrange the tables in the following order: Times

89

Fiscal Calendar Products Customers Channels Promotions Sales Facts

10.Click OK to close the Presentation Catalog dialog box. The new tables are added to the Presentation layer and the presentation tables are reordered.

11.Double-click the Channels presentation table to open the Presentation Table dialog box. 12.Click the Columns tab. 13.Drag the columns or use the Up and Down arrows to reorder the columns. A suggested approach is to order the columns hierarchically from top to bottom.

14.Click OK to close the Presentation Table dialog box. The column order is changed in the Presentation layer.

90

15.Expand the Times presentation table. 16.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 Calendar presentation table. Use Shift+click and Ctrl+click to select multiple columns.

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

91

22.Verify that the Fiscal and Calendar folders are nested under the Times folder.

23.Verify that the columns in the Fiscal and Calendar folders appear as expected.

24.Verify that the Channels columns appear as expected.

25.Leave Answers open.

92

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. A variable has a single value at any point in time. Variables can be used instead of literals or constants in the Expression Builder in the Administration Tool. 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. There are two classes of variables: repository variables and session variables. A repository variable has a single value at any point in time. There are two types of repository variables: static and dynamic. Static repository variables have values that are constant and do not change while Oracle BI Server is running. Dynamic repository variables have values that are refreshed by data returned from queries in initialization blocks. Repository variables are represented by a question mark icon in the Variable Manager. Session variables are created and assigned a value when each user logs on. There are two types of session variables: system and nonsystem. System variables have reserved names and are used for specific purposes by Oracle BI Server, such as authenticating users. Non-system variables are applicationspecific variables created by an Administrator. System and nonsystem variables are represented by a question mark icon in the Variable Manager. Initialization blocks are used to initialize dynamic repository variables, system session variables, and nonsystem session variables. To create initialization blocks, session variables, and dynamic repository variables, you perform the following steps: Create an Initialization Block for Session Variables Test the Initialization Block and Session Variables Create a Dynamic Repository Variable

93

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

2. Click Manage > Variables to open the Variable Manager.

3. Click Session > Initialization Blocks.

94

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.

95

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.

96

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. In the Name field, type USER.

14. Click OK to close the Session Variable dialog box. 15. Click Yes when prompted about the USER session variable having a special purpose.

16. The USER variable is added to the Session Variable Initialization Block Variable Target dialog box.

97

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

98

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

19. Click OK to close the Session Variable Initialization Block dialog box. The setUser initialization block is visible in the Security Manager.

20. Click Action > Close to close the Variable Manager. 21. Check in changes. 22. Save the repository.

99

Test the Initialization Block and Session Variables 1. Click Manage > Security to open the Security Manager.

2. Click Groups in the left pane.

3. Right-click the white space in the right pane and select New Security Group.

4. Name the group CountryManagers. 5. Click the Permissions button to open the User / Group Permissions dialog box.

100

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

9. Click Select to add Customers to the User / Group Permissions dialog box.

10. Click the Expression Builder button (three dots) on the right to open the

101

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

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

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

102

15. Click OK to close the User / Group Permissions dialog box. 16. Click OK to close the Group dialog box. CountryManagers is added as a group in the Security Manager.

17. Click Action > Close to close the Security Manager. 18. Check in changes. 19. Save the repository. 20. Return to Answers. 21. Log out of Answers.

22. Test the initialization block by logging in to Answers as one of the users in the initialization block: Kurt, Keiko, Charles, or Karen. 23. Create the following query: Customers.Country, Times.Calendar.Calendar Year, Sales Facts.Amount Sold.

24. Click Results. The results of the query should correspond to the the user's country (Kurt = Germany, Keiko = Japan, Charles = United Kingdom, Karen = United States of America). The picture shows the results when the user = Kurt.

103

25. Leave Answers open.

Create a Dynamic Repository Variable 1. Return to the SH repository open in online mode. 2. Click Manage > Variables to open the Variable Manager. 3. Click Repository > Initialization Blocks.

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.

104

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. 9. In the Default Initialization String field, type the following SQL: select TIME_ID, CALENDAR_YEAR, CALENDAR_MONTH_DESC, CALENDAR_MONTH_ID from TIMES WHERE TIME_ID = (select max(TIME_ID) from SALES)

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

105

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

12.Use the New button to create four variables: maxSalesDate, maxYear,

106

maxMonthDesc, and maxMonthID. The order is important. The order of the variables must match the column order in the initialization string.

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

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

16.Close Results. 17.Click OK to close the Repository Variable Init Block Data Source dialog box.

107

18.Click OK to close the Repository Variable Init Block dialog box. The getMaxSalesDate initialization block is displayed in the Variable Manager.

19.Select Repository > Initialization Blocks > Variables > Dynamic to see the variables displayed in the Variable Manager.

20.Click Action > Close to close the Variable Manager. 21.Check in changes. 22.Select File > Check Global Consistency. If the Consistency Check Manager displays any errors, edit the repository to correct the errors before continuing. If there are no error messages, close the Consistency Check Manager. 23.Save the repository. 24.Return to Answers. 25.Build the following query: Calendar.Calendar Year, Sales Facts.Amount Sold.

26.Click the Add Filter button for the Calendar Year column.

108

27.In the Create/Edit Filter dialog box, click Add > Variable > Repository.

28.In the Server Variable field, type maxYear.

29.Click OK to close the Create/Edit Filter dialog box. The filter is added to the request.

30.Click Results and verify that Calendar Year returns the expected result.

109

Adding Multiple Sources


Data is often partitioned into multiple physical sources for a single logical table in a business model. When a logical table source does not contain the entire set of data at a given level, you need to specify the portion of the set that it does contain. When individual sources at a given level contain information for a portion or fragment of the domain, Oracle BI Server needs to know the content of the sources in order to pick the appropriate source for the query. The goal is to provide seamless and efficient access from the users' perspective. When there are multiple sources, the metadata is built so that Oracle BI Server handles the navigation to the appropriate source. Oracle BI Server can seamlessly access and process data from multiple sources in an efficient manner to satisfy users requests. In this example, sales quota numbers are stored in an XML file, SHQuota.xml. You incorporate the quota numbers into the business model and create business measures to report variance from quota and percent of quota. To add quota information to the business model, you perform the following steps. Import the XML data source into the repository Map the Logical Dimension Columns Setup Time Alias on imported XML source Create the quota measures Test the Quota Measures. First, copy the file SHQuota.xml to the network drive G:\. This equates to the folder /ora/ in the Linux file system. Also, go to the Process Control page and change the BI Server to use the original SH.rpd that you backed-up as SH_backup.rpd at the beginning of this entire tutorial.

Import the XML data source into the repository 1. Return to the SH repository open in online mode. 2. Select File > Import > from Database.

110

3. Change the Connection Type to XML in the dropdown. Insert the URL: G:\SHQuota.xml Leave the XSLT and other parameters blank.

4. Click OK. The Import dialog box opens. 5. In the Import dialog box, select the top level SHQuota.xml object.

6. Verify that Tables are checked and click Import. Click OK to accept the default configuration for the XML Connection Pool

111

7. When import completes, close the Import dialog box and verify that the SHQuota table has been imported into the Physical layer.

8. Double-click the Table database object in the Physical layer (SHQuota) to open the Table dialog box. 9. Since this file needs to be accessed by the Linux server we need to change the path to the file. Click the XML tab. Change the URL from G:\SHQuota.xml to /ora/SHQuota.xml

112

10.Since XML is all text by default, this time we need to manually tell the server what format the column data is expected in. Click on the Columns tab. Double-click on Amt column and change Type to DOUBLE. Click OK.

11.Likewise, change the following other column types: Quota: DOUBLE Year: INT QtrNumber:INT

12.Click OK to close the Table dialog box. 13.Check in changes. 14.Save the repository.

113

Map the Logical Dimension Columns 1. In the Business Model and Mapping layer, expand Customers > Sources and note that there are two logical table sources: CUSTOMERS and COUNTRIES.

2. Drag the physical column Country from SHQuota in the Physical layer to the logical column Customers.Country in the Business Model and Mapping layer. Notice that a new logical table source, SHQuota, is created automatically.

3. Drag the physical columns SubRegion and Region from SHQuota in the Physical layer to the corresponding logical columns in the Customers table in Business Model and Mapping Layer. 4. Double-click the SHQuota logical table source in the Customers > Sources folder to open the Logical Table Source dialog box. 5. Click the Column Mapping tab. Notice the logical to physical column mappings.

114

6. Click OK to close the Logical Table Source dialog box. 11. Repeat the steps and map Products.Prod Category to Category and verify the logical table source mapping.

Setup Time Alias on imported XML source The Time Comparison measure functions Ago() and ToDate() used elsewhere in this tutorial enforce requirements on the physical tables. Specifically, the Time attributes must be in a separate physical layer table definition from other attributes. This can be easily achieved in most instances via the use of an alias. We need to use this approach for the imported XML file. 1. Right click on SHQuota. Select New Object > Alias. Call the object TimeAlias

115

2. Right-click on the XML database and select Physical Diagram > Selected Objects Only

3. Create a foreign key join from the TimeAlias table to the SHQuota table:

Click on the foreign key button: The icon should remain pushed in Now click first on the TimeAlias table and then click on the SHQuota table (The join path should appear as a line from the source to target as you drag the mouse between the first and second click)

4. Create a join on ALL COLUMNS by multi-selecting all columns from both table lists. The expression for the join should correctly map each column from parent to child but can be edited if it is not as shown below:

116

Since we dont have a dedicated dimension table at the quarter level, this join on all columns ensures we can model the XML file as an aggregate time dimension without worrying about double-counting quotas. 5. Accept the table key creation by clicking Yes. 6. The joined Tables should appear in the Physical layer as follows:

7. Check in changes. 8. Check global consistency. Fix any errors before proceeding. 9. Save the repository.

117

Create the quota measures 1. Drag the column SHQuota.Quota from the Physical layer onto the Sales Facts logical table. Notice that a new logical table source, SHQuota, and a new logical column, Quota, are created. 2. Double-click Sales Facts.Quota to open the Logical Table dialog box. 3. Click the Aggregation tab and set the aggregation rule to Sum.

4. Close the Logical Table dialog box. 5. The Quota logical column states quota in thousands, so rename Quota to Quota (000). 12.Set the Level of the Quota (000) Measure according to the granularity of the XML file:

118

6. Right-click Sales Facts and select New Object > Logical Column to open the Logical Column dialog box. 7. Click the General tab and name the logical column Quota. 8. Check Use existing logical columns as the source.

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

119

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

12.Close the Logical Column dialog box. The Quota column is added to the business model.

13.Right-click Sales Facts.Amount Sold and select Calculation Wizard. 14.Click Next. 15.Select the Quota column.

16.Click Next.

120

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

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

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

121

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

23.Add the Quota (000), Quota, Variance From Quota, and % of Quota measures to the Sales Facts presentation table.

24.Check in changes. 25.Check global consistency. If you receive any Error messages, edit the repository to correct the errors before proceeding. 26.Save the repository.

Test the Quota Measures.

122

1. 2. 3.

Return to Answers. Log out and then log back in as Administrator with password Administrator. Reload Server Metadata. Create the following request: Calendar.Calendar Year, Sales Facts.Amount Sold, Sales Facts.Quota, Sales Facts.Variance From Quota, Sales Facts.% of Quota.

4.

Create the following filter: Calendar Year is equal to / is in 1999, 2000, 2001.

5.

Click Results. (Please note that SHQuota contains data only for 2001).

6.

Drill down on 2001.

7. 8. 9.

Examine the query log Click Settings > Administration. Click Manage Sessions.

10. Locate the last query run under Cursor Cache and click View Log.

11. Notice that two separate queries are executed to collect the data from the ORCL database and the SHQuota.xml file:

123

-------------------- Sending query to database named SH (id: <<46098>>): WITH SAWITH0 AS (select D1.c1 as c1, D1.c2 as c2, D1.c3 as c3 from (select sum(T245.AMOUNT_SOLD) as c1, T268.CALENDAR_YEAR as c2, T268.CALENDAR_QUARTER_DESC as c3, ROW_NUMBER() OVER (PARTITION BY T268.CALENDAR_QUARTER_DESC ORDER BY T268.CALENDAR_QUARTER_DESC ASC) as c4 from TIMES T268, SALES T245 where ( T245.TIME_ID = T268.TIME_ID and T268.CALENDAR_YEAR = 2001 ) group by T268.CALENDAR_QUARTER_DESC, T268.CALENDAR_YEAR ) D1 where ( D1.c4 = 1 ) ) select SAWITH0.c2 as c1, SAWITH0.c3 as c2, SAWITH0.c1 as c3 from SAWITH0 order by c2 +++Administrator:b5ed0000:b5ed000b:----2007/05/22 01:16:07

-------------------- Sending query to external gateway database named G:\SHQuota.xml (id: <<46004>>): <NQSQueryInput><NQSDatabaseName>G:\SHQuota.xml</NQSDatabaseName><NQSUser></NQSUser>< NQSPassword></NQSPassword><NQSQuery><NQSColumn> <NQSColumnType>int</NQSColumnType> <NQSColumnAlias>c2</NQSColumnAlias> <NQSColumnName>Year</NQSColumnName> <NQSColumnFullName>//Table/QUOTA/Year</NQSColumnFullName> <NQSTableName>SHQuota</NQSTableName> <NQSTableAlias>4194</NQSTableAlias> <NQSTableAliasName>SHQuota</NQSTableAliasName> <NQSTableFullName>/ora/SHQuota.xml</NQSTableFullName> </NQSColumn> <NQSColumn> <NQSColumnType>string</NQSColumnType> <NQSColumnAlias>c3</NQSColumnAlias> <NQSColumnName>QtrDesc</NQSColumnName> <NQSColumnFullName>//Table/QUOTA/QtrDesc</NQSColumnFullName> <NQSTableName>SHQuota</NQSTableName> <NQSTableAlias>4194</NQSTableAlias> <NQSTableAliasName>SHQuota</NQSTableAliasName>

124

<NQSTableFullName>/ora/SHQuota.xml</NQSTableFullName> </NQSColumn> <NQSColumn> <NQSColumnType>double</NQSColumnType> <NQSColumnAlias>c5</NQSColumnAlias> <NQSColumnName>Quota</NQSColumnName> <NQSColumnFullName>//Table/QUOTA/Quota</NQSColumnFullName> <NQSTableName>SHQuota</NQSTableName> <NQSTableAlias>4194</NQSTableAlias> <NQSTableAliasName>SHQuota</NQSTableAliasName> <NQSTableFullName>/ora/SHQuota.xml</NQSTableFullName> </NQSColumn> </NQSQuery></NQSQueryInput>

+++Administrator:b5ed0000:b5ed000b:----2007/05/22 01:16:08 -------------------- Query Status: Successful Completion +++Administrator:b5ed0000:b5ed000b:----2007/05/22 01:16:08 -------------------- Rows 201, bytes 9648 retrieved from database query id: <<46004>> +++Administrator:b5ed0000:b5ed000b:----2007/05/22 01:16:08 -------------------- Rows 4, bytes 224 retrieved from database query id: <<46098>>

12. Close the query log. 13. Click Finished to close the Session Management screen. 14. Click Close Window to close the Oracle BI Presentation Services screen. 15. Leave Answers open.

Executing Direct Database Requests


Users with the appropriate permissions can create and issue a direct database request directly to a physical back-end database. 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. 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, you can create direct database requests. By default, this privilege is set only for users defined as Presentation Server Administrators.

125

Execute Direct Database Requests: If this privilege is set for you, you can issue physical requests. By default, this privilege is not enabled for anyone. It can be changed by a Presentation Server Administrator. To execute a direct database request, perform the following steps: 1. In Answers, click Settings > Administration.

2. In the Oracle BI Presentation Service Administration screen, click Manage Privileges to open the the Privilege Administration screen.

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

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.

126

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

127

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 .

128

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. There is a utility in Oracle BI EE called the Aggregate Persistence Wizard that enables model-first DWH development and maintenance. Hence from the business model we have already created, it is possible to quickly generate aggregate tables to improve system performance and have these tables automatically mapped into the central business model without the need to maintain these mappings manually. The following steps are included for Managing Aggregates: Run the Aggregate Persistence Wizard Execute the Aggregate Build Scripts Study the Aggregate Metadata and Test in Answers

Run the Aggregate Persistence Wizard 1. In the Administration Tool, go to Tools > Utilities Select Aggregate Persistence Wizard and click Execute

129

Insert a path for the aggregate DDL file. E.g. G:\AggregateDDL.sql. Click Next

Select the whole fact table SalesFacts

Select the levels of aggregation for each dimension. Since we are including SHQuota fields, these should only include the dimensions for which quotas are stored and to the following maximum depth: ProductDim: Category TimeDim: Quarter CustomerDim: Subregion

Click Next

130

Select the location for the aggregate within the existing SH schema. Click Next

Notice the logical SQL generated by the wizard


"ag_Salesfacts" for "SH"."Salesfacts"("Amount Sold","Unit Cost","Gross Profit Physical","Category Sales","Amount Sold MAgo","Unit Cost MAgo","# of Customers","# Customers MAgo","CountDays","Quota (000)") at levels ("SH"."ProductsDim"."Category", "SH"."TimesDim"."Quarter", "SH"."CustomersDim"."Subregion") using connection pool "orcl SH"."Connection Pool" in "orcl SH".."SH"

Check I am done and click Next Click Finish

Save and Check-in Changes. Close the Administration Tool

131

Execute the Aggregate Build Scripts These scripts can be executed either using the NQCmd.exe utility on-demand or, if the BI Server is to be responsible for rebuilding aggregates on a regular basis these jobs can be set up in the BI Scheduler. As we have not configured the scheduler yet, we will use the NQCmd utility. To execute the aggregate build scripts follow these steps: Open a command prompt: Start > Run > cmd Browse to G:\ and run the following command to create the Aggregate metadata
nqcmd -d LinuxPEServer-SalesHistory -s g:\AggregateDDL.sql -u Administrator -p Administrator

Notice the executed command and output results:


create aggregates

"ag_Salesfacts" for "SH"."Salesfacts"("Amount Sold","Unit Cost","Gross Profit Physical","Category Sales","Amount Sold MAgo","Unit Cost MAgo","# of Customers","# Customers MAgo","CountDays","Quota (000)") at levels ("SH"."ProductsDim"."Category", "SH"."TimesDim"."Quarter", "SH"."CustomersDim"."Subregion") using connection pool "orcl SH"."Connection Pool" in "orcl SH".."SH" Statement execute succeeded

Processed: 1 queries

Next run the following command to create the Aggregate tables in the database
nqcmd -d LinuxPEServer-SalesHistory -s g:\AggregateDDL.sql_DDL -u Administrator -p Administrator

Notice the executed command and output results:


prepare aggregates

"ag_Salesfacts" for "SH"."Salesfacts"("Amount Sold","Unit Cost","Gross Profit Physical","Category Sales","Amount Sold MAgo","Unit Cost MAgo","# of Customers","# Customers MAgo","CountDays","Quota (000)") at levels ("SH"."ProductsDim"."Category", "SH"."TimesDim"."Quarter", "SH"."CustomersDim"."Subregion") using connection pool "orcl SH"."Connection Pool" in "orcl SH".."SH"

Statement execute succeeded

Processed: 1 queries

132

Study the Aggregate Metadata and Test in Answers Open Admin Tool and connect to Oracle BI Server Online Notice the new Physical tables with a red icon have been created in the SH schema and new Logical table sources in the Business Model

Studying the new SalesFacts table source, you can understand how preexisting aggregates are manually mapped into the business model by creating a new logical table source, defining the appropriate expression to map each Logical column to the aggregate table:

Then the aggregation level of the logical table source is configured for each dimension under the Content tab to tell the server when it should be used vs the detail tables or other aggregates:

133

Also you can see from the new Logical Dimension Table sources (e.g. for the Time Dimension) that aggregate dimension tables are included and set to the correct level for that dimension.

This further speeds up query times and ensures that tables are joined at the same level so as not to double count any records. The tables we created with the Aggregate Persistence Wizard have the following physical relationships:

E.g. Join on Category:

134

Test the aggregates by logging into Answers and creating the same query as before:

Run the query and check the results

8. Click Settings > Administration. 9. Click Manage Sessions. 10. Locate the last query run under Cursor Cache and click View Log.

You can see from the SQL that the BI Server aggregate awareness ensured the new table was used without any guidance from the user and as a result all previously created queries will now run faster if they are at a sufficiently high level of granularity. Notice also that even though the physical aggregate tables do not include any calculated measures like Variance from Quota or % Quota, the server uses the aggregate definitions for the base measures to calculate the derived figures in the most optimal way.
-------------------- SQL Request: SET VARIABLE QUERY_SRC_CD='Report';SELECT Calendar."Calendar Year" saw_0, "Sales Facts"."Amount Sold" saw_1, "Sales Facts".Quota saw_2, "Sales Facts"."Variance from Quota" saw_3, "Sales Facts"."% of Quota" saw_4 FROM SH ORDER BY saw_0

+++Administrator:b5fc0000:b5fc001b:----2007/05/22 05:42:10

-------------------- General Query Info: Repository: BIEE, Subject Area: SH, Presentation: SH

+++Administrator:b5fc0000:b5fc001b:----2007/05/22 05:42:10

135

-------------------- Sending query to database named orcl SH (id: <<213522>>): WITH SAWITH0 AS (select sum(T4383.Quota_0008059661B) as c1, sum(T4383.Amount_Sol00000140) as c2, T4315.Calendar_Y00000809 as c3 from SA_Quarter0000097D T4315, ag_Salesfacts T4383 where ( T4315.Calendar_Q000007F5 = T4383.Calendar_Q000007F5 ) group by T4315.Calendar_Y00000809) select distinct SAWITH0.c3 as c1, SAWITH0.c2 as c2, SAWITH0.c1 * 1000 as c3, nvl(SAWITH0.c2 , 0) - nvl(SAWITH0.c1 * 1000 , 0) as c4, case when SAWITH0.c1 * 1000 = 0 then NULL else SAWITH0.c2 * 100.0 / nullif( SAWITH0.c1 * 1000, 0) end as c5 from SAWITH0 order by c1

+++Administrator:b5fc0000:b5fc001b:----2007/05/22 05:42:10

-------------------- Query Status: Successful Completion

136

Creating Time Series Measures


The ability to compare business performance with previous time periods is fundamental to understanding a business. Time comparisons allow businesses to analyze data that spans multiple time periods, providing a context for the data. Yet, as Ralph Kimball states, 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. SQL was not designed with business reports in mind. SQL was really an interim language designed to allow relational table semantics to be expressed in a convenient and accessible form, and to enable researchers and early developers to proceed with building the first relational systems in the mid1970s. 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. Oracle BI Server runs multiple queries in parallel to get the results. The queries that run in the background to support the time measure are transparent to the user. Oracle BI Server provides Ago and ToDate functions for time series comparisons. Both of these functions operate on measures. The Ago function calculates the aggregated value as of some time period shifted from the current time. For example, the Ago function can produce sales for every month of the current quarter, along with the corresponding quarter ago sales. The ToDate function is used to aggregate a measure attribute from the beginning of a specified time period to the currently displaying time. For example, the ToDate function can calculate Month to Date sales for a given year. You use the Expression Builder to apply the functions. To create time series measures, 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 Ensure Correct Month Sort-Order for To-Date Calculation Test the Time Series Measures

137

Identify a Dimension as a Time Dimension: 1. In the Business Model and Mapping layer, double-click the TimesDim dimension hierarchy to open the Dimension dialog box. 2. In the Dimension dialog box, check Time Dimension.

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

7. Click OK to close the Logical Level dialog box.

138

Create a Month Ago Measure 1. Right-click Sales Facts and select New Object > Logical Column to open the Logical Column dialog box. 2. Name the logical column Month Ago Sales.

3. Check Use existing logical columns as the source. 4. Click the Expression Builder button (three dots) to open the Expression Builder. 5. Select Functions > Time Series Functions > Ago. 6. Click Insert to add the Ago function to the Expression Builder.

139

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

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

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

140

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

13.Click OK to close the Logical Column dialog box.

141

Create a Change Month Ago measure 1. Right-click Sales Facts and select New Object > Logical Column to open the Logical Column dialog box. 2. Name the logical column Change Month Ago Dollars. 3. Check Use existing logical columns as the source. 4. Click the Expression Builder button to open the Expression Builder. 5. Select Logical Tables > Sales Facts and then double-click Amount Sold to add it to the expression. 6. Insert a minus sign in the expression. 7. 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.

9. Click OK to close the Logical Column dialog box.

142

Create a To-Date Measure 1. Right-click Sales Facts and select New Object > Logical Column. 2. Name the new logical column Year To Date Sales.

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

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

143

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

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

11. Click OK to close the Logical Column dialog box.

144

Ensure Correct Month Sort-Order for To-Date Calculation 1. In the Business Model and Mapping layer, expand the Times logical table. 2. Double-click Calendar Month Name to open the logical column dialog box. 3. Click the Set button. 4. Select Calendar Month Desc and click OK.

5. The sort order column displays in the Logical Column dialog box.

The Calendar Month Name column is now automatically sorted by Calendar Month Desc whenever it is used in an Answers query. 6. Click OK to close the logical column dialog box. 7. Drag the three time series measures from the Business Model and Mapping layer to the Sales Facts presentation table.

8. Check in changes.

145

9. Check global consistency. Fix any errors before proceeding. See here for how to resolve any Time dimension errors related to imported XML data source. 10.Save the repository.

Test the Time Calculations 1. Return to Answers and reload server metadata. 2. Create the following query and filter in Answers: Times.Calendar Month Name Sales Facts.Amount Sold Sales Facts.Month Ago Sales Sales Facts.Change Month Ago Sales Sales Facts.Year To Date Sales Calendar Year is equal to / is in 2001

3. Click Results.

146

Summary
In this lesson, you should have learned how to: Build the Physical, Business Model and Mapping, and Presentation layers of a repository Test and validate a repository Create calculation measures Use initialization blocks and variables Add multiple sources to logical tables in a business model Execute direct database requests Use aggregate tables to speed processing Create time series measures

Related Information To learn more about Oracle Business Intelligence, you can refer to: Additional OBEs on the OTN Web site.

147

ORACLE BUSINESS INTELLIGENCE WORKSHOP


Creating Interactive Dashboards and Using Oracle Business Intelligence Answers

Purpose
This tutorial shows you how to build, format, and customize Oracle Business Intelligence queries and format and customize requests and Interactive Dashboards.

Time to Complete
Approximately 2 hours

Topics
This tutorial covers the following topics:

Overview ..................................................................................................................1 Prerequisites ............................................................................................................2 Creating a Query and a Chart ....................................................................................3 Working with a Pivot Table ......................................................................................20 Creating a Narrative View........................................................................................25 Creating Column Selectors and View Selectors ........................................................30 Creating an Interactive Dashboard ...........................................................................39 Using Dashboard Prompts and Presentation Variables..............................................43 Summary ...............................................................................................................54 Related Information ................................................................................................55

Overview
This tutorial covers how to use Oracle Business Intelligence Answers to create queries, format views, charts, and add user interactivity and dynamic content to enhance the user experience. You create queries and work with views including charts, pivot tables, and narratives. You then create selectors to drive interactivity in your Business Intelligence requests, and build a custom Dashboard to contain the requests and views you've created. Finally, you work with dashboard prompts to filter your dashboard and populate variables.

Scenario
The dashboard you build in this tutorial charts sales for the last 12 months by channel, country region, and product category and provides trend analysis data as well as narrative highlights of categories that have declined in sales in the last month.

Prerequisites
This tutorial accompanies the BIC2G:EE 10.1.3.2 VMWare image (Linux Edition v1.0). Make sure you have 2 GB RAM and 15 GB hard disk space. Have VMWARE Player, or VMWARE Sever installed on your machine. If you do not have VMWare software, download a copy of VMWare Player from http://www.vmware.com/download/player/ . To set the Linux VMWare image to use the correct data sets and business model, take the following steps: 1. Boot up the Linux VMWare image waiting until the image console displays a welcome message. Follow the instructions on that screen to connect to the hosted server from a local browser 2. In a browser, go to the Process Control page http://oracle2go.us.oracle.com/go/process_control/pc.html 3. Change the repository and WebCatalog to sh.rpd and SH respectively. These configuration files set up the BI Server to use the Sales History schema that is shipped for the Oracle database. to store the new settings. Wait for the changes to be reflected in the Log and underneath Click the process state indicators for Oracle BI Server and Oracle BI Presentation Server. If either of these have red flags beside them, select the checkbox and click When this process is complete, the control page should look like the example below.

4. In a browser, navigate to http://oracle2go.us.oracle.com:9704/analytics , Enter Administrator as the User ID and password, and click Log In.

Creating a Query and a Chart


In this topic you build and format a business intelligence request using Oracle BI Answers, and create and format a chart. Create a query Add a filter Create totals and format results Create a chart

To create a query, perform the following steps: 1. Click the Answers link to navigate to the Answers start page, and select the Sales History subject area by clicking the SH link in the Subject Areas list.

In this example, there is only one subject area, but there could be a long list, depending on the metadata that is defined in the Oracle Business Intelligence repository, which can contain multiple subject areas. Subject areas are sets of related information with a common business purpose.

2.

In the left-hand selection pane of the Answers interface, click the Plus icon next to Times to expand it. Expand the Calendar table and click the Calendar Month Desc column to add it to your query criteria, which appears in the right pane.

The query you are building has one measure and three attributes.

3.

Click the Calendar Month Name column to add it to your query. From the Products table, add the Prod Category column. Finally, add Measures > Sales Facts > Amount Sold (000). Your query should look like this:

4.

You can reorder the columns in your query by clicking and dragging them. Drag the Prod Category column in front of the columns from the Calendar table in your query. Your query criteria should look like this:

Now drag the column back to its original location.

5.

Add a saved filter to the query to limit the data to the last 12 months (based on the SH data, this will cover from January to December 2001). Under Filters in the left-hand selection pane, expand the SH folder and click the Most Recent 12 Months. The Apply Saved Filter dialog box is displayed.

This filter has been created and saved in a shared folder so that it can be used by other users. The filter uses a variable defined as the value of the maximum month ID, which has been created in the Oracle BI repository metadata to ensure that it is synchronized with the data.

6.

Click OK in the Apply Saved Filter dialog box to add the filter to your query.

7.

Click the Advanced tab. The Advanced tab can be made available only to specific users. The XML fully defines the query (including chart formats in case of charts). The SQL defines the content of the query. Note that any query or reporting tool that can issue SQL over ODBC connection, can issue a query to the BI server, just like Answers. Examine the request XML that defines the view and the logical SQL that will be issued for the query.

The Request XML defines the whole analysis, including logical SQL and views for the query. The SQL Issued field contains only the logical SQL that will be issued to the Oracle BI Server for processing. Note the saw_X column aliases, which are added automatically. Editing the logical SQL will change your view definitions.

To add a filter for the direct channel, perform the following steps: 1. Click the Criteria tabs, using the selection pane, add Channels > Channel Desc to your query criteria.

2.

In the criteria pane, click the Filter

button on the Channel Desc column to add a filter on that column.

3.

In the Create/Edit Filter dialog box, click the All Choices link to display all values for the column.

You can also limit the list of choices by setting a match criteria using the Match drop-down menu and entering a string, then clicking the All Choices link. The Limited Choices link will limit choices to those that are consistent with any pre-existing filters.

4.

Verify that the Operator for the filter is set to "is equal to / is in" and then click the Direct Sales value in the list of choices. Direct Sales is added as a value in the filter. Click OK to create the filter.

The filter is added to the existing saved filter you used earlier.

5.

Click the Delete button (with and X) on the Channel Desc column to delete it from the criteria. You are filtering on the channel, but you don't need the column in your query.

Another way to achieve this result is to CTRL-click the column in the selection pane, which opens the Create/Edit Filter dialog box with the selected column, but doesn't add the column to the query criteria.

6.

Your query criteria should look like this:

7.

Click the Results tab to view the results of your query.

Other ways to view results are by clicking the view buttons below the tabs in the Criteria pane, or by clicking the Display Results button below the columns in your query criteria. By default, the results are displayed in the Compound Layout view, which contains two other views, a Title view and a Table view. As you will see, you can delete these default views and add other views to the Compound Layout. Later, you will add these different types of views to a dashboard.

8.

Return to the Criteria tab and remove the Channel Desc filter you just created by clicking the X next to the filter in the Filters section.

To create totals and format results, perform the following steps: 1. To open the Edit Table view for your results, click the Edit view Compound Layout. icon for the Table view in the

The column controls for each column are displayed with the results. Using the view-level controls, you can also set table-wide formatting properties, import formatting from other queries, and set grand totals for the entire table.

2.

Click the Total By results.

icon above the Calendar Month Desc column to add subtotals by month to your

The measure is totalled each time the value in Calendar Month Desc changes. In this case, the default aggregation rule (SUM) is applied. The default aggregation rule is set in the Oracle BI repository metadata, but can be overridden using controls in the Edit Formula dialog box accessed through the Edit Formula icon in the Edit Table view or the Criteria tab.

3.

Click the Grand Total button at the view level to add a grand total to your results.

4.

In the Display drop-down menu, select Results Only to eliminate the Header Toolbars.

5.

button to navigate to the end Scroll down to the bottom of the Results pane and click the All Pages of your results. Verify that the grand total that you set for the results is present.

6.

In the Display drop-down menu, select Header Toolbars with Results to access the Header Toolbars.

7.

icon above the Amount Sold (000) column. In the Column Properties Click the Column Properties dialog box, click the Data Format tab, select the Override Default Data Format option, then select Use 1000's Separator option and click OK. This will display a comma separator in the number results for the column.

10

8.

In the Edit Column Format dialog box, click the Save button. If you have permissions as a Web administrator, you can save the data format as the system-wide default for the column you are working with, or for all columns with the same data type.

Since you don't want to set this format as the system-wide default, click in the dialog box to close the Save menu.

9.

Click OK and verify that a 1000's separator is displayed in the results for the Amount Sold (000) column.

To create a chart, perform the following steps: 1. Pick Chart in the View menu. By default charts are displayed as a Vertical Bar graph.

11

2. Select Line from the Graph drop-down menu and 2D from the Type drop-down menu.

3. Under the Legends icon in the column area of the left side of the Chart view, select Prod Category to create a separate line in the chart for each product category. Click the Redraw button at the bottom to confirm the change.

12

The column area of the chart view shows the columns that are included in the request. You can select the columns to display as the different axes in the chart. You can also indicate whether measure labels appear for factual data plotted on an axis. The available axes can change depending on the type of chart selected from the Graph drop-down list.

4.

icon. In the Left tab of the Axis Titles & Labels dialog box, select Click the Axis Titles and Labels Custom Title and change the custom title to Amount Sold. In the Bottom tab, change the custom title to Calendar Month.

13

5. Explore some of the other options in the Axis Titles & Labels dialog box. For example, you can toggle whether scale labels are displayed on the axes and set orientation guidelines for your labels. In addition, you can set overrides for the default data format on measures, similarly to the modification you made to the amount sold column in the steps above. Click OK. Your chart should look like this:

6.

icon. In the General dialog box, select Custom Title, enter Click the General Chart Properties Category Sales Last 12 Months as the chart title, and click OK.

14

7.

icon. In the Additional Charting Options dialog box, click the Click the Additional Charting Options Borders & Colors tab and set the background color to light gray. Click the color box for Background Color and, in the Color Selector dialog box, select light gray from the pallette and click OK.

8. In the Additional Charting Options dialog box, click the Grid Lines tab and set the major grid line color to white and the minor grid line color to light gray, using the same method as above. After you've set both colors, click OK to apply your changes.

15

Your chart should look like this:

9. Sort the legend by sorting the data. You want to sort by month in ascending order and then by sales in the last month in descending order: a. Click the Criteria tab and add the Measures > Sales Facts Current Month > Amount Sold (000) Current Month column to your query.

b. Click the Order By

button in the Calendar Month Desc column. The arrow points up to indicate

16

an ascending sort.

c. Click the Order By button in the Amount Sold (000) Current Month column twice. The arrow points down to indicate a descending sort, and the number 2 is displayed to indicate a secondary sort.

10. Click the Results tab to verify that your sort has been applied to the legend in your chart. The legend is sorted to match the order of the lines in the last month.

11. Select Compound Layout from the View drop-down menu.

17

12. Click the Add View link and select Chart to add the Chart view to the Compound Layout view.

13. Scroll to the bottom of the Compound Layout view and drag the Chart view above the Table view in the Compound Layout. A yellow line will appear when you have a valid insertion point.

18

14. Click the Delete View

icon in the Title view to delete it from the Compound Layout.

15. Click the Save Request icon. In the Choose Folder dialog box, click Shared Folders, then click the Create Folder button. In the Create Folder In Shared Folders dialog box, enter Learn and click OK.

16. In the Save Request dialog box, click the Learn folder. Enter Category Sales as the name and click OK.

19

Working with a Pivot Table


In this topic you create a pivot table to examine your results and add calculations and formatting. Create and set basic layout for a pivot table Add calculations and formatting to the pivot table

To create and set the basic layout for a pivot table, perform the following steps: 1. Pick Pivot Table in the View menu. This opens the Pivot Table Layout page.

2.

Examine the default pivot table that's created and displayed below the layout controls. Measure labels for the measures in your query appear in blue as columns in the pivot table. Row headings for the dimensional attributes in your query are displayed in grey as rows by default. The measures are displayed at the intersection of the rows and columns.

3.

Deselect the Display Results option. This option displays the results of any layout modifications you make as you work in the Pivot Table layout. To speed performance, you will only view your results periodically.

4.

Drag the Amount Sold (000) Current Month column from the Measures area to the Excluded area in your layout controls. When you see a blue line appear around the control, you have a valid insertion point and can drop the column.

20

5.

Drag the Calendar Month Desc column below the Measure Labels in the Columns area in your layout controls. When you see a blue line appear, you have a valid insertion point and can drop the column.

6.

Drag the Calendar Month Name column below the Calendar Month Description in the Columns area in your layout controls. Click the Disply Results link to verify your changes in the pivot table.

Your pivot table should look like this:

21

Deselect the Display Results link.

To add calculations and formatting to the pivot table, perform the following steps: 1. You need to add a measure to your pivot table to display the percentage of total monthly sales for each product category. Duplicate the Amount Sold measure. Click the More Options Sold (000) measure and select Duplicate Layer. icon in the Amount

2.

Click the More Options icon in the duplicated measure and select Format Headings.

3.

In the Edit Format dialog box, change the caption to % of Period and click OK.

22

Also note the other formatting options available in the dialog box.

4.

Click the More Options icon in the duplicated measure and select Show Data As > Percent of > Column.

This setting means that the measure will be displayed as a percentage of the column, which is Month. Note the other options that are available; you can present a measure as a percentage of the total amount for any dimension present in the pivot table layout, for example a row or a section. You can also set alternate aggregation rules for the measure using the Aggregation Rule option (the default is Sum).

5.

To total the values of the rows in each column, click the Total select After.

icon in the Rows layout control and

23

Note that you have formatting options available for the total row labels as well as values.

6.

To add totals for each column in each row, click the Total icon in the Columns layout control and select After.

7.

Click the click the More Options

icon in the Calendar Month Desc column and select Hidden.

8.

To show both measures together within each calendar month, drag Measure Labels under Calendar Month Name in the Columns layout control.

9.

Click the Display Results link. Your pivot table should look like this:

24

Note that there are section and page levels of the pivot table that we have not used in this example. Effective use of these would require additional attributes. Experiment, if you want, by temporarily dragging Prod Category to section and then page.

10. Save the request by clicking the Save Request

icon.

Creating a Narrative View


In this topic you build and format a business intelligence request using Oracle BI Answers, and create and format a Narrative View. The Narrative view allows you to add text to appear with the results to provide information such as context, explanatory text, or extended descriptions. Create a query Add a filter Create a Narrative view

To create a query, perform the following steps: 1. Click Answers to navigate to the Answers start page, and select the Sales History subject area by clicking the SH link in the Subject Areas list.

You want a query to detail what happened in the most recent month, pointing out all product categories

25

where sales are less than the previous month.

2.

In the left-hand selection pane of the Answers interface, expand the Products table and click the Prod Category column to add it to your query criteria.

3.

Add Measures > Month Ago Facts> % Chg Amount Sold MAgo to your query . Your query should look like this:

4.

Add a saved filter to the query to limit the data to the current calendar month. Under Filters in the left-hand selection pane, expand the SH folder and click the Current Calendar Month filter. Click OK.

This filter has been created and saved in a shared folder so that it can be used by other users. The filter uses a maximum month variable defined in the Oracle BI repository metadata to ensure that it is synchronized with the data.

To add a filter for the percent change in the amount sold, perform the following steps: 1. In the criteria pane, click the Filter button on the % Chg Amount Sold MAgo column to add a filter on that

26

column.

2.

In the Create/Edit Filter dialog box, select the is less than operator, and enter 0 as the value, then click OK.

The filter is added to the existing saved filter you used earlier. Your filters should look like this:

3.

Click the Display Results button to view the results of your query.

Your results should look like this:

27

To create a narrative view, perform the following steps: 1. Select Narrative from the View drop-down menu.

2.

In the Narrative view workspace, enter the following: @1 declined @2% this month compared with last month in the Narrative field.

The narrative is a combination of text and query column values. In this example, @1 refers to the first

28

column in the query, Prod Category, and @2 refers to the second column, % Chg Amount Sold MAgo. Note that you can control the number of row values returned in the Narrative view by setting the Rows to display value. By default, all queried rows are displayed.

3.

To highlight the column values in the narrative, select @1 in the narrative and click the Bold button. Also add bold tags to @2%.

Your results should look like this:

4.

Select No Results from the View drop-down menu. You need to create a No Results view to appear when there are no results for the query.

29

5.

In the No Results view workspace, enter No categories declined this month! as the headline. Enter All categories had positive sales results compared with the previous month as text.

Your results should look like this:

6.

Click the Save Request icon. In the Choose Folder dialog box,select the Learn folder and save the request as Narrative and No Results Views.

Creating Column Selectors and View Selectors


In this topic you build Column and View Selectors and experiment with their use in requests and dashboards. Column selectors allow users to select from a group of columns, substituting columns in their queries for comparitive analysis. View Selectors allow users to quickly navigate between different views of their queries, for example viewing different charts of the same data or quickly navigating to a pivot table to do trend analysis. Create a Column Selector Create a View Selector

30

To create a Column Selector, perform the following steps: 1. Click the Answers link and open the first query you saved. In the selection pane, click Shared Folders > Learn > Category Sales.

2.

Click the Modify button.

3.

Click the Results tab and select Column Selector from the View drop-down menu.

31

4.

Select the Include Selector option in Column 3, currently Prod Category.

5.

In the selection pane, click the following columns to make them available in the Column Selector: Customers.Country Region, Customers.Country, and Channels.Channel Desc.

Your Column Selector in the results pane should look like this:

32

6.

Select Compound Layout from the View drop-down menu.

7.

Click the Add View link and select Column Selector to add the Column Selector view to the Compound Layout view.

Notice that views that you have built for the active request appear in the View and Add View drop-down

33

menus with green circle icons next to them.

8.

Scroll to the bottom of the Compound Layout and drag the Column Selector view above both Table and Chart views.

9.

In the Column Selector, select Country.

10. Your Compound Layout view should look like this:

Note that the third column in the table now reflects values for the Country column, as does the chart. Switch the column back to Channel Desc. Save the request.

34

To create a View Selector, perform the following steps: 1. Duplicate the existing chart: a. Using the Views menu, navigate to the Chart view.

b. Click the Menu

icon and select Duplicate View.

You should now have a new view, Chart:2:

c. In the Type drop-down menu, select 3D.

35

2. Select View Selector from the View drop-down menu.

3. In the View Selector design workspace, select Chart, Chart:2, and Pivot Table in the Available Views field, using CTRL + Click to select multiple views.

Click the Move Right icon to add them to the Views Included field.

36

4. Select Chart in the Views Included field, click the Rename button, and, in the Rename dialog box, rename it 2D Chart. Click OK.

5. Rename Chart:2 as 3D Chart and Pivot Table as Trend Data. Use the Move buttons to arrange the views in the list as follows: 2D Chart, 3D Chart, Trend Data.

7. Use the View drop-down menu to navigate to the Compound Layout view. Delete the Chart view from the Compound Layout.

37

8. Add the View Selector view using the Add View button and drag it above the Table view.

9. Select Trend Data from the View Selector.

38

Your chart should now change to the Pivot Table view:

Creating an Interactive Dashboard


In this topic you build a new shared Interactive Dashboard and add content you've saved in previous steps. To create an Interactive Dashboard, perform the following steps: 1. Click the Settings link and select Administration.

2.

In the Oracle BI Presentation Services Administration window, click the Manage Interactive Dashboards link.

The Oracle BI Presentation Services Administration window offers access to many administrative features, including session monitoring and management of user and group privileges across the Oracle BI Presentation Catalog.

3.

In the Manage Dashboards window, click Create Dashboard.

39

4.

In the Create Dashboard window, set the Group Folder to CountryManagers, name the dashboard CountryManagers2, and click the Finished button .

The dashboard inherits the security of the group folder. Click Finished again to close the Manage Dashboards window. Finally, click Close Window to close the Oracle BI Presentation Services Administration screen.

5.

Click the Dashboards link and then click the CountryManagers2 Interactive Dashboard link to navigate to the new dashboard.

Your new dashboard is empty and should look like this:

40

6.

Click the Page Options button in the upper right corner and select Edit Dashboard to open the Dashboard Editor.

7.

In the Dashboard Editor, you can drag saved content from your Presentation Catalog directly into the dashboard. Sections are are automatically created in the layout to contain the requests and other objects you add to the dashboard. In the left-hand selection panel, expand the Learn folder you've saved your work in.

Drag the Category Sales request onto the layout workspace. The layout area is highlighted in blue to indicate that you have a valid insertion point for the object.

Your dashboard layout should look like this:

41

Notice that a section was automatically added to contain the request. You could also have dragged a Section object from the Dashboard Objects pallette to create the section before dragging content into the section. Sections and columns are containers you can use to control the layout of your dashboards.

8.

Drag the Narrative and No Results request into Section 1 of the dashboard layout, below the Category Sales request.

9.

In the Narrative and No Results object, select Properties > Show View > Narrative 1 to ensure that when the dashboard is presented, the request will be in the Narrative view.

You can select any other view; note that the list is limited to views which you've created or worked with for the request. The Compound Layout is the default view. The No Results view is always displayed if there are no results for the request at runtime.

42

10. Click Save to save your changes and display the dashboard.

Your dashboard should look like this:

Scroll to the bottom of the dashboard to verify that the narrative view appears correctly for the Narrative and No Results embedded request. It should look like this:

Note that the Column Selector only applies to the request that contains it. If you select a column in the control, it will only apply to the table and chart, not the narrative request in the same dashboard.

Using Dashboard Prompts and Presentation Variables

43

In this topic you build a dashboard prompt to filter your dashboard for a specific country region. Then you use a Presentation variable to dynamically update a request title in your dashboard that includes the filtered name of the country region. Dashboard prompts are used both to allow users to filter results of embedded requests in a dashboard as well as to populate and update Presentation variables, which are variables that can be defined in Oracle BI Answers. Create a dashboard prompt Use a presentation variable

To create a dashboard prompt that filters on Country Region, perform the following steps: 1. Click the Answers link. In the selection pane, click the New Dashboard Prompt down Subject Area menu, select SH. icon and, in the drop-

2. In the selection pane, click Customers.Country Region to add it to the prompt.

The prompt should look like this:

This prompt will filter the Country Region column in any requests which contain it in a dashboard with which it is associated. Note that you can control several aspects of the prompt. You can select the type of control users will use to enter their selections in the prompt, and you can determine what values will be presented in a drop-down list or multi-select control, limiting the available values either through SQL or by constraining the values based on the results of another dashboard prompt.

3. Leave the default selections for the prompt and select Dashboard from the Scope drop-down menu. This means the filter will be applied to all pages in any dashboard it is associated with.

44

4. Click the Save icon and save the prompt in the Learn folder as Prompt for Country Region.

You have created the prompt, but for it to take effect on any embedded requests in a dashboard, the requests must contain filters on the column being prompted.

5. Click the Open and click OK.

icon, and in the Open dialog box, select the Category Sales request in the Learn folder

45

6. In the selection pane, CTRL + click the Customers.Country Region column to add a filter on it. In the Create/Edit Filter dialog box, select is prompted as the operator for the filter and click OK.

Your filters should look like this:

46

7. Save the Category Sales Request and, using the same steps, add a filter to the Narrative and No Results Views request and save it. When complete, the filters on the request should look like this:

8. Click the Dashboards link and navigate to the CountryManagers2 dashboard, then click Page Options > Edit Dashboard to open the Dashboard Editor.

9. From the left-hand selection panel, expand the Learn folder and drag Prompt for Country Region above the Category Sales request in Section 1 of the dashboard. The area will be highlighted in blue when you have found a valid insertion point.

Your dashboard should look like this:

47

10. Click Save.

Your dashboard should look like this:

11. Add a Filter view to the Category Sales request to verify that the dashboard prompt is filtering the data on the dashboard correctly. a. Open the dashboard in the Dashboard Editor. In the dashboard, click the Properties button for the Category Sales request and select Modify Request.

48

b. Click the Results tab and select Filters in the View menu.

Your results should look like this:

c. Using the View menu, navigate to the Compound Layout. Click the Add View link and select Filters.

49

d. Drag the Filters view to the top of the Compound Layout and save the request.

e. Navigate back to the CountryManagers2 dashboard, select Americas in the Country Region dashboard prompt, and click Go.

f. Verify that the dashboard prompt has added a filter to the requests on the dashboard for Country Region is equal to Americas.

50

To use a Presentation variable to populate a title with the name of the selected country region, perform the following steps: 1. Navigate to Answers, open the Category Sales request, and click the Modify button.

51

2. Click the Compound Layout View button, add a Title view to the Compound Layout view using the Add View link, and drag the new Title view to the top of the layout.

Your Compound Layout should look like this:

3. Click the Edit View

icon for the Title view.

4. In the Title field, enter Category Sales Last 12 Months for @{CountryRegion}. This is a reference to the Presentation variable you are going to create. Click OK.

52

The syntax for calling a Presentation variable, whether in a column or a Title view, is @{VariableName}. Your results should look like this, as the variable has not been defined or populated yet:

Click OK to save your changes and return to the Compound Layout view. Add the Title view in the Compound Layout, if not already present.

5. Create the variable by designating that it be populated by the Prompt for Country Region. Click the Open icon and open the Prompt for Country Region.

6. In the Set Variable field of the prompt, select Presentation.

Note that you could also reference a Request Variable. Request Variables are definedas SessionVariables in the Oracle BI metadata and are instantiated when the user's session begins. Their values for any request can be updated by dashboard prompts.

53

7. In the Set Variable text field, enter CountryRegion.

By entering the name of the variable here, you are creating the variable as well as setting it to be populated by the user selection in the Prompt for Country Region. 8. Save the dashboard prompt.

9. Click the Dashboards link to navigate to the CountryManagers2 dashboard and verify that the Title view appears and that the CountryRegion Presentation variable is not yet populated.

10. Select Asia in the Country Region prompt and click Go.

11. Verify that the Prompt for Country Region dashboard prompt is filtering the dashboard and updating the CountryRegion Presentation variable.

Summary
In this lesson, you learned how to: Create and work with different views, including charts, pivot tables, and narratives Use selector views to add interactivity and navigability to requests Build, lay out, and work with Interactive Dashboards Use dashboard prompts to filter dashboard data and populate Presentation variables

54

Related Information
To learn more about Oracle Business Intelligence, you can refer to: Additional OBEs on the OTN Web site.

55

ORACLE BUSINESS INTELLIGENCE WORKSHOP


Integration of Oracle BI Publisher with Oracle Business Intelligence Enterprise Edition

Purpose This tutorial mainly covers how Oracle BI Publisher is integrated with Oracle Business Intelligence Enterprise Edition (Oracle BI EE) 10.1.3.2, and how this integration enables you to create highly formatted reports in Oracle BI Publisher by using Oracle BI Answers and Oracle BI Server metadata. Time to Complete: Approximately 1 hour Topics This tutorial covers the following topics: Overview Scenario Prerequisites Creating a BI Answers Request that uses a Dashboard Prompt Logging In to Oracle BI Presentation Services Opening and Modifying a BI Answers Request Creating a BI Publisher Report based on the BI Answers Request and Viewing Data Connecting to BI Publisher from MS Word to Save the Answers Request as BI Publisher Report Creating a Layout For the BI Publisher Report with Charts and Table Publishing a Template for the BI Publisher Report Publishing the BI Publisher Report on BI Interactive Dashboards

Creating a BI Publisher Report Based on BI Server Subject Area and Viewing Data Creating a BI Publisher Report from the BI Server Subject Area Creating an RTF Template in MS Word by Logging In to BI Publisher Publishing the Template to View the Report Data in BI Publisher Creating a Report with Parameters and List of Values Summary Related information

Overview
About Oracle Business Intelligence Enterprise Edition: Oracle Business Intelligence Suite Enterprise Edition (Oracle BI EE) offers an integrated, comprehensive, standards-based BI platform that provides the best foundation for building enterprise wide BI solutions. It leverages the Oracle's existing
data warehousing and business intelligence tools, with a new stack of products listed here.

Oracle Business Intelligence Enterprise Edition specifically consists of:


Oracle BI Server: Centralized data access and calculation via a logical Common Enterprise Information Model through to the end-user products and other SQL-based tools Oracle BI Interactive Dashboards: Personalized, highly intuitive, guided and fully interactive access to cockpits of live analyses Oracle BI Answers: Self-service ad hoc capabilities allowing end users to easily create charts, pivot tables, reports, and visually appealing dashboards, all of which are fully interactive and drillable Oracle BI Delivers: Proactive intelligence solution providing alerts that can reach users via multiple channels (e-mail, dashboards, and mobile devices), as well as workflow integration Oracle BI Disconnected Analytics: Full business intelligence functionality for the mobile professional, enabling fully interactive dashboards and ad hoc analysis while disconnected from the corporate network Oracle BI Publisher: High-fidelity report templates that are created and published via common personal productivity applications delivered directly or through Interactive Dashboards to end users

In this tutorial, you start by opening an existing BI Answers request and modify that to add more fields. You connect to BI Publisher from MS Word and save the BI Answers request that you created as a BI Publisher report. You will open a simple RTF file and create a layout for the report with charts and table using the wizards in MS Word. You will publish this template for the BI Publisher report, and also, you will publish a BI Publisher report on a BI Dashboard. You will also be guided to create a BI Publisher report based on from BI Server subject area and view the data.

Scenario This OBE uses the sales history metadata repository SH.rpd, based on the Sales History (SH) sample schema of Oracle Database. To continue with the steps listed in the topics, you should have installed the required software, and set up the SH.rpd metadata repository, as mentioned in the topic titled "Prerequisites."

Prerequisites
Before starting this tutorial, you should: 1. Have access to or installed Oracle Database 10g (preferably version 10.2 ) This is pre-installed on the BIC2G:EE 10.1.3.2 VMWare image (Linux Edition v1.0) 2. Have access to or have installed the SH sample schema. This is pre-installed on the BIC2G for Linux 3. Have access to or have installed Oracle BI EE 10.1.3.2 including Oracle BI Publisher and Oracle BI Publisher Desktop 10.1.3.2. This is pre-installed on the BIC2G for Linux 4. Have created an ODBC connection to the Oracle database, and set up the SH.rpd metadata repository, following the steps listed in the OBE Creating a Repository Using the Oracle Business Intelligence Administration Tool. Also, it is strongly recommended that you go through the tutorial "Creating Interactive

Dashboards and Using Oracle Business Intelligence Answers". to understand the steps involved in creating an Answers request, creating a dashboard page, and so on. The rpd and webcats created by these OBEs are available on the BIC2G Linux image in case you havent completed these tutorials for any reason. You need to ensure the BIC2G server is set to use this metadata 1. Go to http://oracle2go.us.oracle.com/go/process_control/pc.html, select sh.rpd and sh web catalog and click

2. Wait until the Log entries show: and service state as follows:

4b If using BIC2G pre-installed SH.rpd you can skip this step as the Administrator password is correct. If you created the SH.rpd with an Administrator password that is not Administrator or you are uncertain, then follow these steps to update:

1. Select Control Panel > Administrative Tools > Data Sources (ODBC) 2. Select the tab System DSN and configure the Oracle BI Server connection AnalyticsWeb created when configuring the local client software. (Server = oracle2go)

3. Click again.

and enter the Administrator password that was previously

set.(could be blank in which case do not enter anything). Click 4. Check the 2nd box and insert the desired new password as Administrator (without the quotes).

5. Click Finish and confirm the new password. Your Oracle BI Server Administrator password is now the same as BI Publishers Administrator for single-sign-on.

5 The BI Publisher integration with Presentation Services is not set up correctly for the SH rpd initially. You need to set up this integration from BI Publisher as follows: 1. Go to http://oracle2go.us.oracle.com:9704/xmlpserver 2. Sign in as admin / admin 3. From the Admin tab, under Integration, select Oracle BI Presentation Services. 4. Change the Administrator password to Administrator (without quotes). Ensure the other settings are as follows: Server Protocol: http Server Version: v4 Server: oracle2go.us.oracle.com Port: 9704 URL Suffix: analytics/saw.dll.

5. Click 6. Go to Admin > Security Configuration 7. Change the Administrator password under Security Model to Administrator (without quotes). Ensure that the Security model remains driven by the Oracle BI Server.

8. Click 9. Go to the process control page and click Stop All

10. Wait until Oracle BI Server flag is red and the following line is shown in the log:

11. Click Start All 12. Wait until Oracle BI OC4J Flag is green and the following line is shown in the log:

6. Have installed BI Publisher Desktop by clicking the Template Builder link in BI Publisher:

When you install BI Publisher Desktop, it adds the BI Publisher menu in MS Word. 7. Have downloaded the Category Sales and Profits.rtf template file provided with this OBE from here . Note: All the steps 1-7 listed above in the prerequisites are mandatory. Without performing this setup, you will not be able to proceed with the steps listed in the topics below. 8. In addition to the above prerequisites, it is suggested that the learner go through the OBE "Creating a Repository using Oracle Business Intelligence Administration Tool " 9 To ensure much of the standard BI Publisher demo content works correctly, it is also recommended to set up the Demo data source as follows, although it is not mandatory for the steps in this tutorial.

1. Go to Admin > Data Sources > JDBC Connection 2. Click on the demo data source name 3. Change the Connection String from jdbc:oracle:thin:@HOST:PORT:SID

to jdbc:oracle:thin:@oracle2go:1521:ORCL

4. Click on (without the quotes).

to ensure that the connection is established

correctly. If not, ensure that username and password are both set to oe 5. Test the connection for real by running the report: Shared Folders > Executive > Sales Dashboard.

Note that the report Advanced Sales Dashboard in the same folder may not work due to other RSS data sources to which the Linux server may not have access without further network configuration.

Modifying a Pre-Created Request in Oracle BI Answers


In this topic, you will connect to Oracle BI Presentation Services, open a precreated BI Answers request, modify it as appropriate, and save it. Follow the steps listed in each of the subtopics below: Logging In to Oracle BI Presentation Services Opening and Modifying a BI Answers Request

Logging In to Oracle BI Presentation Services: The interactive Web analytics components of Oracle BI EE, such as Oracle BI Interactive Dashboards, Oracle BI Answers, Oracle BI Delivers, Oracle BI Publisher, and Oracle BI Disconnected Analytics are collectively known as Oracle BI Presentation Services. These components make it easy for users to gain complete and timely business insight and enable them to drive effective actions and processes. Logging in to Presentation Services provides you access to all these components. To log in, perform the following steps: 1. Select All Programs > Oracle Business Intelligence > Presentation Services from the Start menu (in Windows).

10

2. The Log In screen for Presentation Services appears. Enter Administrator as the User ID and Password, and click Log In.

3. The BI Interactive Dashboards page appears showing the sample dashboard created using the sales history reports. Click the Answers link to go to the BI Answers page.

11

Opening and Modifying a BI Answers Request In BI Answers, you can create a request from one of the subject areas listed on the BI Answers page, or create a request (SQL query) directed to the database. You can also open an existing request saved in folders. In this topic, you will open a pre-created request from the shared folder, and modify it to add more measures or fields. 1. On the BI Answers page, observe the highlighted options in the screenshot below. Click the SH folder in the Shared Folders section (displayed to the left) on the Catalog tabbed page.

12

2. This displays all the pre-created requests in the SH folder. Click the Category Sales for last 12 months link from the list of requests (displayed on the right).

13

3. You can see that the request is shown on the BI Answers page, which displays the chart. Click Modify to modify this request.

4. The request is displayed in the Edit mode, showing the Criteria tabbed page. To add more fields to the request, expand the nodes SH> Measures> Sales Facts and click Gross Profit to add this filed to the request.

Similarly, also add the Amount Sold field to the request. (These measures that

14

you have added should be reflected in the Criteria tab as shown in the screen below):

5. Click the Save Request

icon (found on the top-right corner of the page) to

save the changes you have made to the request. Enter the name of the request as "Category Sales and Profits for last 12 months" and click OK.

15

Creating a BI Publisher Report Based on Oracle BI Answers Request and Viewing Data In this topic, you connect to BI Publisher from MS Word and save the BI Answers request that you have modified in the previous topic as a BI Publisher report. You will also open a simple RTF file, and add graphs and table in the report template. You will also publish this template and view the data in the report. Connecting to BI Publisher from MS Word to Save the Answers Request as BI Publisher Report Creating a Layout For the BI Publisher Report with Charts and Table Publishing a Template for the BI Publisher Report

Connecting to BI Publisher from MS Word to Save the Answers Request as BI Publisher Report To create a BI Publisher report from the BI Answers request Category Sales and Profits for last 12 Months, perform the following steps: 1. Start the MS Word application from the program menu. Open the Category Sales and Profits.rtf file (which is provided with this OBE). This is a simple rtf file with a header, footer, and a title as shown below: (Observe that the Oracle BI Publisher menu displayed in MS Word)

16

From the Oracle BI Publisher menu, select Log On.

Note: The Oracle BI Publisher menu is displayed in MS Word only when you have successfully installed the Oracle BI Publisher Desktop as mentioned in the step 6 of the Prerequisites section. Also, observe the BI Publisher tool bar in MS Word, with the Data, Insert, Preview , Tools, and Help menus. Observe the various options in these menus.

2. In the Login screen that appears, enter Administrator as the Username and Password, and click Login. The first time when you connect, you will need to enter the report server URL. Enter the following URL:

17

http://oracle2go.us.oracle.com:9704/xmlpserver

3. This displays the Open Template window. Select Oracle BI from the Workspace drop-down list.

Navigate to the shared>sh folder, and double click the Category Sales and Profits for last 12 Months BI Answers request that you modified and saved earlier.

18

4. This displays the Save As Oracle BI Publisher Report window. Navigate to the folder in which you want to save the report, and click Save. (Here the report is saved in MyFolders>Learn folder. You will then return to the rtf file in MS Word.)

Hint: You can create a folder in BI Publisher (Web UI) by clicking the Create a New Folder link from the Folder and Report Tasks section.

Do not close the rtf file that is open in MS Word or do not log off from BI

19

Publisher to continue with the next topic.

Creating a Layout with Charts and a Table For the BI Publisher Report You have saved the Answers request as the BI Publisher Report in the previous topic. In this topic you will create a template for the report by adding a bar chart, a pie chart, and then a table to display the data. (Use the hints given in the Category Sales and Profits.rtf file to insert the charts and the table in appropriate places). Follow the steps listed below to create a template for the report: 1. In MS Word select Insert > Chart. (First, you will add a bar chart.)

Note: When you save the Answer request as BI Publisher Report, its loads the XML data definitions into the RTF template file so that you can define the layout for the report data.

2. In the Chart window that appears, define the graph characteristics by following the instructions listed below carefully: 1. Drag: Sales Facts. Gross Profit to the Values field Products. Prod Category to the Labels field (These are highlighted in the screenshot below.)

20

2. Ensure that Bar - Graph Vertical is selected as the graph Type, and select April from the Style drop-down list. 3. Type Profits by Category as the Title. 4. Click Preview to preview how the graph looks like, and click OK.

Resize the chart image in MS-Word to fit in the rtf file better. The bar graph in the template file looks like this:

21

3. Similarly, insert another Pie chart for showing the sales percentages by category. Follow the instructions listed steps below : 1. Drag: Sales Facts. Amount Sold to the Values field Products. Prod Category to the Labels field (These are highlighted in the screenshot below.) 2. Select Pie Chart as the graph Type, and April as the Style. 3. Type Sales by Category as the Title. 4. Click Preview to preview how the graph looks like, and click OK.

Resize the chart image in MS-Word to fit in the rtf file better. The pie chart in the template file looks like this: (Observe both the graphs):

22

4. Now select Insert > Table Wizard to define a format for the table data in the report.

5. This displays the Table Wizard. Select Table, and click Next.

23

6. Ensure that ROWSET/ROW is selected as the Grouping Field, and click Next.

7. Select Calendar. Calendar Month Desc, Calendar. Calendar Month Name, Products. Prod Category, Sales Facts. Amount Sold, and Sales Facts. Gross Profit from the list on the left, and add them to the list on the right. Click Next. See the screen given below:

24

8. Select Calendar. Calendar Month Desc from the Group By drop-down list, select Calendar. Calendar Month Name from the Then By drop-down list to group the data by calendar month. Accept the defaults for other options, and click Next.

9. In this step you can select the sort orders for various fields. Select Products. Prod Category from the Sort By drop-down list, accept the defaults for other options, and then click Next.

25

10. Edit the labels of the fields Products. Prod Category as Product Category, Sales Facts. Amount Sold as Sales Revenue, Sales Facts. Gross Profit as Profit. Then click Finish to complete the creation of the table template.

The template file with the table you created looks like this:

26

Important Note: The BI Publisher Desktop Template Builder has just created a table for you. Notice the words and letters with the gray background. These are called form fields. Form fields are Word objects that allow you to reference other data (for example, a mail merge letter). BI Publisher uses form fields in two ways:

First is to reference data fields from the report definition (like YEAR and MONTH). The second use is to embed instructions that control how the data fields will be laid out (like G, F, and E).

If you are curious to know what these instructions are, double-click the form field and view the Help text. It is important to treat these form fields carefully and not accidentally delete or move them. Doing so will change the layout of the table in your report. Also, you can add or modify your own form fields with XSL commands to do more sophisticated things with the table layout. 11. Now, you can additionally use the formatting features in MS Word on this template, such as changing the background and text colors, styles, adding an auto layout for the table, aligning the number fields to the right, and so on. Perform the following steps in MS Word:

27

1. Select the Sales Revenue and Profit columns in the table and click the Align Right icon in MS Word to align these fields to the right. 2. Select the Calendar. Calendar Month Desc, and Calendar. Calendar Month Name headers (grouping fields) and apply the text color of dark brown (or any other appropriate color of your choice), make it bold, and also apply the Arial font in 12 pt. 3. Also, in the table, make all the column headers dark blue in color and style them in bold. Make sure that the font is Arial 10 pt. The table looks like this after the above format changes:

Note: You can also use the Auto Format feature in MS Word to define a format for the table. To do this, select the table that you have added, and select Table > Table Auto Format menu option in MS Word. Select an auto format for the table from the list of available formats.

28

12. Also, to add an appropriate number format to the Sales Revenue field, doubleclick the _Sales_Facts.Amount_Sold_ field (highlighted in the screenshot) below the column header Sales Revenue.

13. This displays the Text Form Field Options for editing the formats. Select Number from the Type drop-down list.

Enter the Default Number as 99,999,999.99, and select the format that has a $ in the beginning as shown, and click OK.

Similarly, add an appropriate number format to the Profit column too.

29

Now the table looks like this:

14. You can also add a form field to calculate the profit totals per month. Note: Add this total below the table, with an appropriate label such as Total Profit for the month of < Month name> is : <Profit Total>. Also align this entire label to the right so that it appears below the Profit column of the table. Click Insert> Field. (To insert the total in the place of the Profit Total in the above label)

15. In the Field window that appears, define the characteristics by following the instructions listed below carefully: 1. Click Sales Facts. Gross Profit, and select Sum from the Calculation dropdown list to add a total on this field. 2. Select On Grouping option to add the total by category. (All these are highlighted in the screenshot below.) 3. Click Insert to insert this total in the template. Click Close.

30

As this is also a number field, add an appropriate number format to it:

16. Also add another field in place of <Month name> in the label: 1. Click Insert> Field. 2. Click Calendar. Calendar Month Name. 3. Select the On Grouping option.

31

4. Click Insert to insert this field. Click Close.

Now the table along with the fields added looks like this:

Add appropriate colors to the Month name and Profit total fields (also add new lines where appropriate) so that the table looks like as shown below:

32

Save the rtf file in MS Word. You can add your initials to the file when saving. 17. You can also preview how the data in the report looks like. In MS Word, select Oracle BI Publisher> Preview Template> PDF to preview the data in PDF format.

The charts and the data are shown in the screens below:

33

Note: The header, footer, and other format changes you have defined in the template are reflected. You can also view the data in other formats such as HTML, RTF, and so on. Also, do not close the MS Word application or log out from BI Publisher to continue with the next topic.

Publishing the Template for a BI Publisher Report In the previous topic, you created a template for the BI Publisher report. In this topic, you publish the template created to view the report data in BI Publisher. You can directly publish a template from MS Word to BI Publisher for a report, provided:

You are connected to BI publisher from MS Word The BI Publisher report is opened in MS Word The template is saved in RTF format

Perform the following steps to publish the template created from MS Word, and then view data for the report in BI Publisher using this template: (Note that the template you have created satisfies all the above criteria.) 1. In MS Word, select the Oracle BI Publisher > Publish Template As option.

34

Note: If you have not saved the template in RTF format, it may prompt you to save the template in RTF format first before publishing.

2. The Upload as new dialog box appears. Enter Template1 as the template name, and click OK.

After the template is uploaded, it displays the following message. Click OK again.

35

Note: You can also view the data in the BI Publisher report using the template published, by connecting to BI Publisher (Web) as the Administrator. (Select All Programs > Oracle Business Intelligence > BI Publisher from the Start menu)

Navigate to My Folders > Learn, and click the View link below the Category Sales and Profits for last 12 Months report to view the data.

The report is displayed using the template you have created.

Publishing the BI Publisher Report on BI Interactive Dashboards

36

In this topic, you create a BI Dashboard page, and publish the BI Publisher report that you created from the BI Answers request on BI Interactive Dashboard. Perform the following steps: 1. Log in to Oracle BI Presentation Services as Administrator (password Administrator). (Hint: Refer to the first topic for logging in to Presentation Services.) When you log in to Presentation Services, the BI Dashboards page is opened displaying the sample dashboard created with the sales trends as shown below:

From the Page Options drop-down list (at the top-right corner of the page), select Edit Dashboard.

37

2. The Dashboard Editor page is displayed. Click the Add Dashboard Page to add a page to the dashboard.

icon

This displays the Add Dashboard Page screen. Enter My BI Publisher Page as the Page Name, and optionally enter a suitable description. Click OK.

3. Drag BI Publisher Report from the Dashboard Objects list to the section on the My BI Publisher Page as shown below:

38

You can see that the BI Publisher Report object is added to the dashboard, click the Properties link on this object (highlighted in the screenshot).

4. The BI Publisher Report Properties screen is displayed. Click Browse to browse and specify the path for BI Publisher Report.

39

5. Select the Category Sales and Profits for last 12 Months report that you created earlier, from the path My Folders > Learn and click OK.

6. This brings you back to the BI Publisher Report Properties screen. In the Display Mode section of the report properties, select View the Latest

40

Version option, accept defaults for other options, and then click OK.

7. This will take you back to the Dashboard Editor page, click Save to save the changes you made to the dashboard.

Note that the dashboard now has the additional page that you created. 8. Click My BI Publisher Page tab to view the report that you published on this page:

41

Scroll down to see the graphs and the entire report data in PDF format:

42

Creating a BI Publisher Report Using BI Server Subject Area and Viewing Data In this topic, you will create a BI Publisher report from the BI Server Subject Area (Metadata). You will also create an RTF template in MS Word, and associate it with the report to view the data in BI Publisher. Creating a BI Publisher Report from the BI Server Subject Area Creating an RTF Template in MS Word by Logging In to BI Publisher Publishing the Template to View the Report Data in BI Publisher Creating a BI Publisher Report from BI Server Subject Area

43

1. Log in (if not logged in) to BI Publisher (Web) as Administrator (password Administrator). Note: You can log in to BI Publisher by logging in to Presentation Services and selecting More Products > BI Publisher option, or you can also log in to BI Publisher directly from: All Programs > Oracle Business Intelligence > BI Publisher option from the Start menu.

The BI Publisher Welcome page is displayed:

2. Navigate to My Folders > Learn, and click Create a new report. Enter From BI Server as the name of the report, and click Create.

44

3. The newly created report is displayed in the BI Publisher. Click the Edit link displayed below the report name to edit the properties.

45

4. The report is displayed in edit mode. Click Data Model and click New to define the data source for this report.

5. On the Data Set page that appears, select SQL Query from the Type dropdown list.

6. On the Data Set page, select Cache Result. Ensure that Oracle BI EE is

46

selected as the Data Source. (Observe the highlighted options in the screenshot.) Click Query Builder to create an SQL Query.

7. The Query Builder is opened displaying the SH subject area (metadata repository) objects displayed on the left. Drag the Channels, Products, and Sales Facts SH schema objects one by one to the Model canvas on the right. Hint: Take the help of the screens below:

47

Drag Channels to the Model canvas.

Similarly, drag Products and Sales Facts tables to the Model canvas.

48

8. Select the following columns to be displayed in the query from the Model objects (by selecting the check boxes beside the column names): -Select Channel Desc from Channels. -Select Prod Category and Prod Name from Products. -Select Amount Sold from Sales Facts. After the column selection, the Query Builder screen should look like this:

49

9. Click the Conditions link. In the Conditions screen, you can define the Aliases, Sorts, Group By fields, Conditions, and so on. Observe the options, and accept the defaults.

10. Click the Results link to see if the query results are displayed correctly without any error, and click Save to save the query.

50

11. This will take you back to the BI Publisher Data Set page. Observe that the query is displayed in the SQL Query field. Click the Save report. icon to save the

Note: A simple SQL query is created here, but you can create more complex queries by defining Sorts, Aliases, Conditions, Group By fields, and so on in the Conditions screen of the Query Builder. Also, you can view the data after creating and publishing the template for this report. Now you can view only XML data for the report. (Click View to go to the View mode and click View again, if you want to view the XML data for the

51

report).

Creating an RTF Template in MS Word by Logging In to BI Publisher 1. Start the MS Word application from the program menu. From the Oracle BI Publisher menu, select Log On.

Enter Administrator as the username and password and click Login.

52

2. The Open Template window is displayed. Navigate and select the BI Publisher report that you have created from BI Server metadata from the path: My Folders > Learn > From BI Server, and click Open Report. (This will load the data from the query.)

3. In the Word document, select Insert > Chart to define a graph format for the SQL query data.

53

4. This opens the Chart window. Define the graph characteristics by following the instructions listed below carefully: 1. Drag: Amount Sold to the Values field Prod Category to the Labels field Channel Desc to the Series field (See the highlighted options in the screenshot below.) 2. Ensure that Bar Graph - Vertical is selected as the graph Type, and select Autumn from the Style drop-down list. 3. Enter Product Sales Revenues by Channel in the Title field. 4. Click Preview to preview how the graph looks like. 5. Click OK.

54

5. The graph you defined for the SQL query data is displayed in the Word document as shown: (Observe the graph title that is displayed).

55

6. You can also add a table to represent the SQL query data. Select Insert > Table Wizard. In Table Wizard, select Table, and then click Next.

7. Ensure that ROWSET/ROW is selected as the Grouping Field, and click Next.

56

8. Click below.)

to include all the available fields in the table. (See the screenshot

Click Next.

9. Select Channel Desc from the Group By drop-down list; ensure that the Group above option is selected for this field. Select Prod Category from the Then By drop-down list, and select the Group left option for this field. Click Next. (Observe the highlighted options in the screenshot.)

57

10. Select Amount Sold from the Sort By drop-down list, select the Descending and Number options, and then click Next.

11. Edit the labels for the fields: Change Prod Name to Product Name and Amount Sold to Sales Revenue. Click Finish.

58

The template that you have defined looks like this along with the table:

12. Make the appropriate format changes in MS Word to the table in the template: Guidelines to make changes: - Change the text colors to look similar to the colors used in the graph. - Change column widths of the table as appropriate.

59

- Change Amount Sold field to a number field which is displayed in dollars ($). The table in the template looks like the following: (See the table highlighted in the screenshot.)

13. Save the template in RTF format as ProductSalesbyChannel_Templ.rtf.

14. You can also preview how the template looks like with the data in MS Word by selecting

60

Oracle BI Publisher > Preview Template, and then selecting a format such as PDF to view the data. This helps you to preview, and make any further changes to the template before it is published.

The PDF output in preview looks like this:

61

Publishing the Template to View the Report Data in BI Publisher Perform the following steps to publish the template created from MS Word for the BI Publisher report created from BI Server subject area, and then view data for the report in BI Publisher using this template: 1. In MS Word, select the Oracle BI Publisher > Publish Template As option.

62

Note: If you have not saved the template in RTF format, it may prompt you to save the template in RTF format first before publishing.

2. The Upload as new dialog box appears. Enter Template1 as the template name, and click OK.

After the template is uploaded, it displays the following message. Click OK again.

63

3. ( If not already connected) Now connect to BI Publisher as Administrator. (Select All Programs > Oracle Business Intelligence > BI Publisher from the Start menu). Open the From BI Server report from My Folders > Learn. Note that the report is displayed using the template that you have created and published as shown in the following screenshot:

Scroll down to see the table data (a portion of the data is shown below):

64

You can also view the data in other formats such as PDF, RTF, MS Excel, and so on. Note: If you have time , and want to try more hands-on with BI Publisher, continue with the next topic of creating a report with parameters and list of values.

Creating a Report with Parameters and List of Values In this topic, you will create a report with parameters and list of values using the From BI Server report you created in the previous topic. Follow the steps listed below to create a report with parameters and list of values: 1. (If not logged in) Log in to BI publisher as Administrator, and navigate to My Folders> Learn. Click the report icon beside the From BI Server report.

65

2. This displays additional report actions in the Report and Folder Tasks. Click Copy Report and then click Paste from Clipboard to paste it in the same folder. (See the screens below):

66

Rename this copied report as From BI Server with Parameters and LOVs.

Note: You can directly modify the From BI Server report to add parameters and LOVs too. 3. Now click the Edit link below the report to open the report in the Edit mode.

Click New Data Set1 found under the Data Model node in the Report pane on the left to edit the SQL Query for the report. (Observe the screen below):

67

4. This displays the SQL Query for the report on the right. Edit the query to add a bind variable chname in the query as below: (observe the last line) select Channels."Channel Desc" as "Channel Desc", Products."Prod Category" as "Prod Category", Products."Prod Name" as "Prod Name", "Sales Facts"."Amount Sold" as "Amount Sold" from SH."Sales Facts" "Sales Facts", SH.Products Products, SH.Channels Channels where Channels."Channel Desc" = :chname Click Save to save the query.

68

5. Now click the Parameters node in the Report pane on the left and click New to create a parameter.

6. This displays the Parameter screen on the right; define the following: Enter chname as the name of the parameter, and select String as the Data Type. Enter Internet in the Default Value field, and select Text as the Parameter Type.

69

Also, type Enter a Channel Name: as the Display Label. (See the screen below). Click Save to save the changes to the report.

7. Click View to view the report data using the existingTemplate1 in html format . Note that the report data and graph are displayed with the default parameter value, that is for the Internet sales channel.

70

8. You can enter the names of other channels to see the data. For example, in the parameter field enter Partners as the channel name and click View again to see the data and graph for this channel:

71

9. Now click Edit to edit the report and define a List of Values to be used with this parameter chname. In the Report pane displayed on the left, click List of Values and click New to

72

create a new list of values.

10. In the List of Values screen that appears on the right, ensure that Oracle BI EE is selected as the Data Source, and click Query Builder to define a query for defining a list of values.

11. In the Query Builder screen that displays the SH subject area on the left, click Channels to add it to the Model canvas on the right, and select Channel Desc

73

column (by selecting the check box beside it). Click Save.

This takes you back to the List of Values screen again which displays the query. Click Save to save the changes to report:

12. Now click chname found under the Parameters node in the Report pane on the left to edit it and associate it with the List of Values that you have created:

74

13. In the Parameter screen that appears on the right, now select Menu as the Parameter Type.

In the Menu Setting section that appears below the General Settings section, enter Select a Channel Name: in the Display Label field, and ensure that the New List of Values 1 (that you created) is selected from the List of Values dropdown list. Also, select Can Select All option to be able to see the data for all the departments. Click Save to save the report.

75

14. Now click View to view the report using Template1 in HTML format. Observe that the chname parameter is now displayed using the list of values for the channels that you have defined:

Note: You can select any of the channels from the drop-down list to view the data for that channel or select All to view the data for all channels.

76

Summary In this tutorial, you learned how to: Create a BI Publisher report from BI Answers request Create a BI Publisher report from BI Server Subject Area Create RTF templates in MS Word by logging in to BI Publisher Publish the templates for a BI Publisher report View data in BI Publisher reports using the templates in various formats supported Create a report with parameters and list of values

Related Information To learn more about Oracle Business Intelligence, you can refer to: Additional OBEs on BI EE on the OTN Web site. Additional OBEs on BI Publisher on OTN Web site Coming soon.

77

ORACLE BUSINESS INTELLIGENCE WORKSHOP


Sending Alerts Using Oracle Business Intelligence Delivers

Purpose In this tutorial, you learn how to create alerts in a dashboard on the BIC2G:EE 10.1.3.2 VMWare image (Linux Edition v1.0). Time to Complete: Approximately 1 hour.

Topics This tutorial covers the following topics: Page

Overview........................................................................................................ 2
Scenario.............................................................................................................................. 2

Prerequisites.................................................................................................. 3
Hardware and Software Requirements .............................................................................. 3 Reference Material ............................................................................................................. 4

Configuring Scheduler Tables ....................................................................... 4 Configuring Scheduler ................................................................................... 6 Creating and Delivering an iBot ................................................................... 10
Creating a Request and Adding it to Your Interactive Dashboard ................................... 11 Creating and Delivering a Simple iBot.............................................................................. 25 Creating and Delivering a Conditional iBot....................................................................... 39 Chaining an iBot ............................................................................................................... 46

Overview
Oracle Business Intelligence Delivers (Delivers) is the interface used to create alerts based on Oracle Business Intelligence Answers (Answers) results. Answers is an extremely powerful, ad hoc data query tool that enables you to perform multidimensional analysis in a pure Web architecture.You can use Delivers to detect specific results and notify the appropriate person or group through Web, wireless, mobile, and other voice communication channels. Delivers works in tandem with Oracle Business Intelligence Scheduler (Scheduler). iBots deliver reports and alerts to end users. iBots are configured and submitted for execution using Delivers. Scheduler is an extensible application and server that manages and schedules jobs. Oracle BI Scheduler supports two kinds of jobs: Scripted Jobs: Scripted jobs are set up and submitted, using the Job Manager feature of the Oracle Business Intelligence Server Administration Tool. For example, a scripted job can periodically load Oracle BI Server usage statistics into a back-end database. For scripted jobs, Oracle BI Scheduler communicates with Oracle BI Server. Unscripted Jobs: Unscripted jobs are called iBots. iBots deliver reports and alerts to end users. iBots are configured and submitted for execution, using Oracle Business Intelligence Delivers. Oracle BI Scheduler communicates with Oracle Business Intelligence Presentation Services for unscripted jobs and must be installed and configured to deliver iBots. This tutorial covers how to use Delivers and Scheduler to create iBots based on Answers results and build alerts that can be sent to user's dashboards or other delivery devices. You learn how to configure delivery devices, add delivery profiles, add alerts, create iBots, and configure Scheduler.

Scenario The dashboard you build in this tutorial charts sales for the last 12 months by channel, country region, and product category and provides trend analysis data

as well as narrative highlights of categories that have declined in sales in the last month.

Prerequisites
This tutorial is only for the Windows environment. In order for this lesson to work successfully, you should: 1. Complete the tutorial, Creating Interactive Dashboards and Using Oracle Business Intelligence Answers. 2. Complete the tutorial, Creating the Metadata for BI Answers Using Oracle Business Intelligence Administrator. 3. Optional - To enable email delivery through a local freeware mail server. Install and configure the ArGoSoft mail server as described in the Course technical pre-requisites document

Hardware and Software Requirements The following is a list of hardware and software requirements: Supported Browsers include: - Microsoft Internet Explorer 6.0 - Microsoft Internet Explorer 7.0 - Firefox 1.5.x - Firefox 2.0 - Mozilla 1.7.x - Netscape 7.2.x Client Operating Systems: - Microsoft Windows 2000 Professional with Service Pack 3 or above - Microsoft Windows 2003 Professional with Service Pack 1 or above (32-bit only) - Microsoft Windows XP Professional with Service Pack 1 or above Server Operating Systems:

- For Oracle BI Server: Microsoft Windows 2000 Service Pack 4/2003 Server

Reference Material The following is a list of useful reference material should you need additional information: Documentation: Oracle Business Intelligence Enterprise Edition Documentation Education: Oracle BI 10g: Analytics Overview (eStudy) Oracle BI Presentation Services 10g: Create Reports/Dashboards (Instructor-Led Training) Oracle BI Server Administrator 10g: Build Repositories Rel 1(Instructor-Led Training) Oracle Business Intelligence Enterprise Edition 10g (10.1.3.2) (Oracle By Example)

Configuring Scheduler Tables


In this topic you create the Scheduler tables. To deliver iBots, the Scheduler must be configured and four tables must be created and populated with information from the Scheduler jobs. These tables store information about a job instance, parameters, and the schedule. The Scheduler, in turn, monitors these tables and performs any necessary actions. These tables are S_NQ_ERR_MSG, S_NQ_INSTANCE, S_NQ_JOB, and S_NQ_JOB_PARAM. These scheduler tables are pre-populated in the VMWare BIC2G image under the schema S_NQ_SCHED (with identical password S_NQ_SCHED). Should you wish to configure Scheduler tables on a new platform or re-deploy in the BIC2G image, perform the following steps: Optional: For re-deploying existing scheduler tables only

1. Click Start > All Programs > Oracle-OraDB102 > Application Development > SQL Plus. Tables can be stored in any schema, but instructions in this OBE assume they are in the S_NQ_SCHED schema. Log on using the following credentials, and click OK: User Name: S_NQ_SCHED Password: S_NQ_SCHED Host String: orcl

2. In Oracle SQL*Plus, enter the following string at the SQL > prompt to run the attached batch sql file:

SAJOBS.Oracle.sql

start <InstallDrive>\oraclebi\server\schema\sajobs.ora cle.sql; Verify that the tables were created by entering the following string at the SQL > prompt: select table_name from user_tables where table_name like 'S_NQ%';

3. Enter Exit at the SQL > prompt to close Oracle SQL*Plus.

Configuring Scheduler
Now that you have created the tables for storing information about Scheduler jobs in the SH database, you need to configure Scheduler. You set Scheduler configuration options in the Job Manager Configuration dialog box, a feature of the Oracle Business Intelligence Administration Tool (Administration Tool). Note: You can access the Job Manager tool directly from the Oracle Business Intelligence start menu or through the Administration Tool. To configure Scheduler, perform the following steps: 1. Click Start > All Programs > Oracle Business Intelligence > Job Manager.

Job Manager appears.

2. Select File > Configuration Options.

The Scheduler Configuration dialog appears.

3. Enter the appropriate information as follows: A. Select the Scheduler tab. The Database sub-tab shows connection pool information and database table names. Enter the following values in the appropriate text boxes: Database Type: Call Interface: OCI 10g R1/R2 ( Note: The machine running Oracle BI Server must use the Oracle Call Interface (OCI) to connect to the database.) Data Source orcl Name: Username: Password: Confirm Password: Verify that your values are the same as those that appear in the screenshot. S_NQ_SCHED S_NQ_SCHED S_NQ_SCHED Oracle 10g R2

B. Click the General sub-tab and enter Administrator Name: Administrator Administrator Password: Administrator Scheduler Script Path: /ora/biee/10.1.3.2/OracleBI/server/Scripts/Scheduler Default Script Path: /ora/biee/10.1.3.2/OracleBI/server/Scripts/Common Temporary file path: /ora/biee/10.1.3.2/OracleBIData/tmp

4. Optional Step requires ArgoSoft (or other) mail server available. Next you configure your mail server. It is critical that you specify the SMTP server that delivers your mail. Note: As this is a standalone installation for demonstration purposes, for this iteration only the Microsoft SMTP service is stopped to ensure that the ArGoSoft Mail service works properly. Click the Mail tab and verify that all text boxes correspond to those in the screenshot below replacing the domain name with yours as required.

Click OK to close the Scheduler Configuration window. Exit the Job Manager and the Oracle BI Administration Tool.

5. Use the Process control page to

and then

Oracle BI Scheduler:

http://oracle2go.us.oracle.com/go/process_control/pc.html

Creating and Delivering an iBot


Oracle BI Delivers uses intelligence agents or Web robots, called iBots. iBots are software-based agents driven by schedule or events (chained iBots) that can access, filter, and perform analytics on data based upon defined criteria. iBots provide proactive delivery of real-time, personalized, and actionable intelligence throughout the business network. iBots also provide intelligence from data spanning operational and analytical sources. Upon detection of a problem or opportunity, iBots can determine the appropriate individuals to notify and deliver information to them through a wide range of devices (such as email, pager, PDA, mobile phones, and so on). When a user creates and schedules an iBot in Oracle BI Delivers, the Oracle BI Presentation Server gathers information about the iBot such as its priority, the intended recipients, and the devices to which content should be delivered. The Oracle BI Presentation Server packages this information and other characteristics into a job, and then informs Oracle BI Scheduler when to execute the job.

This sub-topic shows you how to create a request in Answers and an iBot that delivers an alert to your Interactive Dashboard. Additionally, you learn how to chain iBots together so that the results of one iBot request trigger the delivery of another. Creating a Request and Adding it to Your Interactive Dashboard Creating and Delivering a Simple iBot Creating and Delivering a Conditional iBot Chaining an iBot Creating a Request and Adding it to Your Interactive Dashboard 1. Before you create an iBot and schedule the iBot for delivery, you need to ensure that you are able to create a request and publish the request to a dashboard. If Oracle Business Intelligence is not currently open, click Start > All Programs > Oracle Business Intelligence > Presentation Services, enter Administrator in both the User ID and Password text boxes, and click Log In. The Oracle Interactive Dashboard appears. Click the Answers link.

The Answers window appears. Select the SH subject area from the panel on the right.

2. The Catalog folders on the left are replaced by SH Subject Area columns. Create a new request by expanding a sub-folder from the left panel and selecting (single-clicking) each column. The column will be added to the Workspace area on the right panel.

Click the following columns on the left panel: Channel Class, Calendar Year, Calendar Month Name, Calendar Month Number, Country Region, Amount Sold, Gross Profit, Margin %, and Product Category.

3. To make your request more meaningful, you sort the criteria and add a filter to remove the Middle East region as no data exists for this particular region. A. In this specific order, click the Sort button Number, Channel Class, and Country Region. for Calendar Month

B. Next, click the Filter button

for Country Region.

The Create/Edit Filter dialog appears.

C. Click the All Choices link and select Middle East. The Value text box populates automatically. Click the Operator drop-down list and select is not equal to / is not in.

D. Click OK to add the filter to your request. Your request criteria should look like the screenshot below.

4. Add conditional formatting to the request to accentuate the best and worst performing regions by Year, Product Category, and Channel. A. Click the Column Properties button select the Conditional Format tab. for Amount Sold and

B. Click Add Condition.

C. Select Amount Sold.

D. The Create/Edit Filter dialog appears. Select is less than from the Operator drop-down list. Enter 5000 (five thousand) in the Value text box.

E. Click Add > Variable > Presentation. Click OK.

F. The Edit Format dialog appears. Click the Background Color button, select any red color, and click OK > OK.

G. The Column Properties dialog appears once again. Click Add Condition once again, but this time set the Amount Sold condition to display a green color when the value exceeds 100000 (one hundred thousand).

H. The Column Properties dialog should look like the screenshot below.

I. Once you have finished adding the second condition, click OK in the Column Properties dialog to return to the Criteria tab.

5. Next you set up a pivot table that will ultimately appear on your dashboard. A. Click the Pivot Table button should like the screenshot below. . Your pivot table work area

Hint: Channel Class, Calendar Year, Calendar Month Name, Calendar Month Number, Country Region, and Prod Category columns should appear under the Rows label. Amount Sold, Gross Profit, and Margin % should appear under the Measures label. Calendar Month Number was added to the request to enable sorting. For display purposes however, this column is not necessary. Click the More Options button and hide this column.

B. Next, you need to set up the appropriate layout. Drag Calendar Year and Prod Category to the Pages area, Calendar Month Name to the Sections area, and Country Region to the Columns area (drag this below the Measure Labels).

C. Click the More Options button Start New Page Drop Down.

for Prod Category and select

Your request appears below the Display Results link.

This request shows how well each Product Category is performing across all Regions (except the Middle East), by Channel. By setting up Calendar Year and Prod Category as separate page items, you are able to manage the display. The conditional formatting signals outstanding performance and highlights where improvements should be made. 6. A. Click Save Request .

B. Click Shared Folders and then click Create Folder.

C. In the Caption text box, enter All Managers and click OK.

D. In the Name text box, give your request a meaningful name and then click OK.

7. Now you need to prepare the request for display on your dashboard.> A. Click the Manage Display button view appears. B. Click the X in the upper-right corner for the Table display. This will remove the table view from your request. . The Compound Layout

Your request should look like the screenshot below.

C. Save your request.

8. Now you verify that you can add a request to a dashboard. A. Click the Dashboards link.

A blank My Dashboard appears.

B. Click the Page Options drop-down list and select Edit Dashboard.

The Dashboard Editor window appears. Drag the request you created in Step #7 above from the pane on the left, to the gray workspace area on the right. This gray area is actually a "Section" placeholder.

The Dashboard Editor window should look like this:

C. Click Save. My Dashboard appears with your request.

D. Click the Log Out link and close your browser.

Creating and Delivering a Simple iBot In the simplest format, an Oracle BI Delivers iBot automatically performs a specified Presentation Catalog request (created with Oracle BI Answers) based on a defined schedule, and examines the results for a specific problem or opportunity. If the specific problem or opportunity is detected in the results, an alert is generated and passed to people who are subscribed to the iBot, using the delivery options specified for each person. The content of the iBot can be tailored for an associated delivery device. For example, content sent to a pager might include only a telephone number, and content sent to a Blackberry device might include an email with more detailed information such as a chart. When Oracle BI Delivers is enabled, an Alerts section is automatically added to the first page of My Dashboard if one is not manually placed there. In this lesson,

you create an iBot that delivers an alert to your Interactive Dashboard and email account. 1. If Oracle Business Intelligence is not currently open, click Start > All Programs > Oracle Business Intelligence > Presentation Services, enter Administrator in both the User ID and Password text boxes, and click Log In. To open Oracle BI Delivers, click the More Products link and select Delivers from the drop-down menu.

The Delivers page appears.

2. In this step, you setup the device profile for the iBot. A. Click Edit My Account.

The My Account page appears. On this page, you specify devices to receive the content. B. Click the Add Email Device link.

In the Device dialog box, enter Email as the Device, select HTML eMail as the

Device Type, and enter user@ <yourmachine> for the Address.

C. Click Finished. The email device appears.

3. Now setup the delivery profile for the iBot. A.Click the Add Delivery Profile link.

B. In the Delivery Profile dialog box, enter Dashboard as the profile Name and select Normal as the Content Priority.

C. Click Finished. The profile is complete.

D. Click Finished again. 4. Now you create the iBot that delivers the request to your dashboard based on a specified schedule. Click Create New iBot.

The Overview page appears.

Click the General tab (or the General link). 5. You use the General tab to specify the priority of the iBot and how to send the delivery content. You can set the priority to low, normal, or high. The priority works with the delivery profile for a user to determine the destination for alerts of different priorities. Select Normal from the Priority drop-down list, Personalized (individual data visibility) from the Data Visibility drop-down-list, and leave Run As blank.

Click the Schedule tab.

6. You use the Schedule tab to determine when the iBot runs, how often it runs, and when to discontinue running it. iBots can execute based on a specified schedule. You can define a starting date and time for the iBot, a recurrence schedule, and an ending date. You can also create a nonscheduled iBot. This is useful when you want to create an iBot that runs only as part of an iBot chain, or an iBot that is initiated by an external process. Select the Set Schedule check box. Additionally, select Start Immediately and Recurrence - Once radio buttons.

Click the Recipients tab. 7. You use the Recipients tab to select the users and groups to receive the delivery content of the iBot. Select the Me check box.

Click the Delivery Content tab. 8. You use the Delivery Content tab to specify the type of content to deliver with the iBot, such as a dashboard page or a saved request. You can also specify the delivery format for the content, such as HTML, PDF, XLS, CSV, or text. You can include a short, descriptive headline with the content. The headline appears as the subject when the iBot is delivered. You can add a text message to provide context for an iBot attachment. You can personalize this headline or text message by using a repository variable, a session variable, or a presentation variable. If the delivery content is blank (no records are returned), you can add an explanation for this condition (only applies for conditional requests). A. Enter My Request in the Headline text box and then click Select Content.

B. The Choose Delivery Content window appears. Select the request that you saved above and click OK.

The Delivery Content window reappears with your request

specified.

C. Click the Destinations tab. 9. You use the Destinations tab to specify a range of desired devices and destinations for iBots. There are two User Destinations: Interactive Dashboard and Active Delivery Profile. If you choose Interactive Dashboard, the active iBots will appear in a Dashboard Alerts! section as well as on the Alerts! page. A link to this summary appears together with the application navigation links when new iBots are delivered. If you choose Active Delivery Profile, iBots will be sent to specified devices in the active delivery profile. The active delivery profile is configured through the My Account page. The available devices include: email, pager, digital phone, handheld device, and other devices. Click both Interactive Dashboard and Active Delivery Profile check boxes.

10. Finally, you need to save the iBot and verify that the request has been delivered to your dashboard and to your email account. Click the Save button and name your iBot, My Request iBot.

11. Click the Dashboards link. Your request appears in in the Alerts! area of the Interactive Dashboard and an Alerts link appears in the My Dashboard banner.

Click the My Request link to view your report from the dashboard. Your request appears.

Alternatively, you can click the Alerts! link in the My Dashboard banner to view the request, open the iBot, or clear the alert.

12. Click Start > All Programs > Outlook Express. Your request appears in your Inbox. If you do not see your request, click Send/Recv. (Note: In this screenshot Preview Mode is enabled for Outlook Express, allowing you to view the request without opening the email.)

Close Outlook Express.

Creating and Delivering a Conditional iBot You use the Conditional Request tab to select a request to trigger an iBot. In this sub-topic you create an iBot that is triggered based upon a database condition rather than a time condition as in the sub-topic above.

1. If Oracle Business Intelligence is not currently open, click Start > All Programs > Oracle Business Intelligence > Presentation Services, enter Administrator in both the User ID and Password text boxes, and click Log In. A. Using the knowledge and skills that you learned in the subtopic, Creating a Request and Adding it to Your Interactive Dashboard, create the following request:

B. Only select the most current year (Calendar Year = 2001).

C. Add a condition to the measure, % Chg Amount Sold MAgo, that will display the value in red when the "change percent for last month" is less than or equal to 3. This database condition will trigger a request that displays Product Categories with sluggish growth.

Your request should look like this screenshot:

D. Save your request as % Change in Sales from Last Month in the shared folder named All Managers.

2. Open Oracle BI Delivers by clicking the More Products link and selecting Delivers from the drop-down menu. The Delivers page appears.

3. As you created a delivery profile for the iBot in the prior sub-topic, you can now simply click Create New iBot.

The Overview page appears. Click the Conditional Request tab (or the Conditional Request link).

The Conditional Request page appears. 4. You use the Conditional Request tab to select a request to trigger the iBot. If you have filters from originating iBots applied to subsequent iBots, filter values are generated by the conditional request specified on this tab. A. Click Select Condition.

B. The Choose Request window appears. Select the request that

you created in Step #1 and click OK.

The Conditional Request window reappears with your specified request.

C. Click the Schedule tab. 5. Verify that the Set Schedule check box is selected, and choose the Start Immediately radio button. As this is a monthly evaluation of Product Category Performance, set the recurrence as it appears below.

Click the Recipients tab. 6. Typically, managers and key staff responsible for monitoring Product Category sales would receive this request. For this practice, you will select only yourself. Ensure that you are the recipient by selecting the Me check box. Note that if you wanted to allow others to subscribe to the request, you would select Publish for subscription.

Click the Delivery Content tab. 7. Enter % Sales Dropped Below 3% in the Headline text box and then click Select Content. When the Choose Delivery Content window appears, locate your conditional request in the All Managers folder and click OK. In the screenshot below, an optional text message is distributed if the request is sent as an attachment (in this case a PDF).

Click the Destinations tab. 8. Accept the default User Destinations.

9. Finally, you need to save the iBot and verify that the request has been delivered to your Interactive Dashboard. Click the Save button and name your iBot, Prod Category Monthly % and click OK.

10. Click the Dashboard link. Your request appears on the dashboard.

Chaining an iBot Just as you used the Conditional Request tab to create a conditional iBot, you can further refine the request to trigger another query based on the results of the first request. The results of the request determine whether the iBot sends its delivery content and initiates any subsequent actions as follows in the table below: If the request does not return any rows, the iBot is not triggered. If the request returns at least one row, the iBot sends its delivery content and initiates any subsequent actions. This sub-topic shows you how to chain an iBot based on the results of a request.

1. If Oracle Business Intelligence is not currently open, click Start > All Programs > Oracle Business Intelligence > Presentation Services, enter Administrator in both the User ID and Password text boxes, and click Log In. Open Oracle BI Delivers by clicking the More Products link and selecting Delivers from the drop-down menu. The Delivers page appears.

2. Click Create New iBot.

The Overview page appears. Click the Schedule tab (or the Schedule link).

The Schedule page appears.

3. Verify that the Set Schedule check box is selected, and choose the Set Schedule check box and Start Immediately radio button.

Click the Recipients tab.

4. > Ensure that you are the recipient by selecting the Me check box.

Click the Delivery Content tab. 5. A. Enter My Chained iBot in the Headline text box.

B. Click Select Content. When the Choose Delivery Content window appears, select Sales by Calendar Year and Prod Category from the All Managers folder and then click OK.

Ensure that the Send content as drop-down list is set to Device Default.

C. Click the Destinations tab. 6. Ensure that the Interactive Dashboard and Active Delivery Profile check boxes are selected.

Click the Advanced tab. 7. You use the Advanced tab to specify one or more actions to execute when an iBot completes. Actions are executed on behalf of each user who is a recipient of the iBot. You can change the default behavior for each iBot action. Actions include the execution of other iBots, custom scripts, and so forth. You can also specify actions to execute either when iBot conditions are satisfied, or when no

records are returned.

A. Click Add Action from the "Execute these actions when iBot conditions are satisfied" area and select iBot from the menu.

B. In the iBot Properties window, click Browse.

C. Locate and select the Prod Category Monthly % iBot and click OK.

D. Select of current iBot from the Execute for Recipients dropdown list and click OK.

Your chained iBot is added.

E. Save your iBot. Enter My Chained iBot in the Name text box and click OK.

F. Click the Alerts! link to view the chained iBot results.

As previously noted, you can review both iBots, clear the alerts, or

review the requests from this window.

If you prefer, you can also navigate to the dashboard and select the iBots from your Alerts! area.

Summary In this lesson, you've learned how to: Configure Oracle Business Intelligence Scheduler tables. Create a Request and Publish it to the Interactive Dashboard. Create a Simple iBot. Create a Conditional iBot. Create a Chained iBot. Related Information Oracle Business Intelligence Enterprise Edition

To learn more about OracleBI EE, refer to additional OBEs on the OTN Web site. Refer to the Welcome page for your Oracle BI EE software

Вам также может понравиться