Friday, July 13, 2012

Configuring and Customizing Map Viewer - OBIEE 11G


Download NAVTEQ sample data from the below path:

http://www.oracle.com/technetwork/middleware/mapviewer/downloads/navteq-lic-168395.html
Link to download or buy map data from different vendors:

Step 1: Download NAVTEQ data

Go to the below link:
Create a folder c:\Sample_data and extract or unzip the contents of both the file into this folder location.

Step 2: Connecting to SQLPLUS

Go to command prompt, and login as ‘Sysdba’ to run the scripts as shown below:
Unfortunately I do not have the screenshots for few other steps to execute the sql file, but I will initially show the screenshot of all files which I have used to import data:

Step 3: Create OBIEE_ NAVTEQ user

 First run ‘OBIEE_NAVTEQ_USER.sql’ file which would create obiee_navteq user [screenshot shown below”]:
How to run the above sql file?
Since you have already connected to SQLPLUs in step 3, you can run the above command: ‘@OBIEE_NAVTEQ_USER.sql’ and it should create the user. In case you experience any issues, then run the commands within the sql files individually
-          CREATE USER obiee_navteq IDENTIFIED BY obiee_navteq DEFAULT TABLESPACE USERS QUOTA UNLIMITED ON USERS ;
-          GRANT "CONNECT" TO obiee_navteq;
-          GRANT "RESOURCE" TO obiee_navteq;

Step 4: Import NAVTEQ data dump

Run the script ‘setup_sample_data.sql’ file to load/ import data into ‘obiee_navteq’.
You can see the import of data happening once you press ‘Enter key’, but you can also see some warnings towards the end of the sql related to “gcbc_sales “ which you can ignore for now.
You can use GCBC_SALES if you want to use the Oracle provided data and RPD to implement this map viewer. This would even simplify your job since you would not need to configure an RPD nor require data to see your map in OBIEE.

Once the above import is successful you can login to database using ‘obiee_navteq/obiee_navteq’ to check the data.
 You can also try querying few tables’ likes: OBIEE_COUNTRY, OBIEE_STATE and OBIEE_CITY and get used to the data.

Step 5: Building corresponding Site/City/Country table in your data model

Now you need to have a table in your database which stores ‘Site’ or ‘City’ information. This would need to be mapped to the state/city table in OBIEE_NAVTEQ.

In my analysis, I have imported NAVTEQ data in my local DB server and RPD created on some remote database which has client site data. Unfortunately the client site is a combination of City and States and cannot be directly mapped to Navteq data.
I am trying to customize the Navteq data to map that with my client site data and populate data based on my client site. This would be little bit challenging but let us give a try.
I configured my RPD with a fact and few other dimensions which has a customer SITE_MAP_VIEWER table:
Make sure the above dimension table is joined to the fact and is exposed in presentation layer.

Step 6: Login to MAP VIEWER

Log into map viewer with the below URL:

Step 7: Configure MAP VIEWER

Click on Admin link and then ‘Configuration Link’ as shown below:
 Search for ‘map_data_source’ and place the below statements [make sure we remove the comments section indicated using     <!--        à:
 <map_data_source name="obiee_navteq_sample"
                   jdbc_host="localhost"
                   jdbc_sid="orcl"
                   jdbc_port="1521"
                   jdbc_user="obiee_navteq"
                   jdbc_password=enter password
                   jdbc_mode="thin"
                   number_of_mappers="3"
                   allow_jdbc_theme_based_foi="false"
   />
Click on “Save and Restart” button towards the bottom…

Click on ‘Data Sources’ and you will see the screen as:

Select ‘OBIEE_WORLD_MAP’ and click on ‘Bring online’ button:

You will see the below message:

Step 8: Configure MAP VIEWER in OBIEE Administration

Now login to OBIEE answers and click on ‘Administration’ link and ‘Manage Map Data’ link:

Select ‘OBIEE_COUNTRY’ and ‘CITIES’ map as shown in the below screen:

Select ‘OBIEE_WORLD_MAP’ and click on ‘OK’:

Click on ‘Edit Background Map’ and select the maps as shown below:

I have added the below map for reporting purpose:

Step 9: Mapping Map Layer and BI Key

Map your client db Site table to Map viewer column as shown below:
Similarly select ‘OBIEE_COUNTRY’ map and assign the corresponding key.

Step 10: Create report with MAP

Go to answers and create a report with Site Column and other measures. Select Map View and you will be able to see your metric value represented within the site map.
Map viewer is functional now and you can play around with the properties…

You can have tooltip text to indicate values of metrics, and even shapes as shown below [the size of the shapes would vary based on the metric values]:

Hope this guide helps you in configuring map viewer successfully. Please leave your comments and let me know if you have any questions. If you want to do more customization's on the map, do leave your comments and I can try to help you out.




















3 comments:

  1. Hi Sudeep, thanks for the detailed steps..
    But I am stuck at a point..While importing layers, I dont see any layers in the 'Available Layers' combo box after selecting my Datasource in 'Look in' combo.What can be the reason?

    I also tried used the 'world sample' data from OTN, but m facing the same issue there also..

    Can u pls help..Thanks!

    ReplyDelete
  2. Sumeet,

    Did you solve this issue.I am getting same issue.Can you please help me on this.

    ReplyDelete
  3. awsome piece of information, I had come to know about your website from my friend vinod, indore,i have read atleast seven posts of yours by now, and let me tell you, your blog gives the best and the most interesting information. This is just the kind of information that i had been looking for, i'm already your rss reader now and i would regularly watch out for the new posts, once again hats off to you! Thanks a ton once again, Regards, obiee training in hyderebad

    ReplyDelete