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

Overview

This tutorial covers how to create a replacement data model, for use by Impact Manager, for Interactive Reporting documents in Workspace when database tables are consolidated. To do this, you add the new consolidated tables to the original data model. You also add meta topics to represent the tables that no longer exist in the database. Back to Topic List

Scenario

The BMV data model continues to be used in your organization. Recently, the database administrator consolidated tables. Two of the tables used in the data model are affected by this change - the STORES and REGIONS tables. Now there is only one table, named STORESREGIONS, instead of two:

You must update the data model to accommodate this table denormalization. To do this, you first need to add the Storesregions topic to the BMV data model and update the joins. Second, you need to create two meta topics from the Storesregions topic to represent the former Stores and Regions topics. Back to Topic List

Prerequisites

Before starting this tutorial, you should: 1. 2. Ensure that Interactive Reporting Studio is installed on your computer . Ensure that you have access to the Bookmart sample data in Oracle. To connect to this data source, use the Bookmart Sample Database.oce and provide the user name trnadmin and the password oracle.

3.

4.

Open Create_StoresRegions_Table.bqy and process the Query results to a database table in Oracle. This features creates a table named TRNADMIN.STORESREGIONS in Oracle with data combined from the STORES and REGIONS tables. In Oracle, drop the STORES and REGIONS tables. Ensure that you have access to the data model BMV Datamodel.bqy, which you modified in OBE 2: Accommodating Database Table and Column Name Changes. Back to Topic List

Adding Consolidated Topics to Data Models

The first step in updating data models after table consolidation in the database is to add topics to the original data model. For the BMV data model, you need to add the Storesregions topic. Next, you need to configure the joins between the Storesregions and the Sales Fact topics. If you have the Auto Join feature enabled in Interactive Reporting Studio, you should disable it while you add the consolidated table. This prevents several unwanted joins that you would later have to manually remove one by one. To add the Storesregions topic to the data model: 1. In Interactive Reporting Studio, open BMV Datamodel.bqy.

2.

On the Status bar, double-click the connection icon .

3.

In the Host User box, enter trnadmin. In the Host Password box, enter oracle. Click OK.

You are now connected to the Bookmart Sample Database.

4.

Next to Tables in the Table catalog, click the plus sign to view the list of database tables.

5.

Scroll down the list of tables, right-click storesregions, and select Add Selected Items.

6.

In the Content pane, join Store Key in the Storesregions topic to Store Key in the Sales Fact topic.

Back to Topic List

Creating Meta Topics

Meta topics are a semantic layer in a Query section that represent data model topics. In Interactive Reporting data models, data model developers often use meta topics to mask the complexity of joins and topics for users. In this case, you need to use meta topics to continue a semantic layer defined in other documents, from which queries and reports are built. When Impact Manager updates Workspace documents with an updated data model, it confirms that all original topics and items are still defined in the new data model. If some are missing, it informs you that it cannot proceed with the update operation. Therefore, you need to create two meta topics to represent the former Stores and Regions topics. You populate the meta topics with items from the new Storesregions topic.

Although it is not necessary, you can keep the original topics in the data model until after you have created the meta topics. It makes populating the meta topics easier because you have the original topics as a reference. You do, however, have to provide alternative meta topic names because you cannot have the meta topics and the original topics sharing the same names. After the original topics are removed from the data model, you can rename the meta topics to match the original topic names. In the case of the BMV data model, you can remove the original topics (Stores and Regions) prior to adding the meta topics because the meta topic items are easily identified in the Storesregions topic. To create the Stores and Regions meta topics: 1. In the Content pane, right-click the Stores topic, and select Remove.

The Stores topic is removed from the BMV data model.

2.

In the Content pane, right-click the Regions topic, and select Remove.

The Regions topic is removed from the BMV data model.

3.

In Interactive Reporting Studio, select DataModel > Add Meta Topic.

The Topic Properties dialog is displayed.

4.

In the Topic Name box, enter Stores, and click OK.

An empty Stores meta topic is displayed in the Content pane.

5.

Select DataModel > Add Meta Topic.

The Topic Properties dialog is displayed.

6.

In the Topic Name box, enter Regions, and click OK.

An empty Regions meta topic is displayed in the Content pane.

7.

In the Storeregions topic, select Store Key and all items from Store Name down to Sqft, and drag the items to the Stores meta topic. The Stores meta topic is populated with the items from the Storesregions topic.

8.

In the Storesregions topic, select Region Key, Region, Territory, and Country. Drag the items to the Regions meta topic. The Regions meta topic is populated with the items from the Storesregions topic.

You have completed updating the BMV data model to accommodate the denormalization of the Stores and Regions tables in the Bookmart Sample Database.

9.

Save BMV Datamodel.bqy.

Back to Topic List

Summary

In this tutorial, you learned how to perform these tasks: Add consolidated topics to existing data models Create meta topics to represent deleted database tables

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