This tutorial covers how to create a replacement data model for Impact Manager when database tables are consolidated.
This tutorial covers the following topics:
|Adding Consolidated Topics to Data Models|
|Creating Meta Topics|
Click icon to show all screenshots
Note: Alternatively, you can click an individual icon (or image) associated with each step to view (or hide) the screenshot associated with that step.
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.
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.
Before starting this tutorial, you should:
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.||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.
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:
In Interactive Reporting Studio, open BMV Datamodel.bqy.
On the Status bar, double-click the connection icon .
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.
Next to Tables in the Table catalog, click the plus sign to view the list of database tables.
Scroll down the list of tables, right-click storesregions, and select Add Selected Items.
In the Content pane, join Store Key in the Storesregions topic to Store Key in the Sales Fact topic.
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:
In the Content pane, right-click the Stores topic, and select Remove.
The Stores topic is removed from the BMV data model.
In the Content pane, right-click the Regions topic, and select Remove.
The Regions topic is removed from the BMV data model.
In Interactive Reporting Studio, select DataModel > Add Meta Topic.
The Topic Properties dialog is displayed.
In the Topic Name box, enter Stores, and click OK.
An empty Stores meta topic is displayed in the Content pane.
Select DataModel > Add Meta Topic.
The Topic Properties dialog is displayed.
In the Topic Name box, enter Regions, and click OK.
An empty Regions meta topic is displayed in the Content pane.
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.
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.|
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|
To learn more about Impact Manager, you can refer to other OBEs in this series on the OTN Web site:
|OBE 1: Harvesting Meta Data in Documents|
|OBE 2: Accommodating Database Table and Column Name Changes|
|OBE 3: Accommodating Denormalization of Database Tables (Currently displayed)|
|OBE 4: Accommodating Deleted Columns in Databases|
|OBE 5: Identifying Impacted Documents|
|OBE 6: Replacing Data Models in Impacted Documents|