Creating a Repository Using the Oracle BI Administration Tool (11.1.1.7)
Overview
Purpose
This tutorial covers using the Oracle Business Intelligence (BI) Administration Tool (11.1.1.7) to build, modify, enhance, and manage an Oracle BI repository. You learned how to import metadata from a data source, 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. You learn to create calculated measures, hierarchies, aggregates, and time series measures.
Time to Complete
Approximately 4 hours.
Introduction
This tutorial shows you how to build an Oracle BI metadata repository using the Oracle BI Administration Tool. You learn how to import metadata from 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.
Hardware and Software Requirements
The following is a list of hardware and software requirements:
Have access to or have Installed Oracle Business Intelligence Enterprise Edition 11g.
Please note: This tutorial is built using Oracle Business Intelligence Enterprise Edition 11.1.1.7.0.
When setting up query logging, you must select Action > Set Online User Filter in Identity Manager to view users in the repository.
-
To complete this tutorial you must have access to the BISAMPLE schema that is included with the Sample Application for Oracle Business Intelligence Suite Enterprise Edition Plus. There are two options for accessing the BISAMPLE schema:
Prerequisites
Before starting this tutorial, you should:
- Have some familiarity with the Oracle BI 11g Administration Tool
- Have the proper permissions to upload a repository
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, flat files, XML documents, and so forth. In this example, you import and configure tables from the BISAMPLE schema.
To build the Physical layer of a repository, you perform the following steps:
- Creating a New Repository
- Importing Metadata
- Verifying Connection
- Creating Aliases
- Creating Physical Keys and Joins
Creating a New Repository
Select Start > Programs > Oracle Business Intelligence > BI Administration to open the Administration Tool.
Select File > New Repository.
-
Select the Binary method.
-
Enter a name for the repository. In this tutorial the repository name is BISAMPLE.
Leave the default location as is. It points to the default repository directory.
Leave Import Metadata set to Yes.
Enter and retype a password for the repository. In this tutorial BISAMPLE1 is the repository password.
-
Click Next.
Importing Metadata
-
Change the Connection Type to OCI 10g/11g. The screen displays connection fields based on the connection type you selected.
-
Enter a data source name. In this example the data source name is orcl. This name is the same as the tnsnames.ora entry for this Oracle database instance.
-
Enter user name and password for the data source. In this example the username and password are both BISAMPLE. Recall that BISAMPLE is the name of the user/schema you created in the prerequisite section.
-
Click Next.
-
Accept the default metadata types and click Next.
-
In the Data source view, expand the BISAMPLE schema.
-
Use Ctrl+Click to select the following tables from BISAMPLE schema:
SAMP_ADDRESSES_D
SAMP_CUSTOMERS_D
SAMP_PRODUCTS_D
SAMP_REVENUE_F
SAMP_TIME_DAY_D -
Click the Import Selected button to add the tables to the Repository View.
-
The Connection Pool dialog box appears. Accept the defaults and click OK.
-
The Importing message appears.
-
When import is complete, expand BISAMPLE in the Repository View and verify that the five tables are visible.
-
Click Finish to open the repository.
-
Expand orcl > BISAMPLE and confirm that the five tables are imported into the Physical layer of the repository.
Verifying Connection
-
Select Tools > Update All Row Counts.
-
When update row counts completes, move the cursor over the tables and observe that row count information is now visible, including when the row count was last updated.
-
Expand tables and observe that row count information is also visible for individual columns.
-
Right-click a table and select View Data to view the data for the table.
-
Close the View Data dialog box when you are done. It is a good idea to update row counts or view data after an import to verify connectivity. Viewing data or updating row count, if successful, tells you that your connection is configured correctly.
Creating Aliases
-
It is recommended that you use table aliases frequently in the Physical layer to eliminate extraneous joins and to include best practice naming conventions for physical table names. Right-click SAMP_TIME_DAY_D and select New Object > Alias to open the Physical Table dialog box.
-
Enter D1 Time in the Name field.
-
In the Description field, enter Time Dimension Alias at day grain. Stores one record for each day.
-
Click the Columns tab. Note that alias tables inherit all column definitions from the source table.
-
Click OK to close the Physical Table dialog box.
-
Repeat the steps and create the following aliases for the remaining physical tables.
SAMP_ADDRESSES_D = D4 Address
SAMP_CUSTOMERS_D = D3 Customer
SAMP_PRODUCTS_D = D2 Product
SAMP_REVENUE_F = F1 Revenue
Creating Keys and Joins
-
Select the five alias tables in the Physical layer.
-
Right-click one of the highlighted alias tables and select Physical Diagram > Selected Object(s) Only to open the Physical Diagram. Alternatively, you can click the Physical Diagram button on the toolbar.
-
Rearrange the alias table objects so they are all visible.
-
You may want to adjust the objects in the Physical Diagram. If so, use the toolbar buttons to zoom in, zoom out, fit the diagram, collapse or expand objects, select objects, and so forth:
-
Click the New Join button on the toolbar.
-
Click the F1 Revenue table and then the D1 Time table. The Physical Foreign Key dialog box opens. It matters which table you click first. The join creates 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.
-
Select the D1 Time. CALENDAR_DATE column, and then select F1 Revenue.BILL_DAY_DT to join the tables. Ensure that the Expression edit box (at the bottom) contains the following expression:
"orcl".""."BISAMPLE"."D1 Time"."CALENDAR_DATE" = "orcl".""."BISAMPLE"."F1 Revenue"."BILL_DAY_DT"
-
Click OK to close the Physical Foreign Key dialog box. The join is visible in the Physical Diagram.
-
Repeat the steps to create joins for the remaining tables. Use the following expressions as a guide. Please notice that D4 Address joins to D3 Customer.
"orcl".""."BISAMPLE"."D2 Product"."PROD_KEY" = "orcl".""."BISAMPLE"."F1 Revenue"."PROD_KEY"
"orcl".""."BISAMPLE"."D3 Customer"."CUST_KEY" = "orcl".""."BISAMPLE"."F1 Revenue"."CUST_KEY"
"orcl".""."BISAMPLE"."D4 Address"."ADDRESS_KEY" = "orcl".""."BISAMPLE"."D3 Customer"."ADDRESS_KEY"
-
Click the Auto Layout button on the toolbar.
-
Your diagram should look similar to the screenshot:
-
Click the X in the upper right corner to close the Physical Diagram.
-
Select File > Save or click the Save button on the toolbar to save the repository.
-
Click No when prompted to check global consistency. 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.
-
Leave the Administration Tool and the repository open for the next topic.
Congratulations! You have successfully created a new repository, imported a table schema from an external data source into the Physical layer, created aliases, and defined keys and joins.
In the next topic you learn how to build the Business Model and Mapping layer of a repository.
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 layer 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 of a repository, you perform the following steps:
- Creating a Business Model
- Examining Logical Joins
- Examining Logical Columns
- Examining Logical Table Sources
- Renaming Logical Objects Manually
- Renaming Logical Objects Using the Rename Wizard
- Deleting Unnecessary Logical Objects
- Creating Simple Measures
Creating a Business Model
-
Right-click the white space in the Business Model and Mapping layer and select New Business Model to open the Business Model dialog box.
Enter Sample Sales in the Name field. Leave Disabled checked.
Click OK. The Sample Sales business model is added to the Business Model and Mapping layer.
In the Physical layer, select the following four alias tables:
D1 Time
D2 Product
D3 Customer
F1 Revenue
Do not select D4 Address at this time.Drag the four alias table from the Physical layer to the Sample Sales business model in the Business Model and Mapping layer. The tables are added to the Sample Sales business model. Notice that the three dimension tables have the same icon, whereas the F1 Revenue table has an icon with a # sign, indicating it is a fact table.
Examining Logical Joins
-
Right-click the Sample Sales business model and select Business Model Diagram > Whole Diagram to open the Business Model Diagram.
-
If necessary, rearrange the objects so that the join relationships are visible.
-
Double-click any one of the joins in the diagram to open the Logical Join dialog box. In this example the join between D1 Time and F1 Revenue is selected.
-
Click OK to close the Logical Join dialog box.
-
Click the X to close the Business Model Diagram.
Examining Logical Columns
-
Expand the D1 Time logical table. Notice that logical columns were created automatically for each table when you dragged the alias tables from the Physical layer to the BMM layer.
Examining Logical Table Sources
-
Expand the Sources folder for the D1 Time logical table. Notice there is a logical table source, D1 Time. This logical table source maps to the D1 Time alias table in the Physical layer.
-
Double-click the D1 Time logical table source (not the logical table) to open the Logical Table Source dialog box.
-
On the General tab, rename the D1 Time logical table source to LTS1 Time. Notice that the logical table to physical table mapping is defined in the "Map to these tables" section.
-
On the Column Mapping tab, notice that logical column to physical column mappings are defined. If mappings are not visible, select Show mapped columns.
-
You learn more about the Content and Parent-Child Settings tabs later in this tutorial when you build logical dimension hierarchies. Click OK to close the Logical Table Source dialog box. If desired, explore logical table sources for the remaining logical tables.
Renaming Logical Objects Manually
-
Expand the D1 Time logical table.
-
Click on the first logical column, BEG_OF_MONTH_WID, to highlight it.
-
Click on BEG_OF_MONTH_WID again to make it editable.
-
Rename BEG_OF_MONTH_WID to Beg of Mth Wid. This is the manual method for renaming objects. You can also rename an object and select Rename to manually rename an object.
Renaming Objects Using the Rename Wizard
-
Select Tools > Utilities > Rename Wizard > Execute to open the Rename Wizard.
-
In the Select Objects screen, click Business Model and Mapping in the middle pane.
-
Expand the Sample Sales business model.
-
Expand the D1 Time logical table.
-
Use Shift+Click to select all of the logical columns except for the column you already renamed, Beg of Mth Wid.
-
Click Add to add the columns to the right pane.
-
Repeat the steps for the three remaining logical tables so that all logical columns from the Sample Sales business model are added to the right pane. Only the columns from F1 Revenue are shown in the screenshot.
-
Click Next to move to the Select Types screen.
-
Click Next to open the Select Rules screen.
-
In the Select Rules screen, select All text lowercase and click Add to add the rule to the lower pane.
-
Add the rule Change each occurrence of '_' into a space.
-
Add the rule First letter of each word capital.
-
Click Next to open the Finish screen. Verify that all logical columns will be named according to the rename rules you selected.
-
Click Finish.
-
In the Business Model and Mapping layer, expand the logical tables and confirm that all logical columns have been renamed as expected. The screenshot shows only the columns in D1 Time.
-
In the Physical layer, expand the alias tables and confirm that all physical columns have not been renamed. The point here is you can change object names in the BMM layer without impacting object names in the Physical layer. When logical objects are renamed, the relationships between logical objects and physical objects are maintained by the logical column to physical column mappings.
Deleting Unnecessary Logical Objects
-
In the BMM layer, expand Sample Sales > F1 Revenue.
-
Use Ctrl+Click to select all F1 Revenue logical columns except for Revenue and Units.
-
Right-click any one of the highlighted logical columns and select Delete. Alternatively you can select Edit > Delete or press the Delete key on your keyboard.
-
Click Yes to confirm the delete.
-
Confirm that F1 Revenue contains only the Revenue and Units columns.
Creating Simple Measures
-
Double-click the Revenue logical column to open the Logical Column dialog box.
-
Click the Aggregation tab.
-
Change the default aggregation rule to Sum.
-
Click OK to close the Logical Column dialog box. Notice that the icon has changed for the Revenue logical column indicating that an aggregation rule has been applied.
-
Repeat the steps to define the SUM aggregation rule for the Units logical column.
-
Save the repository without checking global consistency.
Congratulations! You have successfully built a business model in the Business Model and Mapping layer of a repository and created business measures.
Building the Presentation Layer of a Repository
You have created the initial Sample Sales business model in the repository. You now create the Presentation layer of the repository. The Presentation layer exposes the business model objects in Oracle BI user interfaces so that users can build analyses and dashboards to analyze their data.
To build the Presentation layer you perform the following steps:
- Creating a Subject Area
- Creating Presentation Tables
- Creating Presentation Columns
- Renaming Presentation Columns
- Reordering Presentation Columns
Creating a Subject Area
-
Right-click the white space in the Presentation layer and select New Subject Area to open the Subject Area dialog box.
-
On the General tab, enter Sample Sales as the name of the subject area.
-
Click OK to close the Subject Area dialog box. The Sample Sales subject area is added to the Presentation layer.
Creating Presentation Tables
-
Right-click the Sample Sales subject area and select New Presentation Table to open the Presentation Table dialog box.
-
On the General tab, enter Time as the name of the presentation table.
-
Click OK to close the Presentation Table dialog box. The Time presentation table is added to the Sample Sales subject area.
-
Repeat the process and add three more presentation tables: Products, Customers, and Base Facts.
Creating Presentation Columns
-
In the BMM layer, expand the D1 Time logical table.
-
Use Ctrl+ Click to select the following logical columns:
Calendar Date
Per Name Half
Per Name Month
Per Name Qtr
Per Name Week
Per Name Year. -
Drag the selected logical columns to the Time presentation table in the Presentation layer.
-
Repeat the process and add the following logical columns to the remaining presentation tables:
Products: Drag Brand, Lob, Prod Dsc, Type from D2 Product.
Customers: Drag Cust Key, Name from D3 Customer.
Base Facts: Drag Revenue, Units from F1 Revenue.
Renaming Presentation Columns
-
In the Presentation layer, expand the Products presentation table.
-
Double-click the Lob presentation column to open the Presentation Column dialog box. On the General tab notice that "Use Logical Column Name" is selected. When you drag a logical column to a presentation table, the resulting presentation column inherits the logical column name by default. In this example the Lob presentation column inherits the name of the logical column "Sample Sales"."D2 Product"."Lob".
-
Deselect Use Logical Column Name. The Name field is now editable.
-
Enter Line of Business in the Name field.
-
Click OK to close the Presentation Column dialog box. Notice that the presentation column name is now changed to Line of Business in the Presentation layer.
-
In the BMM layer, expand D2 Product. Notice that the Lob logical column name is not changed. The point here is you can change object names in the Presentation layer without impacting object names in the BMM or Physical layers.
-
In the BMM layer, rename the Prod Dsc logical column to Product. Notice that the name change is inherited by the corresponding presentation column.
-
Make the following name changes to logical objects in the BMM layer so that the names of the corresponding presentation columns are also changed:
For the D3 Customer logical table:
Change Cust Key to Customer Number.
Change Name to Customer Name. -
Confirm that the corresponding presentation column names are changed.
Reordering Presentation Columns
-
In the Presentation layer, double-click the Time presentation table to open the Presentation Table dialog box.
-
Click the Columns tab.
-
Select columns and use the up and down arrows, or drag the columns. to rearrange the presentation columns into the following order from top to bottom:
Per Name Year
Per Name Half
Per Name Qtr
Per Name Month
Per Name Week
Calendar Date -
Click OK to close the Presentation Table dialog box and confirm that the presentation column order is changed in the Presentation layer.
-
Repeat the steps to reorder the columns in the Products presentation table:
Brand
Line of Business
Type
Product -
Save the repository without checking global consistency.
Congratulations! You have successfully built the Presentation layer of a repository.
Testing and Validating a Repository
You have finished building an initial business model and now need to test and validate the repository before continuing. You begin by checking the repository for errors using the consistency checking option. Next you load the repository into Oracle BI Server memory. You then test the repository by running an Oracle BI analysis and verifying the results. Finally, you examine the query log file to observe the SQL generated by Oracle BI Server.
To test and validate a repository you perform the following steps:
- Checking Consistency
- Disabling Cache
- Loading the Repository
- Setting Up Query Log
- Creating and Running Analysis
- Checking the Query Log
Checking Consistency
-
Select File > Check Global Consistency.
You should receive the message Business model "Sample Sales" is consistent. Do you want to mark it as available for queries?
-
Click Yes. You should receive the message: Consistency check fixed certain object(s); there are no errors, warnings or best practice violations left to report.
-
Click OK. Notice that the Sample Sales business model icon in the BMM layer is now green, indicating it is available for queries.
-
Save the repository without checking global consistency again.
Select File > Close to close the repository. Leave the Administration Tool open.
Disabling Cache
-
Open a browser and enter the following URL to navigate to Oracle Enterprise Manager:
http://<machine name>:7001/em
In this tutorial the URL is http://localhost:7001/em
-
Log in as an administrative user. Typically you use the administrative user name and password provided during the Oracle BI installation. In this example the user name is weblogic.
-
In the left navigation pane, expand Business Intelligence and click coreapplication.
-
Click the Capacity Management tab.
-
Click the Performance sub tab.
-
Locate the Enable BI Server Cache section. Cache is enabled by default.
-
Click Lock and Edit Configuration.
-
Click Close when you receive the confirmation message "Lock and Edit Configuration - Completed Successfully."
-
Deselect Cache enabled. Caching is typically not used during development. Disabling cache improves query performance.
-
Click Apply.
-
Click Activate Changes.
-
Click Close when you receive the confirmation message Activate Changes - Completed Successfully.
Loading the Repository
-
In the right pane, click the Deployment tab.
-
Click the Repository subtab.
-
Click Lock and Edit Configuration.
-
Click Close when you receive the confirmation message "Lock and Edit Configuration - Completed Successfully."
-
In the "Upload BI Server Repository" section, click Browse to open the Choose file dialog box.
-
By default, the Choose file dialog box should open to the repository directory. If not, navigate to the repository directory with the BISAMPLE repository. If not, browse to D:\bi\instances\instance1\bifoundation\OracleBIServerComponent\coreapplication_obis1\repository.
-
Select the BISAMPLE.rpd file and click Open.
-
Enter BISAMPLE1 as the repository password and confirm the password.
-
Click Apply.
-
In the BI Server Repository section, confirm that the Default RPD is now BISAMPLE with an extension. In this example the file name is BISAMPLE_BI0079.
-
Click Activate Changes.
-
Allow Active Changes processing to complete. Click Close when you receive the confirmation message Activate Changes - Completed Successfully.
-
On the Availability > Processes page, select BI Servers, and click Restart Selected.
-
Click Yes when you receive the message “Are you sure you want to restart selected components?”
-
Allow the “Restart Selected – In Progress” processing to complete. This may take a few moments.
-
Click Close when you receive the confirmation message “Restart Selected – Completed Successfully".
-
Confirm that all components are running. Oracle BI cache is now disabled and the BISAMPLE repository is loaded into BI Server.
-
Leave Oracle Enterprise Manager open.
Setting Up Query Log
-
Return to the Administration Tool, which should still be open.
-
Select File > Open > Online to open the repository in online mode. You use online mode to view and modify a repository while it is loaded into the Oracle BI Server. The Oracle BI Server must be running to open a repository in online mode.
-
Enter BISAMPLE1 as the repository password and enter your administrative user name and password.
-
Click Open to open the repository in online mode.
-
Select Manage > Identity to open Identity Manager.
-
In the left pane, select BI Repository.
-
Select Action > Set Online User Filter.
-
Enter an asterisk and click OK to fetch users from the identity store.
-
In the right pane, double-click your administrative user to open the User dialog box. In this example the administrative user is weblogic.
-
In the User dialog box, on the User tab, set Logging level to 2.
-
Click OK to open the Check Out Objects dialog box.
-
In the Check Out Objects dialog box, click Check Out. When you are working in a repository open in online mode, you are prompted to check out objects when you attempt to perform various operations.
-
Select Action > Close to close Identity Manager.
-
Select File > Check In Changes. Alternatively, you can click the Check In Changes icon on the toolbar.
-
Save the repository. There is no need to check consistency.
-
Select File > Copy As to save a copy of the online repository with the security changes.
-
In the Save Copy As dialog box, save the file as BISAMPLE.rpd, replacing the existing BISAMPLE repository.
-
Click Yes when asked if you want to replace the existing BISAMPLE repository. This will create a new BISAMPLE repository with query logging set for the weblogic user.
-
Select File > Close to close the repository.
-
Click OK when you receive the following message:
"In order for your online changes to take effect, you will have to manually restart each non-master Oracle BI Server instance in the cluster."
-
Leave the Administration Tool open.
Creating and Running Analysis
-
Open a browser or a new browser tab and enter the following URL to navigate to Oracle Business Intelligence:
http://<machine name>:7001/analytics
In this tutorial the URL is http://localhost:7001/analytics
-
Sign in as an administrative user. Typically you use the administrative user name and password provided during the Oracle BI installation. In this example the user name is weblogic. If you need help identifying a user name and password, contact your company's Oracle BI Administrator.
-
In the left navigation pane, under Create... >Analysis and Interactive Reporting, select Analysis.
-
Select the Sample Sales subject area.
-
Select “Reload Server Metadata”.
-
In the left navigation pane, expand the folders in the Sample Sales subject area and confirm that the user interface matches the Presentation layer of the repository.
-
Double-click the following column names in the Subject Areas pane to add them to the analysis:
Time.Per Name Year
Products.Type
Base Facts.Revenue -
Click Results.
-
The analysis results are displayed in a compound layout, which includes a Title view and a Table view.
-
Use scrollbar slider of the compound layout to view additional rows.
Checking the Query Log
-
Click Administration.
-
Click Leave Page when prompted with the message: “Are you sure?”
-
On the Administration page, under Session Management, select Manage Sessions.
-
In the Cursor Cache section, locate your query and select View Log.
-
Your log entry should look similar to the screenshot.
-
Locate the SQL Request section. This section contains the logical SQL issued by the query.
Just below the SQL Request section is the General Query Info section. This section identifies the repository, subject area, and presentation catalog from which the query was run. You will need to scroll right to see the General Query Info text.
-
Click the browser back button to return to the Manage Session page.
Click the browser back button to return to the Administration screen.
Click Home to return to the Home page.
- Sign out of Oracle BI. Click Leave Page when prompted about navigating away from this page. Leave the Oracle BI browser page open.
Managing Logical Table Sources
In this set of steps you create multiple logical table sources for the D3 Customer logical table. To create multiple logical table sources you perform the following steps:
- Opening the Repository in Offline Mode
- Adding a New Logical Table Source
- Creating Presentation Layer Objects
- Loading the Repository
- Creating and Running an Analysis
- Checking the Query Log
Opening the Repository in Offline Mode
-
Return to the Administration Tool, which should still be open. If not, select Start > Programs > Oracle Business Intelligence > BI Administration.
-
Open the BISAMPLE repository in offline mode with repository password as BISAMPLE1. Recall that earlier in this tutorial you created a copy of the online repository and saved it as BISAMPLE.rpd.
-
Select Manage > Identity to open Identity Manager.
-
Select BI Repository in the left pane.
-
Recall that earlier in this tutorial you created a copy of the online repository with logging level defined for the administrative user. Confirm that your administrative user is visible in the right pane. In this example the administrative user is weblogic.
-
Double-click the administrative user to open the User dialog box. On the User tab, confirm that logging level is set to 2.
-
Click Cancel to close the User dialog box.
-
Select Action > Close to close Identity Manager. The offline BISAMPLE repository now has a user with a logging level set to 2. This will allow you to check the query log as you complete the remaining exercises in this tutorial. You will not have to repeat the steps of copying an online repository.
Adding a New Logical Table Source
-
In the BMM layer, expand Sample Sales > D3 Customer > Sources. Notice that the D3 Customer logical table has one logical table source named D3 Customer.
-
Rename the D3 Customer logical table source (not the logical table) to LTS1 Customer.
-
Double-click LTS1 Customer to open the Logical Table Source dialog box.
-
Click the Column Mapping tab and notice that all logical columns map to physical columns in the same physical table: D3 Customer. It may be necessary to scroll to the right to see the Physical Table column. Make sure "Show mapped columns" is selected.
-
Click OK to close the Logical Table Source dialog box.
-
In the Physical layer, expand orcl > BISAMPLE.
-
Drag D4 Address from the Physical layer to the D3 Customer logical table in the BMM layer. Notice this creates a new logical table source named D4 Address for the D3 Customer logical table. It also creates new logical columns that map to the D4 Address physical table.
-
In the BMM layer, double-click the new D4 Address logical table source to open the Logical Table Source dialog box.
-
On the General tab, enter LTS2 Customer Address in the Name field.
-
Click the Column Mapping tab and notice that all logical columns map to physical columns in the same physical table: D4 Address. If necessary, select Show mapped columns and deselect Show unmapped columns.
-
Click OK to close the Logical Table Source dialog box.
-
Confirm that the D3 Customer logical table now has two logical table sources: LTS1 Customer and LTS2 Customer Address. A single logical table now maps to two physical sources.
-
Right-click the new ADDRESS_KEY column and select Delete. This is a duplicate column and is not needed.
-
Click Yes to confirm the delete.
-
Use the Rename Wizard or a manual renaming technique to rename the new address logical columns (with uppercase letters) in D3 Customer. Your results should look similar to the screenshot. Hint: To use the Rename Wizard, select all of the new logical columns, then right-click any one of the highlighted columns and select Rename Wizard to launch the wizard. If you need help using the Rename Wizard, refer to Renaming Objects Using the Rename Wizard section from earlier in this tutorial.
-
Rename the remaining logical table sources according to the following table. Recall that logical table sources are located in the Sources folder for a logical table. For example: D2 Product > Sources.
Logical Table SourceRenameD2 Product LTS1 Product F1 Revenue LTS1 Revenue Your results should look similar to the screenshot.
Creating Presentation Layer Objects
-
In the Presentation layer, right-click the Sample Sales subject area and select New Presentation Table to open the Presentation Table dialog box.
-
On the General tab, enter Customer Regions in the Name field.
-
Click OK to close the Presentation Table dialog box. Confirm that the Customer Regions presentation table is added to the Sample Sales subject area in the Presentation layer.
-
In the BMM layer, expand Sample Sales > D3 Customer.
-
Drag the following logical columns from D3 Customer to Customer Regions in the Presentation layer:
Address 1
Address 2
Area
City
Country Name
Estab Name
Postal Code
Region
State Province
State Province AbbrvYour column names may be slightly different depending on how you renamed them.
-
Reorder the Customer Regions presentation columns in the following order, from top to bottom:
Region
Area
Country Name
State Province
State Province Abbrv
City
Postal Code
Address 1
Address 2
Estab Name -
Double-click the Sample Sales subject area in the Presentation layer to open the Subject Area dialog box.
-
Click the Presentation Tables tab.
-
Reorder the presentation tables so that Customer Regions appears after Customers.
-
Click OK to close the Subject Area dialog box. Confirm that the presentation tables appear in the expected order.
-
Save the repository and check global consistency when prompted. You should receive a message that there are no errors, warnings, or best practice violations to report.
-
Click OK to close the consistency check message.
-
Close the repository. Leave the Administration Tool open.
Loading the Repository
-
Return to Oracle Enterprise Manager, which should still be open. If not, open a browser and enter the following URL to navigate to Oracle Enterprise Manager:
http://<machine name>/:7001/em
In this tutorial the URL is http://localhost:7001/em
-
If necessary, log in as an administrative user. Typically you use the administrative user name and password provided during the Oracle BI installation. In this example the user name is weblogic.
In the left navigation pane, expand Business Intelligence and click on coreapplication.
Click the Deployment tab.
-
Click the Repository sub tab.
-
Click Lock and Edit Configuration.
-
Click Close when you receive the confirmation message "Lock and Edit Configuration - Completed Successfully."
-
In the "Upload BI Server Repository" section, click Browse to open the Choose file dialog box.
-
By default, the Choose file dialog box should open to the repository directory. If not, navigate to the repository directory with the BISAMPLE repository. If not, browse to D:\bi\instances\instance1\bifoundation\OracleBIServerComponent\coreapplication_obis1\repository.
-
Select the BISAMPLE.rpd file and click Open.
-
Enter BISAMPLE1 as the repository password and confirm the password.
-
Click Apply.
-
In the BI Server Repository section, confirm that the Default RPD is now BISAMPLE with an extension. In this example the file name is BISAMPLE_BI0080.
-
Click Activate Changes.
-
Allow Active Changes processing to complete. Click Close when you receive the confirmation message Activate Changes - Completed Successfully.
-
On the Availability > Processes page, select BI Servers, and click Restart Selected.
-
Click Yes when you receive the message “Are you sure you want to restart selected components?”
-
Allow the “Restart Selected – In Progress” processing to complete. This may take a few moments.
-
Click Close when you receive the confirmation message “Restart Selected – Completed Successfully".
-
Confirm that all components are running. Oracle BI cache is now disabled and the BISAMPLE repository is loaded into BI Server.
-
Leave Oracle Enterprise Manager open.
Creating and Running an Analysis
-
Return to Oracle BI, which should still be open. If not, open a browser or browser tab and enter the following URL to navigate to Oracle Business Intelligence:
http://<machine name>/:7001/analytics
In this tutorial the URL is http://localhost:7001/analytics.
-
If your previous session has timed out, sign in as an administrative user. Typically you use the administrative user name and password provided during the Oracle BI installation. In this example the user name is weblogic.
-
In the left navigation pane, under Create... Analysis and Interactive Reporting, select Analysis.
-
Select the Sample Sales subject area.
-
Select “Reload Server Metadata”.
-
In the left navigation pane, expand the folders and confirm that the Customer Regions folder and corresponding columns appear.
-
Create the following analysis by double-clicking column names in the Subject Areas pane:
Customer Regions.Region
Customers.Customer Name
Products.Type
Base Facts.Revenue -
Click Results to view the analysis results. Use the Get more rows button at the bottom of the results screen to see more rows.
Checking the Query Log
-
Click Administration.
-
Click Leave Page when prompted with the message: “Are you sure?”
-
On the Administration page, under Session Management, select Manage Sessions.
-
In the Cursor Cache section, locate your query and select View Log.
-
Your log entry should look similar to the screenshot.
-
Locate the SQL Request section. This section contains the logical SQL issued by the query.
Just below the SQL Request section is the General Query Info section. This section identifies the repository, subject area, and presentation catalog from which the query was run. You will need to scroll right to see the General Query Info text.
-
Click the browser back button to return to the Manage Session page.
Click the browser back button to return to the Administration screen.
Click Home to return to the Home page.
Sign out of Oracle BI. Click Leave Page when prompted about navigating away from this page. Leave the Oracle BI browser page open.
Creating Calculation Measures
In this set of steps you use existing measures to created a derived calculation measure. To create a derived calculation measure you perform the following steps:
- Opening the Repository in Offline Mode
- Creating a Calculation Measure Derived from Existing Columns
- Creating a Calculation Measure Using a Function
- Loading the Repository
- Creating and Running an Analysis
- Checking the Query Log
Opening the Repository in Offline Mode
-
Return to the Administration Tool, which should still be open. If not, select Start > Programs > Oracle Business Intelligence > BI Administration.
-
Select File > Open > Offline.
-
Select BISAMPLE.rpd and click Open. Do not select any BISAMPLE repository with an extension, for example, BISAMPLE_BI0079.rpd. Recall that these are the repositories that have been loaded into Oracle BI Server memory.
-
Enter BISAMPLE1 as the repository password and click OK to open the repository.
Creating a Calculation Measure Derived from Existing Columns
-
In the BMM layer, expand Sample Sales > F1 Revenue.
-
Right-click F1 Revenue and select New Object > Logical Column to open the Logical Column dialog box.
On the General tab, enter Actual Unit Price in the Name field.
Click the Column Source tab.
-
Select Derived from existing columns using an expression.
Click the Edit Expression button to open Expression Builder.
-
In the left pane select Logical Tables > F1 Revenue > Revenue.
-
Click the Insert selected item button to move the Revenue column to the right pane.
-
Click the division operator to add it to the expression.
-
In the left pane select Logical Tables > F1 Revenue and then double-click Units to add it to the expression.
Click OK to close Expression Builder. Notice that the formula is added to the Logical Column dialog box.
-
Click OK to close the Logical Column dialog box. The Actual Unit Price calculated measure is added to the business model.
Drag Actual Unit Price from the BMM layer to the Base Facts presentation table in the Presentation layer.
Save the repository and check consistency. Fix any errors or warnings before proceeding.
Creating a Calculation Measure Using a Function
-
In the BMM layer, right-click F1 Revenue and select New Object > Logical Column to open the Logical Column dialog box.
-
On the General tab, enter Revenue Rank in the Name field.
Click the Column Source tab.
Select Derived from existing columns using an expression.
-
Click the Edit Expression button to open Expression Builder.
-
In the left pane select Functions > Display functions > Rank.
Click the Insert selected item button to move the Rank function to the right pane.
Click <<numeric expression>> in the expression.
In the left pane select Logical Tables > F1 Revenue and then double-click Revenue to add it to the expression.
Click OK to close Expression Builder. Notice that the formula is added to the Logical Column dialog box.
Click OK to close the Logical Column dialog box. The Revenue Rank calculated measure is added to the business model.
Drag Revenue Rank from the BMM layer to the Base Facts presentation table in the Presentation layer.
-
Save the repository and check consistency. Fix any errors or warnings before proceeding.
Close the repository. Leave the Admin Tool open.
Loading the Repository
-
Return to Oracle Enterprise Manager, which should still be open. If not, open a browser and enter the following URL to navigate to Oracle Enterprise Manager:
http://<machine name>/:7001/em
In this tutorial the URL is http://localhost:7001/em
-
If necessary, log in as an administrative user. Typically you use the administrative user name and password provided during the Oracle BI installation. In this example the user name is weblogic.
In the left navigation pane, expand Business Intelligence and click on coreapplication.
Click the Deployment tab.
-
Click the Repository sub tab.
Click Lock and Edit Configuration.
-
Click Close when you receive the confirmation message Lock and Edit Configuration - Completed Successfully.
-
Click Browse and navigate to the directory with the BISAMPLE repository.
-
By default, the Choose file dialog box should open to the repository directory. If not, browse to D:\bi\instances\instance1\bifoundation\OracleBIServerComponent\coreapplication_obis1\repository
-
Select the BISAMPLE.rpd file and click Open.
Enter BISAMPLE1 as the repository password and confirm the password.
-
Click Apply.
-
Confirm that the default RPD is now BISAMPLE with an extension. In this example the file name is BISAMPLE_BI0081.
-
Click Activate Changes.
-
Allow Active Changes processing to complete. Click Close when you receive the confirmation message Activate Changes - Completed Successfully.
On the Availability > Processes page, select BI Servers, and click Restart Selected
Click Yes when you receive the message “Are you sure you want to restart selected components?”.
Allow the “Restart Selected – In Progress” processing to complete. This may take a few moments.
Click Close when you receive the confirmation message “Restart Selected – Completed Successfully".
-
Confirm that all components are running. Oracle BI cache is now disabled and the BISAMPLE repository is loaded into BI Server.
Leave Oracle Enterprise Manager open.
Creating and Running an Analysis
-
Return to Oracle BI, which should still be open. If not, open a browser or browser tab and enter the following URL to navigate to Oracle Business Intelligence:
http://<machine name>/:7001/analytics
In this tutorial the URL is http://localhost:7001/analytics.
-
If necessary, log in as an administrative user. Typically you use the administrative user name and password provided during the Oracle BI installation. In this example the user name is weblogic.
-
In the left navigation pane, under Create... Analysis and Interactive Reporting, select Analysis. Hint: If your session has not timed out, you can create a new analysis by selecting New > Analysis.
-
Select the Sample Sales subject area.
-
In the left navigation pane, expand the Base Facts folder and confirm that the Actual Unit Price and Revenue Rank columns are visible.
-
Create the following analysis by double-clicking column names in the Subject Areas pane:
Products.Product
Base Facts.Revenue
Base Facts.Revenue Rank
Base Facts.Units
Base Facts.Actual Unit Price -
Sort Revenue Rank in ascending order.
-
Click Results to view the analysis results.
Checking the Query Log
-
Click the Administration link in the upper right.
-
Click Leave Page when you are asked "Are you sure?"
-
On the Administration page, under Session Management, select Manage Sessions.
-
In the Cursor Cache section, locate your query and select View Log.
-
Your log entry should look similar to the screenshot.
-
Locate the SQL Request section. This section contains the logical SQL issued by the query.
-
Just below the SQL Request section is the General Query Info section. This section identifies the repository, subject area, and presentation catalog from which the query was run. You will need to scroll right to see the General Query Info text.
-
Click the browser back button to return to the Manage Session page.
-
Click the browser back button to return to the Administration screen.
-
Click Home to return to the Home page.
-
Sign out of Oracle BI. Click Leave Page when prompted about navigating away from this page. Leave the Oracle BI browser page open.
Creating Logical Dimensions with Level-Based Hierarchies
In this set of steps you add logical dimension hierarchies to the business model. A logical dimension represents a hierarchical organization of logical columns belonging to a single logical dimension table. Logical dimensions can exist in the Business Model and Mapping layer and in the Presentation Layer. Adding logical dimensions to the Presentation layer exposes them to users, which enables users to create hierarchy-based queries. You implement four logical dimensions for ABC: Time, Product, Office, and Customer. Creating logical dimensions with hierarchies allows you to build level-based measures, define aggregation rules that vary by dimension, provide drill down on charts and tables in analyses and dashboards, and define the content of aggregate sources.To create logical dimensions with level-based hierarchies, you perform the following steps:
- Opening the Repository in Offline Mode
- Creating a Logical Dimension for Product
- Creating Logical Levels
- Associating Logical Columns with Logical Levels
- Setting Logical Level Keys
- Creating a Logical Dimension for Time
- Associating Time Logical Columns with Logical Levels
- Creating a Logical Dimension for Customer
- Setting Aggregation Content for Logical Table Sources
- Testing Your Work
Opening the Repository in Offline Mode
Return to the Administration Tool, which should still be open. If not, select Start > Programs > Oracle Business Intelligence > BI Administration.
-
Select File > Open > Offline.
-
Select BISAMPLE.rpd and click Open. Do not select any BISAMPLE repository with an extension, for example, BISAMPLE_BI0081.rpd. Recall that these are the repositories that have been loaded into Oracle BI Server memory.
-
Enter BISAMPLE1 as the repository password and click OK to open the repository.
Creating a Logical Dimension for Product
-
In the BMM layer, right-click the Sample Sales business model and select New Object > Logical Dimension > Dimension with Level-Based Hierarchy to open the Logical Dimension dialog box.
-
Name the logical dimension H2 Product.
-
Click OK. The logical dimension is added to the Sample Sales business model.
Creating Logical Levels
-
Right-click H2 Product and select New Object > Logical Level.
-
Name the logical level as Product Total.
-
Because this level represents the grand total for products, select the Grand total level check box. Note that when you do this, the Supports rollup to higher level of aggregation field is grayed out and protected.
-
Click OK to close the Logical Level dialog box. The Product Total level is added to the H2 Product logical dimension.
-
Right-click Product Total and select New Object > Child Level to open the Logical Level dialog box.
-
Name the logical level Product Brand.
-
Click OK to close the Logical Level dialog box. The Product Brand level is added to the logical dimension.
-
Repeat the steps to add the following child levels:
Product LOB as a child of Product Brand
Product Type as a child of Product LOB
Product Detail as a child of Product TypeUse the screenshot as a guide:
Associating Logical Columns with Logical Levels
-
Expand the D2 Product logical table.
-
Drag the Brand column from D2 Product to the Product Brand level in H2 Product.
-
Continue dragging logical columns from the D2 Product logical table to their corresponding levels in the H2 Product logical dimension:
Logical ColumnLogical LevelLob Product LOB Type Product Type Product Product Detail Prod Key Product Detail Your results should look similar to the screenshot:
Setting Logical Level Keys
-
Double-click the Product Brand logical level to open the Logical Level dialog box. On the General tab, notice that the Product LOB child level is displayed.
-
Click the Keys tab.
-
Enter Brand for Key Name.
-
In the Columns field, use the drop down list to select D2 Product.Brand.
-
Check Use for Display. When this is selected, users can drill down to this column from a higher level.
-
Set Brand as the Primary key.
-
Click OK to close the Logical Level dialog box. The icon changes for Brand to show that it is the key for the Product Brand level.
-
Use a different technique to create a logical level key: Right-click Lob for the Product LOB level and select New Logical Level Key to open the Logical Level Key dialog box.
-
In the Logical Level Key dialog box, accept the defaults and click OK.
-
The icon changes for Lob to show that it is the key for the Product LOB level.
-
Use either method to set the remaining keys for the H2 Product logical dimension:
Logical LevelLogical Level KeyUse for DisplayProduct Type Type Yes Product Detail Product Yes Product Detail Prod Key No Your results should look similar to the screenshot:
-
Set Prod Key as the primary key for the Product Detail level. Hint: Double-click the level and select the Keys tab.
Creating a Logical Dimension for Time
-
Use a different technique to create a logical dimension for Time. Right-click the D1 Time logical table and select Create Logical Dimension > Dimension with Level-Based Hierarchy.
-
A new logical dimension, D1 TimeDim in this example, is automatically added to the business model.
-
Rename D1 TimeDim to H1 Time.
-
Expand H1 Time . Notice that two levels were created automatically: D1 Time Total and D1 Time Detail. D1 Time Detail is populated with all of the columns from the D1 Time logical table.
-
Rename D1 Time Total to Time Total, and rename D1 Time Detail to Time Detail.
-
Right-click Time Detail and select New Object > Parent Level to open the Logical Level dialog box.
-
On the General tab, name the logical level Week, and check Supports rollup to higher level of aggregation.
-
Click OK to close the Logical Level dialog box. The Week level is added to the H1 Time logical dimension.
-
Repeat the steps to add the remaining logical levels:
Month as a parent of Week
Quarter as a parent of Month
Half as a parent of Quarter
Year as a parent of HalfYour final results should look similar to the screenshot:
Associating Time Logical Columns with Logical Levels
-
Use a different technique to associate logical columns with logical levels. Drag the logical columns from the Time Detail logical level (not from the D1 Time logical table) to their corresponding levels in the H1 Time logical dimension. This is a convenient technique when logical columns are buried deep in the business model.
Logical ColumnLogical LevelPer Name Year Year Per Name Half Half Per Name Qtr Quarter Per Name Month Month Per Name Week Week Your results should look similar to the screenshot:
-
Delete all remaining columns from the Time Detail level except for Calendar Date so that only Calendar Date is associated with the Time Detail level. Notice that deleting objects from the hierarchy does not delete them from the logical table in the business model.
-
Set the logical keys for the H1 Time logical dimension according to the following table:
Logical LevelLevel KeyUse for DisplayYear Per Name Year Yes Half Per Name Half Yes Quarter Per Name Qtr Yes Month Per Name Month Yes Week Per Name Week Yes Time Detail Calendar Date Yes
Creating a Logical Dimension for Customer
-
Use either technique to create a logical dimension with a level-based hierarchy named H3 Customer for the D3 Customer logical table with the following levels, columns, and keys. Hint: Create the levels first, then double-click a logical column to open the Logical Column dialog box and use the Levels tab to associate the logical column with a logical level.
LevelColumnKeyUse for DisplayCustomer Total <none> <none> <none> Customer Region Region Region Yes Customer Area Area Area Yes Customer Country Country Name Country Name Yes Customer State
State Province
State Province
Yes
Customer City City City Yes Customer Postal Code Postal Code Postal Code Yes Customer Detail Customer Name
Customer Number
Customer Name
Customer Number
Yes
No
Set Customer Total as the grand total level.
Set Customer Number as the primary key for the Customer Detail level.
Your results should look similar to the screenshot:
Setting Aggregation Content for Logical Table Sources
-
Expand D1 Time > Sources.
-
Double-click the LTS1 Time logical table source to open the Logical Table Source dialog box.
-
Click the Content tab.
-
Confirm that Aggregation content, group by is set to Logical Level and the logical level is set to Time Detail for the H1 Time logical dimension.
-
Click OK to close the Logical Table Source dialog box.
-
Repeat to verify or set content settings for the remaining logical table sources using the table and screenshots as a guide:
Logical Table SourceLogical Dimension Logical Level LTS1 Product H2 Product Product Detail LTS1 Customer H3 Customer Customer Detail LTS2 Customer Address H3 Customer Customer Detail LTS1 Revenue H1 Time
H2 Product
H3 Customer
Time Detail
Product Detail
Customer Detail
-
Save the repository and check global consistency. Fix any errors or warnings before proceeding. Notice that you did not have to make any changes to the Presentation layer.
-
Close the repository. Leave the Administration Tool open.
Testing Your Work
-
Return to Oracle Enterprise Manager and load the BISAMPLE repository.
-
Return to Oracle BI, which should still be open, and sign in if necessary.
-
Create the following analysis to test the Product hierarchy.
Products.Brand
Base Facts.Revenue -
Click Results.
-
Click on the BizTech brand and verify that you can drill down through the hierarchy to see revenue data at each level.
-
Select New > Analysis > Sample Sales.
-
Click Leave Page when prompted with the message: “Are you sure?”
-
Create the following analysis:
Time.Per Name Year
Base Facts.Revenue -
Click Results and verify that you can drill down through the Time hierarchy.
-
Repeat the steps and create the following analysis to test the Customers hierarchy:
Customer Regions.Region
Base Facts.Revenue -
Click Results and verify that you can drill down through the Customers hierarchy.
-
Sign out of Oracle BI. Click Leave Page when prompted about navigating away from this page. Leave the Oracle BI browser page open.
Creating Level-Based Measures
In this set of steps you create level-based measures that calculate total dollars at various levels in the Product hierarchy, and then use a level-based measure to create a share measure.
To create level-based measures and a share measure, you perform the following steps:
- Opening the Repository in Offline Mode
- Creating Level-Based Measures
- Creating a Share Measure
- Testing Your Work
Opening the Repository in Offline Mode
-
Return to the Administration Tool, which should still be open. If not, select Start > Programs > Oracle Business Intelligence > BI Administration.
-
Select File > Open > Offline.
-
Select BISAMPLE.rpd and click Open. Do not select any BISAMPLE repository with an extension, for example, BISAMPLE_BI0082.rpd. Recall that these are the repositories that have been loaded into Oracle BI Server memory.
-
Enter BISAMPLE1 as the repository password and click OK to open the repository.
Creating Level-Based Measures
-
In the BMM layer, right-click the F1 Revenue table and select New Object > Logical Column to open the Logical Column dialog box.
-
On the General tab, enter Product Total Revenue in the Name field.
-
Click the Column Source tab.
-
Select Derived from existing columns using an expression.
-
Open the Expression Builder.
-
In the Expression Builder, add Logical Tables > F1 Revenue > Revenue to the expression. Recall that the Revenue column already has a default aggregation rule of Sum.
-
Click OK to close Expression Builder.
-
Click the Levels tab.
-
For the H2 Product logical dimension, select Product Total from the Logical Level drop-down list to specify that this measure should be calculated at the grand total level in the product hierarchy.
-
Click OK to close the Logical Column dialog box. The Product Total Revenue measure appears in the Product Total level of the H2 Product logical dimension and the F1 Revenue logical fact table.
-
Repeat the steps to create a second level-based measure:
NameLogical DimensionLogical LevelProduct Type Revenue H2 Product Product Type -
Expose the new columns to users by dragging Product Total Revenue and Product Type Revenue to the Base Facts presentation table in the Sample Sales subject area in the Presentation layer. You can drag the columns from either the H2 Product logical dimension or the F1 Revenue logical table.
Creating a Share Measure
-
In the BMM layer, right-click the F1 Revenue table and select New Object > Logical Column to open the Logical Column dialog box.
-
On the General tab, name the logical column Product Share.
-
On the Column Source tab, select "Derived from existing columns using an expression".
-
Open the Expression Builder.
-
In the Expression Builder, Select Functions > Mathematic Functions > Round.
-
Click Insert selected item. The function appears in the edit box.
-
Click Source Number in the formula.
-
Enter 100* followed by a space.
-
Insert Logical Tables > F1 Revenue > Revenue.
-
Using the toolbar, click the Division button. Another set of angle brackets appears, <<expr>>.
-
Click <<expression>>.
-
Insert Logical Tables > F1 Revenue > Product Total Revenue. Recall that this is the total measure for the hierarchy.
-
Click between the last set of angle brackets, <<Digits>>, and enter 1. This represents the number of digits of precision with which to round the integer.
-
Check your work:
Round(100* "Sample Sales"."F1 Revenue"."Revenue" / "Sample Sales"."F1 Revenue"."Product Total Revenue" , 1)
This share measure will allow you to run an analysis that shows how revenue of a specific product compares to total revenue for all products.
-
Click OK to close the Expression Builder. The formula is visible in the Logical Column dialog box.
-
Click OK to close the Logical Column dialog box. The Product Share logical column is added to the business model.
-
Add the Product Share measure to the Base Facts presentation table.
-
Save the repository. Check consistency. You should receive the following message.
-
Close the repository.
Testing Your Work
-
Return to Oracle Enterprise Manager and load the BISAMPLE repository.
-
Return to Oracle BI, which should still be open, and sign in.
-
Create the following analysis to test the level-based and share measures.
Products.Product
Base Facts.Revenue
Base Facts.Product Type Revenue
Base Facts.Product Share -
For the Product Share column, select Column Properties.
-
On the Data Format tab, select Override Default Data Format.
-
Change Treat Numbers As to Percentage and set Decimal Places to 2. Deselect Use 1000's separator.
-
Click OK to close the Column Properties dialog box.
-
Sort Product Share in descending order.
-
Click Results. Notice that Product Type Revenue returns dollars grouped by Type even though the query is at a different level than Type; Product in this example. Product Share shows the percent of total revenue for each product sorted in descending order.
-
Sign out of Oracle BI. Click Leave Page when prompted about navigating away from this page. Leave the Oracle BI browser page open.
Creating Logical Dimensions with Parent-Child Hierarchies
A parent-child hierarchy is a hierarchy of members that all have the same type. This contrasts with level-based hierarchies, where members of the same type occur only at a single level of the hierarchy. The most common real-life occurrence of a parent-child hierarchy is an organizational reporting hierarchy chart, where the following all apply:
• Each individual in the organization is an employee.
• Each employee, apart from the top-level managers, reports to a single manager.
• The reporting hierarchy has many levels.
In relational tables, the relationships between different members in a parent-child hierarchy are implicitly defined by the identifier key values in the associated base table. However, for each Oracle BI Server parent-child hierarchy defined on a relational table, you must also explicitly define the inter-member relationships in a separate parent-child relationship table.
To create a logical dimension with a parent-child hierarchy, perform the following steps:
- Opening the Repository in Offline Mode
- Importing Metadata and Define Physical Layer Objects
- Creating Logical Table and Logical Columns
- Creating a Logical Join
- Creating a Parent-Child Logical Dimension
- Defining Parent-Child Settings
- Creating Presentation Layer Objects
- Testing Your Work
Opening the Repository in Offline Mode
-
Return to the Administration Tool, which should still be open. If not, select Start > Programs > Oracle Business Intelligence > BI Administration.
-
Select File > Open > Offline.
-
Select BISAMPLE.rpd and click Open. Do not select any BISAMPLE repository with an extension, for example, BISAMPLE_BI0083.rpd. Recall that these are the repositories that have been loaded into Oracle BI Server memory.
-
Enter BISAMPLE1 as the repository password and click OK to open the repository.
Importing Metadata and Define Physical Layer Objects
-
In the Physical layer, expand orcl.
-
Right-click Connection Pool and select Import Metadata to open the Import Wizard.
-
In the Select Metadata Types screen, accept the defaults and click Next.
-
In the Select Metadata Objects screen, in the data source view, expand BISAMPLE and select the following tables for import:
SAMP_EMPL_D_VH
SAMP_EMPL_PARENT_CHILD_MAP
SAMP_EMPL_POSTN_D -
Click the Import Selected button to move the tables to the Repository View.
-
Click Finish to close the Import Wizard.
-
Confirm that the three tables are visible in the Physical layer of the repository.
-
Right-click SAMP_EMPL_PARENT_CHILD_MAP and select View Data.
-
Create the following aliases for the tables:
TableAliasSAMP_EMPL_D_VH D50 Sales Rep SAMP_EMPL_PARENT_CHILD_MAP D51 Sales Rep Parent Child SAMP_EMPL_POSTN_D D52 Sales Rep Position -
Use the Physical Diagram to create the following physical joins for the alias tables:
"orcl".""."BISAMPLE"."D52 Sales Rep Position"."POSTN_KEY" = "orcl".""."BISAMPLE"."D50 Sales Rep"."POSTN_KEY"
"orcl".""."BISAMPLE"."D50 Sales Rep"."EMPLOYEE_KEY" = "orcl".""."BISAMPLE"."D51 Sales Rep Parent Child"."ANCESTOR_KEY"
"orcl".""."BISAMPLE"."D51 Sales Rep Parent Child"."MEMBER_KEY" = "orcl".""."BISAMPLE"."F1 Revenue"."EMPL_KEY"
Creating Logical Table and Logical Columns
-
In the BMM layer, right-click the Sample Sales business model and select New Object > Logical Table to open the Logical Table dialog box.
-
On the General tab, name the logical table D5 Sales Rep.
-
Click OK to add the logical table to the business model.
-
Drag all six columns from D50 Sales Rep in the Physical layer to D5 Sales Rep in the BMM layer. This action creates logical columns and adds a D50 Sales Rep logical table source to D5 Sales Rep.
-
Rename the D50 Sales Rep logical table source to LTS1 Sales Rep.
-
In the Physical layer, expand D52 Sales Rep Position.
-
Drag POSTN_DESC and POSTN_LEVEL from D52 Sales Rep Position to LTS1 Sales Rep. Note that you are dragging the columns to the logical table source, not the logical table. Dragging to the logical table would create a second logical table source.
-
Drag DISTANCE from D51 Sales Rep Parent Child to LTS1 Sales Rep. Again, you drag the column to the logical table source, not the logical table.
-
Rename the logical columns:
Old NameNew NamePOSTN_KEY Position Key TYPE Sales Rep Type EMPL_NAME Sales Rep Name EMPLOYEE_KEY Sales Rep Number HIRE_DT Hire Date MGR_ID Manager Number POSTN_DESC Position POSTN_LEVEL Position Level DISTANCE Closure Distance
Creating a Logical Join
-
In the BMM layer, select D5 Sales Rep and F1 Revenue.
-
Right-click either highlighted table and select Business Model Diagram > Selected Tables Only to open the Business Model Diagram.
-
Create a logical join between D5 Sales Rep and F1 Revenue with F1 Revenue at the many end of the join.
-
Close the Business Model Diagram. Notice that the icon has changed for the D5 Sales Rep table.
Creating a Parent-Child Logical Dimension
-
Right-click the D5 Sales Rep logical table and select Create Logical Dimension > Dimension with Parent-Child Hierarchy.
-
In the Logical Dimension dialog box, on the General tab, name the logical dimension H5 Sales Rep.
-
Click Browse next to Member Key. The Browse window shows the physical table and its corresponding key.
-
Click View to open the Logical Key dialog box. Confirm that the Sales Rep Number column is selected.
-
Click Cancel to close the Logical Key dialog box.
-
Click OK to close the Browse window.
-
Click Browse next to Parent Column. The Browse window shows the columns other than the member key.
-
Deselect Show Qualified Names and select Manager Number as the parent column for the parent-child hierarchy.
-
Click OK to close the Browse window, but do not close the Logical Dimension dialog box.
Defining Parent-Child Settings
-
Click Parent-Child Settings to display the Parent-Child Relationship Table Settings dialog box. Note that at this point the Parent-Child Relationship Table is not defined.
-
Click the Select Parent-Child Relationship Table button to open the Select Physical Table dialog box.
-
In the Select Physical Table dialog box, select the D51 Sales Rep Parent Child alias you created.
-
The D51 Sales Rep Parent Child alias is now displayed in the Parent-Child Relationship Table column.
-
In the Parent-Child Table Relationship Column Details section, set the appropriate columns:
Member KeyMEMBER_KEYParent KeyANCESTOR_KEY Relationship DistanceDISTANCE Leaf Node IdentifierIS_LEAF -
Click OK to close the Parent-Child Relationship Table Settings dialog box.
-
Click OK to close the Logical Dimension dialog box.
-
Right-click H5 Sales Rep and select Expand All. Note that a parent-child logical dimension has only two levels.
-
Delete all columns from the Detail level except for Sales Rep Name and Sales Rep Number.
-
Double-click the Detail level to open the Logical Level dialog box.
-
On the Keys tab, create a new key named Display Key that maps to the Sales Rep Name column.
-
Deselect Use for Display for the Sales Rep Number column and select Use for Display for the Sales Rep Name column.
-
Make sure that Member Key is still set to D50 Sales Rep_Key.
-
Click OK to close the Logical Level dialog box.
-
Expand F1 Revenue > Sources and double-click LTS1 Revenue to open the Logical Table Source dialog box.
-
On the Content tab, set the logical level to Detail for the H5 Sales Rep logical dimension.
-
Click OK to close the Logical Table Source dialog box.
Creating Presentation Layer Objects
-
Drag the D5 Sales Rep logical table from the BMM layer to the Sample Sales subject area in the Presentation layer.
-
Rename the D5 Sales Rep presentation table to Sales Reps.
-
Move the Sales Reps presentation table above the Base Facts table.
-
Expand the Sales Reps presentation table and notice that the H5 Sales Rep parent-child logical dimension is automatically included as a presentation hierarchy.
-
Double-click the H5 Sales Rep presentation hierarchy to open the Presentation Hierarchy dialog box.
-
On the Display Columns tab, confirm that Sales Rep Name is set as the display column.
-
Click OK to close the Presentation Hierarchy dialog box.
-
Save the repository and check consistency. Fix any errors or warnings before proceeding.
-
Close the repository. Leave the Administration Tool open.
Testing Your Work
-
Return to Oracle Enterprise Manager and load the BISAMPLE repository.
-
Return to Oracle BI, which should still be open, and sign in.
-
Create the following analysis to test the parent-child logical dimension.
Sales Reps.H5 Sales Reps
Sales Reps.Position
Base Facts.Revenue -
Click Results.
-
Expand the pivot table to view data at different levels of the hierarchy. Notice that the Revenue measure rolls up through each level.
-
Sign out of Oracle BI. Click Leave Page when prompted about navigating away from this page. Leave the Oracle BI browser page open.
Creating Logical Dimensions with Ragged and Skipped-Level Hierarchies
To create logical dimensions with ragged and skipped-level hierarchies, you perform the following steps:
- Importing Metadata and Define Physical Layer Objects
- Creating Logical Table and Logical Columns
- Creating a Ragged/Skipped Levels Logical Dimension
- Creating Presentation Layer Objects
- Testing Your Work
Importing Metadata and Define Physical Layer Objects
-
Open the BISAMPLE repository in offline mode.
-
In the Physical layer, expand orcl.
-
Right-click Connection Pool and select Import Metadata to open the Import Wizard.
-
In the Select Metadata Types screen, accept the defaults and click Next.
-
In the Select Metadata Objects screen, in the data source view, expand BISAMPLE.
-
In the data source view, select the SAMP_PRODUCTS_DR table for import:
-
Click the Import Selected button to move the table to the Repository View.
-
Expand BISAMPLE in the Repository View and confirm that the SAMP_PRODUCT_DR table is visible.
-
Click Finish to close the Import Wizard.
-
Confirm that the SAMP_PRODUCT_DR table is visible in the Physical layer of the repository.
-
Create the following alias for the table: D20 Product
-
Use the Physical Diagram to create the following physical join for the alias table:
"orcl".""."BISAMPLE"."D20 Product"."PROD_KEY" = "orcl".""."BISAMPLE"."F1 Revenue"."PROD_KEY"
-
Right-click D20 Product and select View Data.
-
Close View Data.
Creating Logical Table and Logical Columns
-
Drag D20 Product from the Physical layer to the Sample Sales business model in the BMM layer to create a D20 Product logical table. The logical join to F1 Revenue is created automatically based on the join in the Physical layer.
-
Rename the D20 Product logical columns:
Old NameNew NameBRAND Brand LOB LOB PROD_DSC Product PROD_KEY Product Number Type Product Type -
Rename the D20 Product logical table source to LTS1 Product (Ragged).
Creating a Ragged/Skipped Levels Logical Dimension
-
Right-click the D20 Product logical table and select Create Logical Dimension > Dimension with Level-Based Hierarchy to automatically create a logical dimension named D20 ProductDim.
-
Rename D20 ProductDim to H20 Product.
-
Double-click the H20 Product logical dimension to open the Logical Dimension dialog box.
-
On the General tab, select both Ragged and Skipped Levels.
-
Click OK to close the Logical Dimension dialog box.
-
Expand H20 Product.
-
Create the following hierarchy:
LevelColumnKeyUse for DisplayProduct Total <none> <none> <none> Product Brand Brand Brand Yes Product LOB LOB LOB Yes Product Type Product Type Product Type Yes Product
Product
Product
Yes
Product Detail Product Number Product Number Yes
Creating Presentation Layer Objects
-
Drag the D20 Product logical table to the Sample Sales subject area in the Presentation layer.
-
In the Presentation layer, rename D20 Product to Products (Ragged) and move Products (Ragged) to appear after Products.
-
Expand Products (Ragged) and notice that the H20 Product logical dimension is automatically added to the Presentation layer.
-
Save the repository and check consistency. Fix any errors or warnings before proceeding.
-
Close the repository. Leave the Administration Tool open.
Testing Your Work
-
Return to Oracle Enterprise Manager and load the BISAMPLE repository.
-
Return to Oracle BI, which should still be open, and sign in.
-
Create the following analysis to test the ragged / skipped level hierarchy:
Products (Ragged).Brand
Products (Ragged).LOB
Products (Ragged).Product Type
Products (Ragged).Product
Base Facts.Revenue -
Click Results.
-
Sign out of Oracle BI. Click Leave Page when prompted about navigating away from this page. Leave the Oracle BI browser page open.
Using Aggregates
In this set of steps you set up and use aggregate tables to improve query performance. 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 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 typically have many fewer rows than the non-aggregate tables and, therefore, processing is faster.
To set up and use aggregate tables, perform the following steps:
- Importing Metadata
- Creating New Logical Table Sources
- Setting Aggregate Content
- Testing Your Work
Importing Metadata
-
Return to the Administration Tool and open the BISAMPLE repository in offline mode.
In the Physical layer, expand orcl.
-
Right-click Connection Pool and select Import Metadata to open the Import Wizard.
-
In the Select Metadata Types screen, select Views and click Next.
-
In the Select Metadata Objects screen, in the data source view, expand BISAMPLE.
-
In the data source view, select the following for import:
SAMP_REVENUE_FA2
SAMP_TIME_QTR_D -
Click the Import Selected button to move the objects to the Repository View.
-
Expand BISAMPLE in the Repository View and confirm that the objects are visible.
-
Click Finish to close the Import Wizard.
-
Confirm that the objects are visible in the Physical layer of the repository.
-
Create the following aliases:
TableAliasSAMP_REVENUE_FA2 F2 Revenue Aggregate SAMP_TIME_QTR_D D1 Time Quarter Grain -
Right-click F2 Revenue Aggregate and select View Data. F2 Revenue Aggregate stores aggregated fact information for revenue and units at the quarter and product grain.
-
Right-click D1 Time Quarter Grain and select View Data. D1 Time Quarter Grain stores time data at the quarter grain. It stores one record for each quarter beginning with Q4 2006 and ending with Q4 2011.
-
Use the Physical Diagram to create the following physical joins:
"orcl".""."BISAMPLE"."D2 Product"."PROD_KEY" = "orcl".""."BISAMPLE"."F2 Revenue Aggregate"."PROD_KEY"
"orcl".""."BISAMPLE"."D1 Time Quarter Grain"."QTR_KEY" = "orcl".""."BISAMPLE"."F2 Revenue Aggregate"."BILL_QTR_KEY"
Creating New Logical Table Sources
-
In the Physical layer, expand D1 Time Quarter Grain.
-
In the BMM layer, expand D1 Time.
-
Drag the following columns from D1 Time Quarter Grain to their corresponding columns in D1 Time: Note: Make sure to drag them to their corresponding columns.
D1 Time Quarter GrainD1 TimeCAL_HALF Cal Half CAL_QTR Cal Qtr CAL_YEAR Cal Year DAYS_IN_QTR Days in Qtr JULIAN_QTR_NUM Julian Qtr Num PER_NAME_HALF Per Name Half PER_NAME_QTR Per Name Qtr PER_NAME_YEAR Per Name Year This action creates a new logical table source named D1 Time Quarter Grain for D1 Time.
-
Rename the D1 Time Quarter Grain logical table source to LTS2 Time Quarter Grain.
-
Double-click LTS2 Time Quarter Grain to open the Logical Table Source dialog box.
-
On the Column Mapping tab make sure Show mapped columns is selected and note the column mappings. The logical columns now map to columns in two physical tables: D1 Time and D1 Time Quarter Grain.
-
Click OK to close the Logical Table Source dialog box.
-
In the Physical layer expand F2 Revenue Aggregate.
-
In the BMM layer expand F1 Revenue.
-
Drag the following physical columns from F2 Revenue Aggregate to their corresponding logical columns in F1 Revenue: Note: Do not add them as new columns.
F2 Revenue AggregateF1 RevenueUNITS Units REVENUE Revenue This action creates a new logical table source named F2 Revenue Aggregate for F1 Revenue.
-
Rename the F2 Revenue Aggregate logical table source to LTS2 Revenue Aggregate.
-
Double-click LTS2 Revenue Aggregate to open the Logical Table Source dialog box.
-
On the Column Mappings tab make sure show mapped columns is selected and note the column mappings. The Revenue and Units logical columns now map to columns in two physical tables: F1 Revenue and F2 Revenue Aggregate.
-
Leave the Logical Table Source - LTS2 Revenue Aggregate dialog box open.
Setting Aggregate Content
-
Click the Content tab.
-
Set the following logical levels for the logical dimensions:
Logical DimensionLogical LevelH1 Time Quarter H2 Product Product Total H20 Product Product Total H3 Customer Customer Total H5 Sales Rep Total -
Click OK to close the Logical Table Source dialog box.
-
Double-click the LTS2 Time Quarter Grain logical table source to open the Logical Table Source dialog box.
-
On the Content tab, set the logical level to Quarter.
-
Click OK to close the Logical Table Source dialog box.
-
Save the repository and check global consistency. Fix any errors or warnings before proceeding.
-
Close the repository. Leave the Administration Tool open. Note that you did not need to change the Presentation layer. You made changes in the business model that impact how queries are processed and which sources are accessed. However, the user interface remains the same, so there is no need to change the Presentation layer. Oracle BI Server will automatically use the appropriate sources based on the user query.
Testing Your Work
-
Return to Oracle Enterprise Manager and load the BISAMPLE repository.
-
Return to Oracle BI, which should still be open, and sign in.
-
Create the following analysis to test the aggregate tables.
Time.Per Name Qtr
Base Facts.Revenue -
Click Results.
-
Leave Oracle BI open.
-
Use the Administration link to check the query log.
-
Inspect the log. Notice that the query uses the expected tables: D1 Time Quarter Grain and F2 Revenue Aggregate.
-
Return to Oracle BI.
-
Click New > Analysis > Sample Sales.
-
Create the following analysis to test the aggregate tables.
Time.Per Name Year
Base Facts.Revenue -
Click Results.
-
Use the Administration link to check the query log.
-
Inspect the log. Notice that the query uses the same tables: D1 Time Quarter Grain and F2 Revenue Aggregate. This is because Per Name Year is at a higher level than Per Name Quarter in the logical dimension hierarchy, so the aggregate tables are still used.
-
Return to Oracle BI.
-
Click New > Analysis > Sample Sales.
-
Create one more analysis to test the aggregate tables.
Time.Per Name Month
Base Facts.Revenue -
Click Results.
-
Inspect the log. Notice that this time the query uses the detail tables: D1 Time and F1 Revenue. This is because the requested data (revenue by month) is at a lower level than what is contained in the aggregate tables. The aggregate tables do not contain the data and, therefore, the detail tables are used in the query. This aggregate navigation is controlled by the aggregate content levels you set in the logical table sources.
-
Sign out of Oracle BI. Click Leave Page when prompted about navigating away from this page. Leave the Oracle BI browser page open.
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 or in end-user analyses. At run time, Oracle BI Server substitutes the value of the variable.
In this set of steps you create a new Initialization Block - Current Periods, and three new Dynamic Repository Variables - CurrentYear, CurrentMonth, and CurrentDay. You then use the variables as column filters in an Oracle BI analysis. You use the Variable Manager in the Administration Tool to define variables and initialization blocks.
To set up and use initialization blocks and variables, perform the following steps:
- Creating an Initialization Block
- Creating Variables
- Testing Your Work
Creating an Initialization Block
-
Open the BISAMPLE repository in offline mode.
Select Manage > Variables to open the Variable Manager.
-
Select Action > New > Repository > Initialization Block.
-
Name the initialization block Current Periods.
-
Click the Edit Data Source... button to open the Repository Variable Initialization Block Data Source dialog box.
-
Click the Browse button to open the Select Connection Pool dialog box.
-
Double-click the Connection Pool object to select it.
The connection pool is added.
-
Enter the following SQL to determine the value of the current day, month, and year by finding the maximum value of the period key (BILL_DAY_DT) in the fact table:
SELECT CALENDAR_DATE, PER_NAME_MONTH, PER_NAME_YEAR FROM BISAMPLE.SAMP_TIME_DAY_D WHERE CALENDAR_DATE = (SELECT MAX(BILL_DAY_DT) FROM BISAMPLE.SAMP_REVENUE_F)
-
Click Test and confirm the expected results are returned. In this example, the results are determined by the data in the sample database used for this tutorial, which holds data through December 2010.
-
Close the Results window.
-
Click OK to close the Repository Variable Initialization Block Data Source dialog box. Check your work:
Creating Variables
-
Click Edit Data Target to open the Repository Variable Initialization Block Variable Target dialog box.
-
Use the New button to create three new variables: CurrentDay, CurrentMonth, CurrentYear. The order is important. The value returned from the first column in the initialization block SQL, CALENDAR_DATE, is assigned to the CurrentDay variable. The value of the second column, PER_NAME_MONTH, is assigned to CurrentMonth (the second variable), and the value of the third column, PER_NAME_YEAR, is assigned to CurrentYear (the third variable). If necessary, use the Up and Down buttons to arrange the variables.
-
Click OK to close the Repository Variable Initialization Block Variable Target dialog box.
-
Leave the default Refresh Interval set to every hour. This means that the variables will be reinitialized every hour.
-
Click the Test button and check the results:
-
Close the Results window.
-
Click OK to close the Repository Variable Initialization Block dialog box.
-
Check your work in the Variable Manager
-
Close the Variable Manager.
-
Save the repository and check consistency. Fix any errors or warnings before proceeding.
-
Close the repository. Leave the Administration Tool open.
Testing Your Work
-
Return to Oracle Enterprise Manager and load the BISAMPLE repository.
-
Return to Oracle BI and sign in.
-
Create the following analysis to test the variables.
Time.Per Name Year
Time.Per Name Month
Time.Calendar Date
Base Facts.Revenue -
Click Filter for the Per Name Year column. The New Filter dialog box opens.
-
Select Add More Options > Repository Variable.
-
In the Repository Variable field, enter CurrentYear to create a filter for the Per Name Year column using the CurrentYear repository variable.
-
Click OK to close the New Filter dialog box. The filter is added to the Filters pane.
-
Repeat the steps to add the CurrentMonth and CurrentDay repository variables as filters for Per Name Month and Calendar Date columns, respectively.
-
Click Results and confirm that data only for the current year, month, and day is returned (based on the sample data set).
-
Sign out of Oracle BI. Click Leave Page when prompted about navigating away from this page. Leave the Oracle BI browser page open.
Creating Time Series Measures
In this topic you create time series calculation measures using Oracle BI time series functions.
Time series functions include AGO, TODATE, and PERIODROLLING. These functions let you use Expression Builder to call a logical function to perform time series calculations instead of creating aliases for physical tables and modeling logically. The time series functions calculate AGO, TODATE, and PERIODROLLING functions based on the calendar tables in your data warehouse, not on standard SQL date manipulation functions.
To create time series measures, you perform the following steps:
- Identifying a Logical Dimension as a Time Dimension
- Identifying Level Keys as Chronological Keys
- Creating a Measure Using the AGO Function
- Creating a Measure Using the TODATE Function
- Creating a Measure Using the PERIODROLLING Function
- Testing Your Work
Identifying a Logical Dimension as a Time Dimension
-
Return to the Administration Tool and open the BISAMPLE repository in offline mode.
-
In the BMM layer, double-click the H1 Time logical dimension to open the Logical Dimension dialog box.
-
In the Structure section, select Time.
-
Click OK to close the Logical Dimension dialog box.
Identifying Level Keys as Chronological Keys
-
Expand the H1 Time logical dimension and double-click the Time Detail level to open the Logical Level dialog box.
-
Click the Keys tab.
-
Select the Chronological Key check box for Calendar Date.
-
Click OK to close the Logical Level dialog box.
-
Repeat and set chronological keys for the following levels:
Logical LevelChronological KeyYear Per Name Year Half Per Name Half Quarter Per Name Qtr Month Per Name Month Week Per Name Week It is best practice to designate a chronological key for every level of a time logical dimension.
Creating a Measure Using the AGO Function
-
Right-click the F1 Revenue logical table and select New Object > Logical Column.
-
On the General tab, name the column Month Ago Revenue.
-
On the Column Source tab, select "Derived from existing columns using an expression".
-
Open the Expression Builder.
-
Select Functions > Time Series Functions > Ago.
-
Double-click Ago or click Insert selected item to add the Ago function to the Expression Builder.
-
Click <<Measure>>in the expression.
-
Select Logical Tables > F1 Revenue and then double-click Revenue to add it to the expression.
-
Click <<Level>> in the expression.
-
Select Time Dimensions > H1 Time and then double-click Month to add it to the expression.
-
Click <<Number of Periods>> and enter 1. The Ago function will calculate the Revenue value one month before the current month.
-
Click OK to close the Expression Builder. Check your work in the Logical Column dialog box:
-
Click OK to close the Logical Column dialog box. The Month Ago Revenue time series measure is added to the F1 Revenue logical table.
-
Drag the Month Ago Revenue logical column to the Base Facts presentation folder.
Creating a Measure Using the TODATE Function
-
Right-click the F1 Revenue logical table and select New Object > Logical Column.
-
On the General tab, name the new logical column Year To Date Revenue.
-
On the Column Source tab, select "Derived from existing columns using an expression".
-
Open the Expression Builder.
-
Select Functions > Time Series Functions and double-click ToDate to insert the expression.
-
Click <<Measure>> in the expression.
-
Select Logical Tables > F1 Revenue and then double-click Revenue to add it to the expression.
-
Click <<Level>> in the expression.
-
Select Time Dimensions > H1 Time and then double-click Year to add it to the expression.
-
Click OK to close the Expression Builder.
-
Check your work in the Logical Column dialog box.
-
Click OK to close the Logical Column dialog box.
-
Drag the Year To Date Revenue logical column to the Base Facts presentation folder.
Creating a Measure Using the PERIODROLLING Function
-
Right-click the F1 Revenue logical table and select New Object > Logical Column.
-
On the General tab, name the new logical column Revenue 3-Period Rolling Sum.
-
On the Column Source tab, select "Derived from existing columns using an expression".
-
Open the Expression Builder.
-
Select Functions > Time Series Functions and double-click PeriodRolling to insert the expression.
-
Click <<Measure>> in the expression.
-
Select Logical Tables > F1 Revenue and then double-click Revenue to add it to the expression.
-
Click <<Starting Period Offset>> in the expression.
-
Enter -2. This identifies the first period in the rolling aggregation.
-
Click <<Ending Period Offset>>.
-
Enter 0. This identifies the last period in the rolling aggregation.
These integers are the relative number of periods from a displayed period. In this example, if the query grain is month, the 3 month rolling sum starts two months in the past (-2) and includes the current month (0).
-
Click OK to close the Expression Builder.
-
Check your work in the Logical Column dialog box.
-
Click OK to close the Logical Column dialog box.
-
Drag the Revenue 3-Period Rolling Sum logical column to the Base Facts presentation folder.
-
Save the repository and check consistency. Fix any errors or warnings before you proceed.
-
Close the repository. Leave the Administration Tool open.
Testing Your Work
-
Return to Oracle Enterprise Manager and load the BISAMPLE repository.
-
Return to Oracle BI and sign in.
-
Create the following analysis to test AGO and TODATE functions:
Time.Per Name Month
Time.Per Name Year
Base Facts.Revenue
Base Facts.Month Ago Revenue
Base Facts.Year to Date Revenue -
Set the following filter for the analysis:
Per Name Year is equal to / is in 2008.
-
For the Per Name Year column, select Column Properties > Column Format > Hide. This will prevent Per Name Year from displaying in the analysis results.
-
Sort Per Name Month in ascending order.
-
Click Results.
-
Create the following new analysis and filter to test the PERIODROLLING function at the month grain:
Time.Per Name Month
Time.Per Name Year
Base Facts.Revenue
Base Facts.Revenue 3-Period Rolling SumPer Name Year is equal to / is in 2008
-
For the Per Name Year column, select Column Properties > Column Format > Hide. This will prevent Per Name Year from displaying in the analysis results.
-
Sort Per Name Month in ascending order.
-
Click Results.
-
Create the following new analysis and filter to test the PERIODROLLING function at the year grain:
Time.Per Name Year
Base Facts.Revenue
Base Facts.Revenue 3-Period Rolling Sum -
Sort Per Name Year in ascending order.
-
Click Results.
Summary
In this tutorial, you have learned how to:
- Build the three layers of a Oracle BI repository
- Test and validate an Oracle BI repository
- Manage logical table sources
- Create simple measures and calculation measures
- Create logical dimensions with level-based hierarchies
- Create level-based measures
- Create logical dimensions with parent-child hierarchies
- Create logical dimensions with ragged and skipped-level hierarchies
- Use aggregates to improve query performance
- Use initialization blocks and variables
- Create time series measures
Resources
Credits
- Original Author: Jim Sarokin
- Curriculum Developer for 11.1.1.7 Update: Syed Khairulla
- Other Contributors: Kasturi Shekhar
To navigate this Oracle by Example tutorial, note the following:
- Topic List:
- Click a topic to navigate to that section.
- Expand All Topics:
- Click the button to show or hide the details for the sections. By default, all topics are collapsed.
- Hide All Images:
- Click the button to show or hide the screenshots. By default, all images are displayed.
- Print:
- Click the button to print the content. The content that is currently displayed or hidden is printed.
To navigate to a particular section in this tutorial, select the topic from the list.