OBIEE 10G - Generating and Deploying a Metadata Dictionary

About

When using Oracle BI, you might need to obtain more information about metrics or attributes for repository objects.

For example, you might need to resolve issues caused by confusing metadata object names or to obtain more details when an attribute is derived in a complicated way. A metadata dictionary can help you resolve conflicting information and understand the metrics and attributes of repository objects.

A metadata dictionary is a static set of XML documents. Each XML document describes a metadata object such as a physical table or a logical column, including its properties and relationships with other metadata objects.

Installation

The installation process involve 2 steps :

  • to define the location of the XML files on the webserver
  • to generate the XML files

Web Server location

When you generate the dictionary, you can set the output location to the final location (on the web server) or to a temporary location.

OC4J Web Server

In a basic installation of OC4J on Windows, you will find the root directory of Analytic in this directory :

OracleBI_Home\oc4j_bi\j2ee\home\applications\analytics\analytics

You can check it in the file OracleBI_Home\oc4j_bi\j2ee\home\config\default-web-site.xml.

<?xml version="1.0"?>

<web-site xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/web-site-10_0.xsd"  port="9704" display-name="OC4J 10g (10.1.3) Default Web Site" schema-major-version="10" schema-minor-version="0" > 
	<default-web-app application="default" name="defaultWebApp" />
	<web-app application="system" name="dms0" root="/dmsoc4j" />
	<web-app application="system" name="dms0" root="/dms0" />
	<web-app application="system" name="JMXSoapAdapter-web" root="/JMXSoapAdapter" />
	<web-app application="default" name="jmsrouter_web" load-on-startup="true" root="/jmsrouter" />
	<web-app application="javasso" name="javasso-web" root="/jsso" />
	<web-app application="ascontrol" name="ascontrol" load-on-startup="true" root="/em" ohs-routing="false" />
	<web-app application="analytics" name="analytics" load-on-startup="true" root="/analytics" />
	<web-app application="bioffice" name="bioffice" load-on-startup="true" root="/bioffice" />
	<web-app application="xmlpserver" name="xmlpserver" load-on-startup="true" root="/xmlpserver" />
	<web-app application="xwiki" name="xwiki-enterprise-web-1.4.1" load-on-startup="true" root="/xwiki" />
	<web-app application="mapviewer" name="web" load-on-startup="true" root="/mapviewer" />
	<web-app application="Map" name="Map" load-on-startup="true" root="/Map" />
	<access-log path="../log/default-web-access.log" split="day" />
</web-site>

The root element contain the root directory of each application from the directory “OracleBI\oc4j_bi\j2ee\home\applications\NameOfTheApplication”.

IIS virtual directory

If you want to use an IIS virtual directory, you can create or select a virtual directory in IIS before you generate the dictionary. When you generate the dictionary, choose the physical directory associated with the IIS virtual directory.

Generating a Metadata Dictionary

To generate the metadata dictionary

  1. Open the repository in Offline mode (or copy the repository in online mode). You cannot generate the metadata dictionary in Online mode.
  2. From the Tools menu, choose Utilities > Generate Metadata Dictionary, and then click Execute.
  3. In the Choose Directory dialog box, click Browse to locate and select the location where you want to store the dictionary.
  4. You should receive the following message: Metadata dictionary has been successfully created in [drive]:\[path]\
  5. Click OK.
  6. Copy the complete generate directory in your web server location.

Best practices include keeping repository names to less than 156 characters in order to prevent truncated URLs. After you generate a metadata dictionary, style sheets and index files are created for that dictionary. The related style sheets (XSL files) are created and stored in the following location:

For example, with :

  • a temporary generation location as C:\temp\
  • a repository name as sh.rpd,
  • a web server location as “OracleBI\oc4j_bi\j2ee\home\applications\analytics\analytics”.

The dictionary files, including the style sheets, will be located in the following location:

C:\temp\sh\

And you must copy the complete directory (in our example sh) in :

OracleBI\oc4j_bi\j2ee\home\applications\analytics\analytics

Testing the web server location

In our example below, if you tape in the address bar of a web browser this address :

http://ObieeIpServer:9704/analytics/sh/TreeIndex.xml

You must be able to see the tree index page of the metadata dictionnary:

The Url with OC4J is case sensitive. treeindex.xml will not work. You must tape TreeIndex.xml

The Xml Metadata Dictionnary Files

On the root directory of the XML generated, you will find two files :

  • NameIndex.xml which allows you to search for repository objects by name.
  • TreeIndex.xml which allows you to drill down from top-level objects to the object that you want to view.

Each index file contains a link to the other so that you can quickly switch views.

Presentation Service Configuration

Now to made Presentation Service aware of the metadata dictionary, we need to add the web server location of the metadata dictionary in the instanceconfig.xml file by adding the node SubjectAreaMetadata. It should be added under the “ServerInstance” node.

In our example :

<SubjectAreaMetadata> 
<DictionaryURLPrefix>/analytics/sh/</DictionaryURLPrefix> 
</SubjectAreaMetadata> 

Recommendation of the documentation :

<SubjectAreaMetadata> 
<DictionaryURLPrefix>/analyticsres/dictionary/</DictionaryURLPrefix> 
</SubjectAreaMetadata> 

Make this configuration change, then restart Presentation Services to use this feature.

For a Web server that is not being used by Oracle BI EE, you can give an URL that points to the directory in which you have stored the XML files For example:

<DictionaryURLPrefix>http://10.10.10.10/metadictionary/demo1</DictionaryURLPrefix>

How to access the metadata dictionnary from Answers

After have made the change in the configuration file and restart the presentation service, you will be able to see in Answers area on the right of each column, table and cube an new icon. A click on this icon will present you the Xml data dictionary associated.

Security / Privilege

Access to the Metadata Dictionary through Oracle BI Answers can also be administered using a new Access to Metadata Dictionary privilege.

How to generate periodically to update the content

The dictionary does not change dynamically as repository changes are made.

Therefore, you will need to generate manually or automatically the dictionary periodically to update the content.

The automatic generation can be easily set up with the help of the OBIEE 10G/11G - Administration Tool (admintool, datamodel) command.

First Step : You must create a command file. For instance MetaDataExport.txt

    Open repository.rpd AdministratorLogin AdministratorPassword
    Hide
    GenerateMetadataDictionary {\MetadataDictionaryFolder}
    Close
    Exit

Second step : Create a scheduler command as a bat file on Windows

    OracleBI_Home\server\Bin>admintool /command DirectoryOfYourFile/MetaDataExport.txt

Reference


Powered by ComboStrap