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

Business Intelligence – Oracle

 Home
 About Me
 Contact Me
 Workshop Series
 Your Questions

 Category
o Acquisitions
o All Posts
o APEX
o Bi Publisher
o Coherence
o Conference
o Data Mining
o Data Modelling
o Database
o Enterprise Performance Foundation
o EPM
o General
o Hyperion Business Rules
o Hyperion DIM
o Hyperion Essbase
o Hyperion Financial Reporting
o Hyperion Shared Services
o Hyperion Web Analysis
o Hyperion Workspace
o Informatica
o Mapviewer
o OBI EE Plus
o OLAP
o Oracle 11g
o Oracle Data Integrator
o Oracle EPMA
o OWB
o Web Center Suite
 Top Posts
o Oracle BI EE 10.1.3.3 - Configuring Delivers - iBots
o Customizing OBI EE – GO URL Parameters
o Oracle BI EE 10.1.3.3/2 - Write Back Option - Budgeting/Planning
o Oracle BI EE 10.1.3.3/2 - Between Prompts for Date Columns - Using Presentation
Variables
o Oracle BI EE 10.1.3.3/2 - Using LDAP/OID Authentication
o Oracle BI Publisher and BI EE - Invisible Admin Tab!!!
o Customizing OBI EE - SOAP API
o Oracle BI EE 10.1.3.3/2 - Changing Administrator Passwords - Impact on BI
Scheduler and BI Publisher - Understanding Impersonation
o Oracle BI EE 10.1.3.3/2 - Calling Java Scripts and Java Classes from iBots
o Oracle BI EE 10.1.3.3/2 - Top 10 Common Errors
o Usage Tracking in OBI EE
o Your Questions
 Pages
o About Me
o Contact Me
o Workshop Series
o Your Questions
  
September 2007
M T W T F S S
« Aug   Oct »
  1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

 Archives
o June 2009
o May 2009
o April 2009
o March 2009
o February 2009
o January 2009
o December 2008
o October 2008
o September 2008
o August 2008
o July 2008
o June 2008
o May 2008
o April 2008
o March 2008
o February 2008
o January 2008
o December 2007
o November 2007
o October 2007
o September 2007
o August 2007
o July 2007

Search
 Bookmark

 About Me
I am Venkatakrishnan J, a Business Intelligence enthusiast working with Rittman Mead
Consulting who likes blogging about acquisitions in the BI space, technical workings of the
BI tools in general and Oracle Business Intelligence tools in particular. All the views
expressed here are my own and does not reflect the views of Rittman Mead Consulting or
Oracle. Going forward, i would be blogging at http://rittmanmead.com/blog.

 Blogroll
o Abhinav Agarwal
o Adrian Ward
o Alex
o Andriy Yakushyn
o Antonio Romero
o Asktom
o Borkur Steingrimsson
o Christian Berg
o David Aldridge
o Dimitri Gielis
o Doug Burns
o Eddie Awad
o Frank Buytendijk
o Howard Rogers
o John Goodwin
o John Minkjan
o Jonathan Lewis
o Justin Kestelyn
o Karthik
o Laurent Scheider
o MAIA Blog
o Marcos Campos
o Michael Armstrong-Smith
o Oracle OLAP Blog
o Pawel Barut
o Pete Finnigan
o Peter Scott
o Ramkumar Krishnan
o Rittman and Jon Mead
o Tim Dexter
o Tim Hall
o Tom Kyte
o Vlamis
 Subscribe
o Entries (RSS)
o Comments (RSS)
 Meta
o Register
o Log in
o Entries RSS
o Comments RSS
o WordPress.com
 Stats

« Oracle BI EE 10.1.3.3 and mapviewer – Step by Step Integration Phase2 / Phase3


Oracle BI EE 10.1.3.3/2 – Understanding Dates in Answers »

Oracle BI EE 10.1.3.3/2 – Changing logos in the Answers


Title View
Posted by Venkatakrishnan J on September 27, 2007

We had a question in one of our forums today, wherein the question was “How do we add a custom
picture as a logo to a reports Title View?”. Though it is very much documented, i am not sure
whether it works the same way as documented. Lets see how to go adding a custom oracle logo to
the Answers Title View. The first step that one would have to do is, copy the image to 2 folders.

1.   {OracleBI}\web\res\app\s_oracle10\images

2.   {OracleBI}\oc4j_bi\j2ee\home\applications\analytics\analytics\res\s_oracle10\images

I am assuming that you are using the default style of s_oracle10. Restart your presentation services
and the OC4J.Then open a report where you would like to add the image to and click on the edit
title view.

      
In order, to use the images in the title view, one would have to enter the relative path of the image
that we just copied. It would look like this

fmap:images/oralogo_small.gif

fmap is a keyword and is case sensitive. Then we are good to go. Let me know if anyone has got
their title views working by following the documentation.

      

This entry was posted on September 27, 2007 at 6:30 pm and is filed under All Posts, OBI EE Plus.
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or
trackback from your own site.

Like
Be the first to like this post.

13 Responses to “Oracle BI EE 10.1.3.3/2 – Changing logos in the Answers


Title View”

1.

Salini Paola said


October 15, 2007 at 9:16 am

Hi,
the first folders, for me, is:

{OracleBI}/web/app/res/s_oracle10/images

Thanks very much for the information.


Paola

Reply
2.

Andrew Cox said


November 26, 2007 at 10:29 am

Venkat,

Two things I wanted to ask, that you have likely been asked already.

1) The Images are practically unreadbale. Does this site have any way of making the images
clearer? Even when I try and magnify the images, the view is still blurred and the values
unreadable.

2) It would be nice sometimes to print out a Blog … however, I get a lot of waste. Is there a
way to print the Blog section only and not the surrounding information which is not
relevant?

Thanks,

Andy

Reply

3.

Venkatakrishnan J said
November 26, 2007 at 10:37 am

Andy,

Thanks for letting me know. I am planning to make all the content available in print and
PDF format so that both the issues are sorted out. I will make a notification on this blog as
soon as that feature is enabled.

Venkat

Reply

4.

Andrew Cox said


November 26, 2007 at 11:03 am

Thanks for the prompt response.

I have solved my magnification issue. I found that if I wait 20 seconds, the image does
eventually become clear. Must just be a performance issue with the browser.
One last question (if I may) …. I often read these Blogs from the emails you send out on the
helpBI forums, however, this takes me straight to a specific Blog.

How can I get to a Screen which shows all the Blogs and allows me to easily see what is
available. When I click ALL POSTS I seem to get chunks of 4/5 blogs per page and not a
general overview.

The TOP POSTS is useful, but I sometimes want to see all of the Links available.

Thanks again,

Andy

Reply

5.

Venkatakrishnan J said
November 26, 2007 at 11:37 am

Andy,

I will see how i can get the Hyperlinks of all the posts into one page. Once i get that i will
add another page to this blog which would have all the hyperlinks in a single page(rather
than the entries themselves).

Venkat

Reply

6.

Trent Graham said


January 19, 2008 at 5:09 pm

Hi,

I’d like to add new arrows and flags… so I added gif images (by copying existing and
changing the color) to:
D:\OracleBI\web\app\res\s_oracle10\meters\arrow
and
D:\OracleBI\web\app\res\s_oracle10\meters\icon\rc

when I do, the new flags and arrows are not displayed…

BTW: I’m on a windows platform…

Reply
7.

Hassan said
April 17, 2008 at 1:36 pm

Thanks Venkat,

I was some days busy with this problem en with your help it is solved,

Regards,
Hassan

Reply

8.

abhilash said
June 16, 2008 at 11:28 am

Had Copied 3 icons in folders two of them work but third one doesn’t work. But the point to
be noted is when I specify
fmap:images/good_news.gif
is shows up in conditional formatting window but the same doesn’t appear in the dashboard.
I tried every thing from
clearing my browser cache
disabled OBIEE Caching in NQSconfig
changed the images to .jpg format

Reply

9.

Mohammad said
July 4, 2008 at 4:06 pm

Hi Venkat,
Is there is way to make the logo as a template and not to have load individually with every
report?
Thank you,
Mohammad Farhan Alam

Reply

10.

Michael K said
July 17, 2008 at 6:56 pm

I also cannot get an image to display in a title view, following these instructions.

New, basic, default install of 10.1.3.3.3 on Linux with OC4J.

Reply

dpaus said
July 28, 2009 at 6:16 am

Hi Michael,

Did you ever resolve this? I am gettign the same issue.

DP

Reply

11.

Igor said
March 25, 2009 at 6:58 pm

Hi,
is there any progress in solving this issue? I tried everything recommended above but with
no success.
I have default install 10.1.3.4 on Windows XP.
What is strange, I managed somehow insert 3 icons but no other else. (?)
Thank you,
Igor

Reply

12.

Sharmin said
February 12, 2010 at 6:47 am

I created a report as it is told above.


I am able to see the image when I add the “Link or Image” dashboard object and if I give
image text as “fmap:images/1.jpg”. I even tried the “\analytics\images\1.jpg”. But I do not
want to drag and drop this to all the dashboards. So how can I make it in one report and
drag and drop that report to every where. I might have to change the image every quarter of
the year and have more than 30 reports. So if I modify the report it would be reflected
everywhere.
Thanks,
Sharmin

Reply

Leave a Comment

Your email address will not be published. Required fields are marked *

Name *

Email *

Website

Comment

You may use these HTML tags and attributes: <a href="" title=""> <abbr title="">
<acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del
datetime=""> <em> <i> <q cite=""> <strike> <strong>

Post Comment 144 0

1297409022

Notify me of follow-up comments via email.

Send me site updates

comment-form-te

ff835791ca

« Oracle BI EE 10.1.3.3 and mapviewer – Step by Step Integration Phase2 / Phase3


Oracle BI EE 10.1.3.3/2 – Understanding Dates in Answers »
 
Blog at WordPress.com. | Theme: Andreas09 by Andreas Viklund.
Archive for August, 2007
« Previous Entries

Oracle Warehouse Builder 11g/10g – Ebusiness


Suite Connector
Posted by Venkatakrishnan J on August 31, 2007

I was speaking to one of the users of OWB yesterday and the conversation drifted towards the
Ebusiness Suite connector that OWB 11g/10g provides to the end users. The user wanted to know
how is the ebusiness connector different from a normal connection to an oracle database? It made a
lot of sense to me considering the fact that OWB connector does not provide out of the box ETL
mappings (based on business modules in ebusiness suite like BI Applications) to a target
warehouse. The only way to find that out was to use the connector and see what it does differently.
I did exactly that and thought that this deserves a blog entry in itself. Ebusiness suite connector
does a lot of things other than connecting to the ebusiness database. It logically groups all the tables
according to the business functions.

The first step i did was to create a connection to an ebusiness suite database using the Application
module. The connection details would be exactly same as what you would give for an oracle
database.

         

         

         

Once the connection details are specified, the connector gives a window that would look like this
         

As you see above, the connector provides 2 options. First one is an option where in one can choose
a business domain and the 2nd one is an option similar to an ordinary table import wizard from a
schema. The 1st one is the one that is unique to the connector i.e identifying and segregating the
tables based on the business modules. The business modules would look like this

         

In our illustration i would choose the Order Entry (OE) module and import all the tables under that.

         

         

As you see above, the connector helps a developer in working on the tables that are specific to his
module. It reduces a lot of effort, considering the fact that ebusiness suite has a huge number of
tables. Apart from making the life of a developer easy by segregating the tables and views, the
connector can also write back to an ebusiness suite instance. It can deploy objects to the concurrent
manager. One can use the ebusiness suite objects both in the mappings and also in the process
flows. One can access the documentation about the connectors here

Posted in All Posts, OWB | 9 Comments »

Oracle 10g/11g – OLAP, CUBE and ROLLUP


Posted by Venkatakrishnan J on August 30, 2007

If you had gone through the list of features in Oracle 11g, one of the most important
advancements/features in the BI space would be the introduction of Oracle OLAP as part of the DB
optimizer (in the form of MV query rewrite). But for users who do not have the luxury of using
Oracle OLAP 11g (or even 11g database) in their environment, dont lose hope yet . CUBE and
ROLLUP functions had undergone quite a few advancements in themselves while in 10g itself and
they can indeed mimic an OLAP cube starting from 10g. Let me just give an example here. All the
advances done in CUBE and ROLLUP functions are documented here. If you had gone through my
previous blog entry here on using OLAP 11g, i had used a specific example to create a cube. I
would be using the same one here.

Dimensions:

Customers:

      Hierarchy:   All      ->      Customer Gender      ->      Customer Name

Product:

      Hierarchy:   All   ->   Product Pack Size   ->   Product Name

Times:

      Hierarchy:   All   ->   Fiscal Year   ->   Fiscal Month   -> Fiscal Day

Measures:

      Quantity Sold

      Amount Sold

Oracle 10g/11g now supports Hierarchical cubes within queries. As you would know, ROLLUP is
a feature wherein one can have summed up data across a hierarchy. What is new in 10g & 11g is,
one can have multiple ROLLUPs (more like hierarchies) in the group by clause which in turn
would take a cartesian product of all the rollups in the group by clause. In order to get a cube like
data for the above measures and dimensions, the query would look like this

SELECT CUST_GENDER, CUST_FIRST_NAME||CUST_LAST_NAME, PROD_PACK_SIZE,


PROD_NAME, FISCAL_YEAR, FISCAL_MONTH_DESC, DAY_NAME,
SUM(QUANTITY_SOLD) AS QUANTITY, SUM(AMOUNT_SOLD) AS SALES
FROM
SALES a, CUSTOMERS b, PRODUCTS c, TIMES d
where
a.CUST_ID = b.CUST_ID and
a.PROD_ID = c.PROD_ID and
a.TIME_ID = d.TIME_ID
GROUP BY
ROLLUP(CUST_GENDER, CUST_FIRST_NAME||CUST_LAST_NAME),
ROLLUP(PROD_PACK_SIZE, PROD_NAME),
ROLLUP(FISCAL_YEAR, FISCAL_MONTH_DESC, DAY_NAME)

               

And the plan for the above query would be like this
              

The above generates the same set of data that Oracle OLAP produces. But of course, oracle OLAP
provides more features like partitioning and many more. This is just to kindle your interest on the
enhancements that have been made in this space. If you want to create a MV,

CREATE MATERIALIZED VIEW SALES_ROLLUP_MV


ENABLE QUERY REWRITE AS
SELECT CUST_GENDER, CUST_FIRST_NAME||CUST_LAST_NAME as
CUSTOMER_NAME, PROD_PACK_SIZE, PROD_NAME, FISCAL_YEAR,
FISCAL_MONTH_DESC, DAY_NAME, SUM(QUANTITY_SOLD) AS QUANTITY,
SUM(AMOUNT_SOLD) AS SALES
FROM
SALES a, CUSTOMERS b, PRODUCTS c, TIMES d
where
a.CUST_ID = b.CUST_ID and
a.PROD_ID = c.PROD_ID and
a.TIME_ID = d.TIME_ID
GROUP BY
ROLLUP(CUST_GENDER, CUST_FIRST_NAME||CUST_LAST_NAME),
ROLLUP(PROD_PACK_SIZE, PROD_NAME),
ROLLUP(FISCAL_YEAR, FISCAL_MONTH_DESC, DAY_NAME)

The above is called as a hierarchical cube. It does not store all the combinations like in a cube.
Instead it stores the rollup of data in the same hierarchy across different hierarchies. For example,
this cube will not generate value for sales when sales is analyzed by Customer Name, Product name
and Fiscal month since their actual path in the hierarchy is not specified.

 If one wants to generate an actual cube, the query would look like this

SELECT CUST_GENDER, CUST_FIRST_NAME||CUST_LAST_NAME, PROD_PACK_SIZE,


PROD_NAME, FISCAL_YEAR, FISCAL_MONTH_DESC, DAY_NAME,
SUM(QUANTITY_SOLD) AS QUANTITY, SUM(AMOUNT_SOLD) AS SALES
FROM
SALES a, CUSTOMERS b, PRODUCTS c, TIMES d
where
a.CUST_ID = b.CUST_ID and
a.PROD_ID = c.PROD_ID and
a.TIME_ID = d.TIME_ID
GROUP BY
CUBE(CUST_GENDER, CUST_FIRST_NAME||CUST_LAST_NAME),
CUBE(PROD_PACK_SIZE, PROD_NAME),
CUBE(FISCAL_YEAR, FISCAL_MONTH_DESC, DAY_NAME)

The above does not take care of best practices to create MVs or the queries. But this is just to show
the advancements that 10g/11g provides for an end user. Can anyone let me know whether these
were available in 9i? I believe in 9i, correct me if i am wrong here, one would not be able to create
MVs out of the queries using CUBE clause.
Update: CUBE and ROLLUP are features that were available from 8i. Thanks for the comments
Laurent.

Posted in All Posts, OLAP | 2 Comments »

OBI EE 10.1.3.3 and VPD


Posted by Venkatakrishnan J on August 29, 2007

I had one of the customers the other day asking for a step by step documentation for implementing
VPD using OBI EE. I thought i would compile one here since this was the first time i myself was
implementing VPD in OBI EE. There are many ways to implement VPD or role-based row level
access from within OBI EE. They are

1.   Setting the context when a connection is established and then using that context for
implementing VPD.
2.   Using proxy authentication
3.   Using variable username and passwords in the connection pools.
4.   Varying the where clause from within BI Server.

The above 4 are some of the ways that i could think of. Let me know if you come across some more
methods. In this article, we would be going through the steps for implementing VPD by setting the
contexts.

If you had gone through my previous article here on implementing VPD using proxy authentication
from BI Publisher, i would have blogged about a scenario of 2 users trying to access the same
employee table. We would be using the same scenario here. User ANALYST can see all the
records in the employee table and user EXECUTIVE can see only those records wherein Salary >
7000. The first step is to create a context. Context is something that logging applications can use to
identify themselves. I have a schema called VPD_ADMIN which would be the owner of all the
contexts and functions. ANALYST schema would hold the employees and the departments table.

As VPD_ADMIN:

CREATE OR REPLACE CONTEXT VPD_CONTEXT USING SET_CONTEXT_PROCEDURE;

For the sake of security, contexts cannot be set directly. They can be set only via a procedure. In
my case, i have created a context called VPD_CONTEXT that would be set by the procedure
SET_CONTEXT_PROCEDURE. The next step is to create the procedure that would set the
context.

create or replace procedure set_context_procedure


(
v_user in varchar2
)
is
begin
dbms_session.set_context(‘VPD_CONTEXT’,'USER_NAME’,v_user);
end set_context_procedure;

Here, the VPD_CONTEXT context has one attribute called USER_NAME that would be set from
within OBI EE. Once the procedure is created, the next step is to call this procedure from OBI EE.
Unfortunately, OBI EE cannot execute oracle procedures directly. In order to overcome this, we
will create a function that would call this procedure and then call the function as sql from within
OBI EE.

create or replace function set_context_function(v_user in varchar2)


return varchar2 is
begin
set_context_procedure(v_user);
return SYS_CONTEXT(‘VPD_CONTEXT’,'USER_NAME’);
end;

The next step is to create the function for implementing VPD. We will use the same
EXECUTIVE_APPLY function that we used earlier and modify it a little bit.

create or replace FUNCTION Executive_Apply (


p_schema IN VARCHAR2 DEFAULT NULL,
p_object IN VARCHAR2 DEFAULT NULL)
RETURN VARCHAR2
AS
BEGIN
if upper(SYS_CONTEXT(‘VPD_CONTEXT’,'USER_NAME’)) = ‘ANALYST’ then
RETURN ’1=1′;
else
IF upper(SYS_CONTEXT(‘VPD_CONTEXT’,'USER_NAME’)) = ‘EXECUTIVE’ THEN
return ‘salary > 7000′;
ELSE
return ’1=0′;
end if;
end if;
END;

And then, add this function to the VPD Policy.

BEGIN
DBMS_RLS.add_policy
(object_schema => ‘ANALYST’,
object_name => ‘EMPLOYEES’,
policy_name => ‘EMPLOYEE_SEL_POL’,
function_schema => ‘VPD_ADMIN’,
policy_function => ‘EXECUTIVE_APPLY’,
statement_types => ‘SELECT’);
END;

Once this is done, check whether the VPD is functioning properly.

                     

Once this is done, the next step is to import both the employees and department tables into OBI EE.
                     

After that, we would have to create 2 users called Analyst and Executive using the OBI EE
security.

                     

After that, in the connection pool, change the username and passwords to that of VPD_ADMIN.
Also, enable the check box to use the fully qualified table names.

                     

Double click on the connection pool and go to the Connection scripts tab. Then enter the select
script.

                     

The next step is to log into BI Answers as ANALYST and EXECUTIVE and view the create
reports out of the employees table.

                     

                     

As you see, the data would vary based on the logged in user though we are getting the data out of
the same table. But better be aware of shared cache. Modify the query whenever you feel that the
cache is coming in your way. You would have to make the cache VPD aware. I have not tried this. I
would update this blog as soon as i try that one out. To make it VPD aware you would have to use
security sensitive repository variables. Thanks to bryan for his comments. There are also other
ways of implementing VPD. I believe Mark Rittman has already blogged about the 4th one in our
list here. Another interesting way of implementing VPD wherein the predicates would be changed
by the BI Server rather than the database.

Posted in All Posts, OBI EE Plus | 7 Comments »

Oracle BI EE 10.1.3.3 and Mapviewer Maps


Posted by Venkatakrishnan J on August 23, 2007

As you must be knowing OBI EE 10.1.3.3 now officially supports Mapviewer Maps. This is one
more reason why users must look into OBI EE. One can have visual maps of locations that can
change based on data. Mapviewer is actually one of those products that is actually tightly integrated
with Oracle Spatial. What this means is that if you have topographic data about your warehouses,
store locations etc, all you need to do is load them up into Spatial and use Mapviewer to create the
maps for you. Once you have the maps, you can integrate your maps with OBI EE. For example,
while analyzing the sales for a particular region, Mapviewer maps can provide additional
topographic information about the location. It also supports drilling down from the maps to the OBI
EE reports. Installing mapviewer is pretty straightforward. All one would
need to do is deploy the ear file in to a OC4J container. To test this out, i deployed it on the OC4J
that comes along with the OBI EE installation. It just worked like a breeze. Below is a sample
screenshot.

One can get all details about Mapviewer from here

Posted in All Posts, Mapviewer, OBI EE Plus | 9 Comments »

Oracle BI EE 10.1.3.3 – Metadata Dictionary Statistics


Posted by Venkatakrishnan J on August 23, 2007

One of the new features of Oracle BI EE 10.1.3.3 is the ability to view the Metadata Dictionary
Statistics from within BI Answers.
“In this release, this Metadata Dictionary can
now be accessed directly from the Oracle BI Answers selection pane where specific metadata
information will be shown to guide report construction. Once this Oracle BI
Answers-based functionality has been enabled as described in this section, an icon will appear next
to each Subject Area, Table name, and Column shown in the selection
pane for that Subject Area. The Subject Area icon is always displayed, whereas the Table name
and Column name icons are only displayed on mouse-over. Clicking on the
icon will open up a specific Metadata Dictionary page to show information for that element and
links to related repository information.” – This is what the documentation says about this feature.

Lets see how to go about doing the same here. The first thing you would have to do is to open your
repository in offline mode using the Administrator. Then go to
Tools->Utilities->Generate Metadata Dictionary and click on Execute.

                  

Then it would prompt you to specify the directory wherein you would like to have the dictionary
exported to. Specify any directory here. We can later on copy the files later on. Once executed,
utility would create dictionary under a new folder with the name same as the repository. In my case
i have create the dictionary for the repository called Paint. It would look something like this below

                  

The dictionary is nothing but a set of static xml files that gives lineage information of the metadata.
Once the dictionary has been created the next step is to bundle this and deploy it into the App
server.
If you have a OC4J instance copy all the entire paint directory to the directory where you would
find the saw.dll file (this is where the analytics war file would have been deployed). Once this is
done
restart the presentation services and ensure that you can access the xml files directly. Your URL
would look similar to this http://localhost:port/analytics/paint/NameIndex.xml .

                  

Ensure that you do get the xml back after entering the URL. Once this is done, the next step is to
make BI Answers aware of the presence of the dictionary. To do this open InstanceConfig.xml file.
It would be under {BIEEDataHome}/web/config. Then add the following to the file

                 
Save this file and restart your presentation services. Now if you open Answers, you can find a small
icon next to the subject areas and the columns that would directly take us to the corresponding
metadata dictionary.

                  

This is available in the documentation here. But the doc does not specify the details for OC4J or
Oracle App server.
I believe this should help you out in case you are planning to implement it in your org.

Posted in All Posts, OBI EE Plus | 9 Comments »

Oracle Reports to BI Publisher – Conversion Utility


Posted by Venkatakrishnan J on August 22, 2007

Oracle BI Publisher 10.1.3.3 has a very interesting feature. It comes along with a small utility that
can convert Oracle Reports to BI Publisher reports. I just thought i would blog about the same,
since a lot of Oracle Report users are now migrating towards BI Publisher. This utility would come
in handy for a lot of people. In fact getting this utility to work is very simple. Lets see how this
utility works in this article. First i started with creating a sample Oracle Report.

         

The report is based on 3 columns of Geography table. Those 3 are Region Name, Country Name
and City Name. This report would primarily consist of grouping by region and then displaying a
tabular report of the coutries and cities for that region. The report looks like this

         

The next step is to export/save the report in the form of XML from within Oracle Reports.
Remember that Oracle Reports stores both the layout and data queries in the same file. Once the
report is saved update your CLASSPATH to point to the
$BIPUB_HOME\oc4j_bi\j2ee\home\applications\xmlpserver\xmlpserver\WEB-INF\lib directory.
This directory would contain 4 import jar files. They are

1.   Collections.jar
2.   xmlparserv2-904.jar
3.   xdocore.jar
4.   aolj.jar
The above 4 files are required for the utility to work. The utility accepts the following parameters

                     -source — (required) Source directory for Oracle Reports files. All reports must be in
the same format – either RDF or XML.

                     -target — (required) Target directory to create Oracle BI Publisher report objects. This
includes the Oracle BI Publisher Report file (.xdo), the layout template file (.rtf), the PL/SQL
package, and log file.

                     -oraclehome — (optional) If your reports are in Oracle Reports XML format do not
specify this parameter. If your reports are not in Oracle Reports XML format, specify the Oracle
home path where Oracle Report Designer (9i or later version) is                         installed.
BIPBatchMigration assumes that rwconverter is contained in the bin directory beneath the Oracle
Home path.

BIPBatchConversion requires rwconverter from Oracle Reports to convert the report from RDF
format to XML format.

                     -debug — (optional) To run the utility in debug mode and write debug statements to
the log file.

Command Line Usage:

                     java … BIPBatchConversion [-debug] -source SourceDirectory -target


TargetDirectory [-oraclehome OracleHomePath]

                     

Once the command is executed, it will create the layout, sample xml, xdo file and others in a same
directory.

                     

The next step is to compile the package that is created once the utility is executed.
                     

Lets open the template to see whether the grouping and others are intact.

                     

Copy the entire folder to the xmlp reports directory. Once the copy is done, refresh the report
repository. We would get the report within BIP Enterprise as shown below.

                     

View the report. But ensure that you have data source of the name default that would connect to the
source from which you have created the report. Else change the name of the datasource in the date
template definition.

                     

 All of the above and more, is available in the documentation here.

Posted in All Posts, Bi Publisher | 15 Comments »

Oracle Olap 11g – Reporting using OBI EE


Posted by Venkatakrishnan J on August 21, 2007

As I had pointed out in my earlier article here, Oracle OLAP 11g have two modes of operation. In
the 10g mode, users would have to create sql access views on top of these cubes in order to make
them accessible to end users (for users who are on relational reporting tools like OBI EE). In order
to create these views one would have to have a knowledge of MODEL clause, OLAP Table
function and it is indeed a bit cumbersome but of course very powerful. But in the 11g mode, end
users do not have to create these sql access views in order to expose them to a relational reporting
tool. All one would need is the MV view that gets populated and refreshed created. Lets look at it
in a bit more detail.

I have a cube called SALES that has 2 dimensions PRODUCT and CUSTOMER. Following are the
details of the dimensions (both are level based)

PRODUCT:

Level1 – Product Pack Size

Level2 – Product Name

Level3 – Product ID (This would be my key for the dimension)

CUSTOMER:

Level1 – Customer Gender

Level2 – Customer Name

Level3 – Customer ID (This would be my key for the dimension)

Also, my SALES cube has only one measure that is Quantity Sold. So, it’s basically a very simple
cube with 2 simple dimensions.

      
      

      

As you see above, I have one hierarchy for each of my dimensions i.e Product and Customer.
Hence, when you create the cube, one would get 2 MVs views. For example, lets see the views in
the product dimension. Following are the 2 views

1. Product_View – This view is basically automatically created by OLAP 11g and gives in the
individual keys and their corresponding desc. It contains the following structure and data.

SQL> desc product_view

Name Null? Type


—————————————– ——– —————————-
DIM_KEY VARCHAR2(100)
LEVEL_NAME VARCHAR2(30)
LONG_DESCRIPTION VARCHAR2(100)
SHORT_DESCRIPTION VARCHAR2(100)
      

But this view does not give the complete structure. For example, one cannot determine the
relationship between the levels here. In order, to get the relationship, there is the 2nd view that
gives more details into the structure of the dimension. This is the Hierarchy view
Product_Producthierarchy_View

2. Product_Producthierarchy_View

SQL> desc product_producthierarchy_view

Name Null? Type


—————————————– ——– —————————-
DIM_KEY VARCHAR2(100)
LEVEL_NAME VARCHAR2(30)
LONG_DESCRIPTION VARCHAR2(100)
SHORT_DESCRIPTION VARCHAR2(100)
PARENT VARCHAR2(100)
PRODUCTPACKSIZE VARCHAR2(100)
PRODUCTNAME VARCHAR2(100)
PRODUCTID VARCHAR2(100)

As you see here, DIM_KEY is the unique key for this MV and it has a parent attribute that links it
up to the other levels. One would need to use the connect-by clause to get the relationship.
      

Having looked at the dimension views let us take a look at the Cube MVs.

      

As you see above, there is a view called as Salescube_view that gets automatically created when we
define the cube. It has the following structure.

SQL> desc salescube_view


Name Null? Type
—————————————– ——– —————————-
SALES NUMBER
PRODUCT VARCHAR2(100)
CUSTOMER VARCHAR2(100)

Sales here is the measure. Product and Customer are the keys relating to the dimensions. Having
looked at the views let’s look at how these views can be used in reporting using OBI EE. The first
step is to treat the 3 main views (hierarchical views of dimensions and the cube view) as ordinary
views and import them into OBI EE physical layer.
      

      

Then define all the joins in the physical and the logical layer. If need be, create dimensions(within
OBI EE) to specify drill levels and then create a report out of it in answers.
      

But yes, it is always recommended that you specify proper filters within your query since this is
olap data. It will have all the possible combinations of both the dimensions (cartesian product) and
hence any improper query will suck the system out of
resources

Posted in All Posts, OBI EE Plus, OLAP | 6 Comments »

Oracle BI Enterprise Edition 10.1.3.3


Posted by Venkatakrishnan J on August 20, 2007

As you might know, 10.1.3.3 release of OBI EE is out for download. There have been quite a lot of
features that have been added to this release. Especially, in the MS Office integration front and BI
Publisher front. There is a new BI office add for office 2003. Also, there is an out of the box
integration available between BI Publisher and Discoverer. Like in the earlier release, where in one
can source OBI EE reports from BI Publisher, one can source this time from Oracle Discoverer. I
won’t be going too much into details about this since we already have a great resource about them
in Abhinav’s blog here, here and here. I would rather focus on the BI Publisher features in this
article.
 

 
There are more download options in this release from within BI Publisher. In the earlier release, if
you had noticed, there was no explicit way to install the excel analyzer. The only way was to click
on the Analyzer for Excel button (one would have to reduce the excel security level to get this
installed). But now, there is an external button that you can leverage to install this directly.
 
Also, there is an option wherein one can create a template automatically from a data set.
This makes a lot of sense for users who are pretty new with this tool and do not how to start.
Atleast this can act as a bridge.
 

 
 
There are more download/viewing options now. Powerpoint, CSV support have been added into
this new release.

And ofcourse, there is no need for anyone to remember the URL parameters (basic functionality is
exposed. For more advanced, the only way is to get them from the user guide) to get parts of the
report. This has been added as links to the report in the BI Publisher Enterprise.

Another major addition to this 10.1.3.3 release of BI EE is that, BI Publisher supports flash
templates. One can view flash reports from with BI Publisher and ofcourse can expose them to BI
EE. Quite an interesting feature if one needs highly customized flash reports.

The last noticeable feature from within BI Publisher is that, it has option now to store the files
within a directory structure (file system) or within XML DB.

And yes, Tim Dexter has earmarked some good new features in BI Publisher 10.1.3.3 here.
 

Posted in All Posts, Bi Publisher, OBI EE Plus | Leave a Comment »


Oracle Olap 11g – First Impressions
Posted by Venkatakrishnan J on August 17, 2007

Update to the original post based on  further work in OLAP 11g. 

I just managed to install Oracle 11g on one of our crash and burn servers here. Well, to be honest I
was impressed with what I saw. No glitches in installation at all. It has been sometime since I last
managed to do that. One of the main reasons why I installed 11g was to test out the OLAP option.
And this article is a result of that. For users who are trying to get AWM 11g from OTN, it’s not
available as a standalone install as yet(i am not sure whether it will be at all). It is bundled along
with Oracle Client software. Infact one would also get ODBC drivers, SQL Developer from the
client install. One of the first things that I observed was that the Analytic Workspaces open up
really fast.

 As you would know, Oracle 11g support 2 options. One is the 10g mode wherein you can use the
AWM similar to what you have in 10g. The other is the revolutionary 11g mode wherein you can
make the cube to be part of the optimizer via MVs. I started working on the 11g mode so that I can
test it out. I started with creating a sample cube from the SH schema. One of the things that I
observed was, one would need more privileges to create an 11g mode cube than to create it in the
10g mode. For example, one would have to have the permission to create MVs.

 I started out with creating a Product dimension.

 As you see in the above diagram, as soon as you create dimension you would get the associated
MVs Views. I believe the MV gets deployed only when one analyzes the dimension. The MVs are
created only if one selects that option while creating the cube (In the Materialized View tab). One
also has the option of either enabling the Query rewrite so that the MVs are available for the
optimizer. Also the build logs for the dimensions have changed quite a bit for good.

One would also get a MV for each of the hierarchies. I have not explored more into the dimensional
MVs. Maybe I will write about them later.
 
 
Similarly, the build log for the cube creation is also different. One can create MVs out of both
dimensions and Cubes.

The following is the output of the MV cube view created.

The MV view contains the cartesian product of the prod_id and Cust_id and its corresponding
quantity sold measure.

But one of the strange things that I noticed was when i fire a query that uses one of the columns in
MV, the table gets locked out if the Workspace is open. I analyzed a cube so that it becomes
available to the Optimizer via the MV. But when i close theworkspace i get the results of the query.
Maybe someone can correct me if I am wrong here. Maybe there is some parameter that I would
have to set.  Thanks to Chris Claterbos of Vlamis solutions. He has compiled a nice article showing
how AWM 11g can be started from Windows and Mac here.

Posted in All Posts, OLAP | 2 Comments »

Usage Tracking in OBI EE


Posted by Venkatakrishnan J on August 14, 2007

I have had quite a few customers asking for ways to determine who is accessing what in OBI EE.
As a matter of fact, OBI EE provides an easy way to do usage tracking. There are 2 methods to
achieve this.
1.                  Having a usage tracking table and OBI EE would do direct inserts into this table
whenever someone is accessing any of the components within OBI EE.
2.                  Enable tracking via writing to log files.
The 1st one is the most recommended option since all that one would need is a schema to hold this
table. And this is very lightweight and does not consume too much of resources.
In order to set this up, one would have to go through a small set of configuration steps. They are
           
1.                  Run the create table scripts under the {BIInstallDir}/server/schema directory eg.
SAACCT.Oracle.sql
2.                  Check whether the schema from which you ran the above script indeed has the
table of name S_NQ_ACCT.
3.                  Open the NQSConfig.ini and go to the usage tracking section and enable it. For
example, use the following as a sample
[ USAGE_TRACKING ]
ENABLE                         = YES;
DIRECT_INSERT                  = YES;
PHYSICAL_TABLE_NAME            = “BIDB”.”BISE1_SALESWH”.”S_NQ_ACCT” ;
CONNECTION_POOL                = “BIDB”.”BIDB” ;
BUFFER_SIZE                    = 10 MB ;
BUFFER_TIME_LIMIT_SECONDS      = 5 ;
NUM_INSERT_THREADS             = 5 ;
MAX_INSERTS_PER_TRANSACTION    = 1 ;
There are 2 parameters that need explanation.
PHYSICAL_TABLE_NAME parameter requires 3 values to be specified.
BIDB (eg)            -            Points to the name of the Database module within the
Physical layer of   the current repository.
BISE1_SALESWH            -            Points to the schema of the database in which we
ran the script in step 1.
S_NQ_ACCT                        -            Table that collects the statistics.
One would have to import the S_NQ_ACCT table within one of the database modules for the usage
tracking to work. The above is the specification for an Oracle database. For other databases, do
refer the documentation.
The CONNECTION_POOL parameter requires 2 values to be specified.
“BIDB” (eg)            -            Points to the name of the Database module within the
physical layer of   the current repository.
“BIDB”            -            Points to the name of the connection pool within BIDB
database module.
 

 
 
Of course all of this is documented and one can access those from here. The S_NQ_ACCT
table has the following structure.

 
Quite a lot of stats are available out of the box for end users to report on. There is also a
usage tracking repository under BIHome}/Server/Samples/Usage
Tracking. One can use this repository and merge it to the work
repository so that one can do usage-tracking analysis on the
dashboards.

Posted in All Posts, OBI EE Plus | 11 Comments »

Archive for July, 2007


Customizing OBI EE – SOAP API
Posted by Venkatakrishnan J on July 31, 2007

As I was writing my blog yesterday on using URL parameters as a customizing option, it made
me think about the availability of open API’s for OBI EE. As luck would have it, I had some
time yesterday to work on the API’s and this blog is a result of that. In this article, we would
be seeing how to use SOAP API of OBI EE from JDeveloper.  One of the major advantages of
OBI EE is that it opens itself for developers in the form of standard API’s. Almost all the
functionality is exposed and it would enable customers to use these API’s within their
application code sets and thereby enabling complete integration. Here, we would basically be
seeing how to go about using the SawSession service and the HtmlViewService to view a
simple report. The SawSession service helps is maintaining sessions & authentication. The
HtmlViewService helps in actually extracting the layout of a report. The SOAP API works on
the WSDL implementation within OBI EE. If you navigate to
http://localhost:port/analytics/saw.dll?WSDL one can obtain the WSDL schema information.  

One can use the Mindreef SoapSCOPE evaluation copy to go through the WSDL.

                                  

                                 

One can test each of the invoking methods using this. But the only major problem with this
evaluation copy is that you cannot maintain session state. Hence it would be difficult to test all
the methods available. Now lets look at the various services that are available. 

1.                  Security Service

2.                  Ibot Service

3.                  Web Catalog Service

4.                  Replication Service

5.                  Metadata Service

6.                  ReportEditing Service


7.                  HTMLView Service

8.                  XMLView Service

9.                  SAWSession Service 

Security Service:          This service helps in identifying the user priveleges. One can assign,
revoke privileges using Security Services. 

Ibot Service:            As the name suggests, this is a service for invoking Ibots. 

Web Catalog Service:          This service is for managing the web catalog.

Replication Service:                  This service is used for replication. Export/Import of


catalogs can be done using this. 

Metadata Service:          This is for managing the BI Server metadata. 

ReportEditing Service:          This service is used to merge arguments and Oracle BI Web
Services data to create and return the results. 

HTMLView Service:                  This service is used to embed Oracle BI HTML results in
third-party dynamic Web pages, such as Active Server Pages (ASP) or JavaServer Pages (JSP),
and portal frameworks. The embed process merges Oracle BI Web Services content with the
content of third-party Web pages. 

XMLView Service:                  This is used for retrieving the data from Oracle BI EE Server in
the form of XML. 

SAWSession Service:          This is the service that would enable users to login, logout and
maintain sessions. Now lets see how we can go about using these services from within
Jdeveloper to create a sample custom report. 

1.       Open Jdeveloper and create a new application. (With no templates)

                                     

2.       Create a new Package within the Applcation.

                                    

Use Web Service Proxy technology to create it.


                                       

Invoke all the methods that you need. In our example, we will be including the SAWSession
service, the HTMLView Service and the XMLView Service.  

3.       The next step is to create an object for SAWSession Service and invoke the logon
method.           

For example,

soaptest.SAWSessionServiceSoapClient myPort = new


soaptest.SAWSessionServiceSoapClient();                   

sessionID = myPort.logon(“Administrator”,”Administrator”);          

This would create a session. 

4.       Once a session is created, the next step is to create a pageID for that session. A page is
nothing but an entire html page that might contain multiple reports. This uses the HTMLView
Service.          

For example,

soaptest.HtmlViewServiceClient htmlClient = new


soaptest.HtmlViewServiceClient();                   

pageID = htmlClient.startPage(newPage,sessionID); 

5.       After creating the pageID, create multiple report Ids that you would like to associate
with  a pageID.          

For example,                   

htmlClient.addReportToPage(pageID, reportID, newreportRef, null, null, null,


sessionID);                    

Here, newreportRef uses a Reference structure like this                    

ReportRef newreportRef = new ReportRef();           

newreportRef.reportPath = reportPath;                     

newreportRef.reportXml = reportXML;               

For specifying a report one would have to specify 2 values. One is the report path and the
other is the report definition. Both can be obtained from the report definition properties.

 
 
                              
 

5. Once this done the next step is to generate html output for the report.          

For example,

htmlOutput = htmlClient.getHtmlForReport(pageID, reportID, sessionID); 

For future reference, I have uploaded the entire code here. One can use this for
reference. This just shows the extensibility of OBI EE. Also, one can call BPEL processes from
within BI EE to make educated business decisions. Mark Rittman has already blogged about
that here. Interesting post considering the fact it is gaining more and more traction in the
customer environments. I just had a customer who had this query and i was more than happy
to direct them to Mark’s blog just to give them an idea and of course the documentation. The
power of community is so good in this regard and it has helped me out a lot of times. If you
want to know more about the open API’s they are available here. Just in case you want to do
the same with BI Publisher they are available here. You might want to check out this blog by
Vlamis and his team for giving out excellent articles on OLAP and DW in general. Also, if you
are passionate about discoverer check out Michael Armstrong-Smith‘s blog.

Posted in All Posts, OBI EE Plus | 62 Comments »

Customizing OBI EE – GO URL Parameters


Posted by Venkatakrishnan J on July 30, 2007

While I was working on the data mining pieces, I got a request from a customer who basically
wanted to completely customize OBI EE. Well, it got me thinking about the various customization
options that we have with OBI EE. In my customer’s case, they wanted to integrate OBI EE into
their web application. Let’s see what options we have with OBI EE customizations.

Using OBI EE GO URL parameters

Almost most of the functionality that a customer would need or expect out of OBI EE is available
for them via URL parameters. One can leverage these URL parameters into their application. What
this would do is that rather than having OBI EE as a separate reporting tool, it would enable an end
customer to call various reports via iframes into their application.
 
 A sample URL with the parameters for OBI EE would look like this

 http://hostname:port/analytics/saw.dll?
GO&NQUser=Administrator&NQPassword=Administrator&
Path=/Users/administrator/GEC_DW/Regional+Sales/Profit+per+Category+Pie+Chart&Options=
md

When one needs to use the URL parameters the fundamental part of the URL should include
http://hostname:port/analytics/saw.dll?GO and following that options are to be entered. Lets look at
the various URL parameters for OBI EE

        1. &NQUser – Username for logging into Answers


        2. &NQPassword – Password for login. One must realize that entering password directly into
the URL is not very secure. Its recommended to use    the post method wherein the password is not
explicitly shown. (People who know discoverer, entering password, as a parameter is no more
available. Only post method is supported)
 
        3. &Options=mdfr – Each of the letters in mdfr have a specific function.
            m - To include the modify report link under the report
            d - To include the download link under the report
            f - To include the printer friendly link under the report
            r - To include the refresh report link under the report

  All the above can be interchangeably used. For example &Options=md for including modify and
download links alone.

        4. &Action – This allows the developers to request specific formats for the reports. For
example, &Action=print (can also have excel etc)
 
        5. &ViewName – This argument allows one to specify a view. For example,
&ViewName=Chart1

        6. &Style – Specify a style sheet For example, &Style=Lime

        7. &Format – Specify the format of the output, html or xml


 
        8. &Path – Specify the path for the report. For example,
&Path=/Shared/administrator/testReport

        9. &SQL – Logical Sql – One can even issue logical sql via the URL parameter. For example, 
&SQL=select+region+from+Sales. Here Sales is the   subject area.

The above are some of the parameters that you might find useful. But for more detailed and some
parameters refer the Documentation here.

 
The above picture is actually a simple application that calls out 2 different reports based on the data
entered. This kind of integration is very strong and infact the entire OBI EE is integrated into the
Oracle Siebel CRM using this methodology. One can use Post methods; execute scripts etc using
this type of methodology.

Following are some examples for simple HTML form elements using post method.
 Access to Answers:
     <form action=”http://hostname:port/analytics/saw.dll?” method=”post”>
     <input type=”hidden” name=”Cmd” value=”Answers”>
     <input type=”hidden” name=”nqUser” value=”Administrator”>
     <input type=”hidden” name=”nqPassword” value=”Administrator”>
     <input type=”submit” value=”Answers”>
     </form>

To open a report in Answers (for edit), include the Path parameter:


     <form action=”http://hostname:port/analytics/saw.dll?” method=”post”>
     <input type=”hidden” name=”Cmd” value=”Answers”>
     <input type=”hidden” name=”nqUser” value=”Administrator”>
     <input type=”hidden” name=”nqPassword” value=”Administrator”>
     <input type=”hidden” name=”Path” value=”/Shared/SH/Category analysis”>
     <input type=”submit” value=”Open a Report for editing in Answers”>
     </form>

To open BI Publisher use “AdvancedReports” as the Cmd value


     <form action=”http://hostname:port/analytics/saw.dll?” method=”post”>
     <input type=”hidden” name=”Cmd” value=”AdvancedReports”>
     <input type=”hidden” name=”nqUser” value=”Administrator”>
     <input type=”hidden” name=”nqPassword” value=”Administrator”>
     <input type=”submit” value=”BI Publisher”>
     </form>
 

Posted in All Posts, OBI EE Plus | 71 Comments »

Oracle Data Mining and Business Intelligence


Posted by Venkatakrishnan J on July 25, 2007

I believe Oracle Data Mining is one of the most under utilized tools/database options in the BI
space. There are so many Oracle Data Warehouse implementations out there but hardly few use
Oracle Data Mining (but yes the market share is growing recently). Is there any reason for such a
low adoption rate? Is it due to the lack of capabilities of Oracle Data Miner? Or is it due to the
perceived notion that Data Mining is for statisticians and the like? Or is it because the management
does not believe in the value of Data Mining?

I think it’s primarily due to the perceived notion rather than the lack of features because ODM
indeed has a very rich set of functionality (a lot!!!). Of course statisticians can much appreciate the
value of a data-mining tool. But again, as a person who has been involved in some DW
implementations, I believe we understand the data better than anyone else. To use data mining
Statistical knowledge would be an absolute plus but not mandatory. I am planning to put together a
series of articles that would elucidate the various models that are used in Oracle Data Miner with
examples. Its more of an education for me too since I myself would be getting my hands dirty for
the first time with this tool. It is a bit too ambitious but let me see how far I can go. I will try to put
together some relevant day-to-day examples as and when I get time (I will try as much as possible
to deviate from the Beer bottle and Baby diaper example J). For more detailed analysis and inputs
we always have the documentation and the ODM PM Marcos Campos’s blog. Actually the ODM
PM is Charlie Berger. Thanks for correcting me Charlie. But some usual caveats here. Data
Mining is a huge and a vast topic. I plan to just cover the models that might make sense for all
those who use Business Intelligence. If you have any feedback do let me know since I think I am
being too opinionated here!!!
Before we get into the details, lets go through an overview of datamining types. There are 2 types
of datamining.

       1. Supervised Data Mining


       2. Un-Supervised Data Mining

Supervised is also called as Predictive data mining wherein the process is used to predict some
outcomes. For example, a credit card company can use this to predict whether a customer is going
to default on his payments.

Un-Supervised Datamining, also known as descriptive datamining involves finding out intrinsic
patterns within the data. Again, how the pattern is identified depends on the model.

Following are some of the models supported by Oracle Data Miner.

Supervised Data Mining:

        1. Classification
        2. Regression
        3. Attribute Importance
        4. Anomaly Detection

Un-Supervised Data Mining:

        1. Clustering
        2. Association
        3. Feature Extraction

With that I would like to close this with some interesting articles on datamining

        1. Crime Detection


        2. Credit Card Fraud Detection

Posted in All Posts, Data Mining | 2 Comments »

BI Publisher 5.6.2 and VPD


Posted by Venkatakrishnan J on July 24, 2007

In my last article, i had written about leveraging Proxy Authentication for VPD in BIP 10.1.3.2.
But in earlier releases of BIP especially for people who are still on 5.6.2 version, there was no
proxy authentication. Also, if a customer wants to leverage VPD within an Oracle database that is
of earlier releases like 9i/8i then Proxy Authentication will not work. So in this article i would be
focussing on 2 methods of using VPD within BIP 5.6.2. I will talk about 2 cases here. To be honest,
the first one does not leverage VPD within the database. But i have included it here just for the sake
of completeness.

1. If the idea is just to pass the username & get the data based on the user, this can be done directly
from the BIP itself without going back to the database (without setting up VPD in the database).

Consider there are 2 enterprise users Executive & Analyst. We have to create a report from a table
that has a column called userlogged. The idea is when Analyst logs in one must see the Analyst
user’s (userlogged = ‘ANALYST’ in the sqlquery) data. Similarly, for the executive user one must
see the Executive User’s data. 
               To implement this we would be creating an XMLP report with DataTemplate as the data
source.
For more on Templates refer Tim Dexter’s blog and of course the BIP 5.6.2 User Guide

Use the following script for Data Template.

<dataTemplate name=”JobDemo” description=”Job Demo” dataSourceRef=”BIP_VPD”


Version=”1.0″>
    <input id=”P_USERNAME” value=”${SYSUSER.username}”/>
    <properties>
     <property name=”showControls” value=”false”/>
     <property name=”online” value=”true”/>
     <property name=”parameterColumns” value=”3″/>
     <property name=”openLinkInNewWindow” value=”true”/>
    </properties>
    <parameters>
     <parameter dataType=”character” name=”P_USERNAME”/>
    </parameters>
    <dataQuery>
     <sqlStatement name=”Q1″>
 select EMPLOYEE_ID, JOB_TITLE, FIRST_NAME, EMAIL, HIRE_DATE, SALARY from
employees a, jobs b where a.job_id = b.job_id  and UPPER(ADMIN_USER) =
upper(:P_USERNAME)
</sqlStatement>
    </dataQuery>
    <dataStructure>
     <group name=”G_EMPLOYEE” source=”Q1″>
      <element name=”EMPLOYEE_ID” value=”EMPLOYEE_ID”/>
      <element name=”JOB_TITLE” value=”JOB_TITLE”/>
      <element name=”FIRST_NAME” value=”FIRST_NAME”/>
      <element name=”EMAIL” value=”EMAIL”/>
      <element name=”HIRE_DATE” value=”HIRE_DATE”/>
      <element name=”SALARY” value=”SALARY”/>
     </group>
    </dataStructure>
   </dataTemplate>

Here, the ${SYSUSER.username} variable would substitute the actual usernames into the query &
hence would return different results for each logged in user. For complex queries one can use
nested case statements to use this username variable & implement the logic accordingly. It is
important to note the positioning of the parameter variable tags since placing anywhere else would
not return the valid data. The other option would be is to have the where clause statement itself
returned back to the bip by using lexical references. This way one need not implement vpd at the
database level.

2. If the idea is to have some complex queries based on the username passed then VPD at the
database level can be used.

 2.1.In the following example, the 2 users analyst & executive would be mapped within the
database as admin & admin1 respectively. These users would be accessing the data under the HR
schema which would be the VPD owner

 2.2.   The VPD policy would then be applied on a table called hr.countries over which the column
COL_USER would be the column that maintains the user details.

 2.3.   Before creating the policy one would have to create application context package using the
following script. create or replace context HR using HR.Context_Package_XML;create
or replace PACKAGE Context_Package_XML AS
FUNCTION BeforeReportTrigger return boolean;
P_USERNAME VARCHAR2(100);
END;create or replace PACKAGE BODY Context_Package_XML IS
FUNCTION BeforeReportTrigger RETURN BOOLEAN IS
v_ouser VARCHAR2(30);
BEGIN
DBMS_Session.Set_Context(‘HR’,'SETUP’,'TRUE’);
v_ouser := SYS_CONTEXT(‘USERENV’,'SESSION_USER’);
IF upper(P_USERNAME) = ‘ANALYST’ THEN
BEGIN
DBMS_Session.Set_Context(‘HR’,'USER_NAME’, ‘ADMIN’);
END;
ELSE
IF UPPER(P_USERNAME) = ‘EXECUTIVE’ THEN
BEGIN
DBMS_Session.Set_Context(‘HR’,'USER_NAME’, ‘ADMIN1′);
END;
ELSE
DBMS_Session.Set_Context(‘HR’,'USER_NAME’, ‘HR’);
END IF;
END IF;
DBMS_Session.Set_Context(‘HR’,'SETUP’,'FALSE’);
RETURN TRUE;
END;
END Context_Package_XML;

Create the vpd function

create or replace FUNCTION user_only (


p_schema IN VARCHAR2 DEFAULT NULL,
p_object IN VARCHAR2 DEFAULT NULL)
RETURN VARCHAR2
AS
BEGIN
if sys_context(‘HR’,'USER_NAME’) = ‘HR’ then
RETURN ’1=1′;
else
IF upper(SYS_CONTEXT(‘HR’,'USER_NAME’)) = ‘ADMIN’ THEN
return ‘upper(con_user) = ”ADMIN”’;
ELSE
IF upper(SYS_CONTEXT(‘HR’,'USER_NAME’)) = ‘ADMIN1′ then
return ‘upper(con_user) = ”ADMIN1”’;
else
return ’1=0′;
end if;
end if;
end if;
END;

Add a vpd policy using dbms_rls.add_policy procedure

BEGIN
DBMS_RLS.add_policy
(object_schema => ‘HR’,
object_name => ‘COUNTRIES’,
policy_name => ‘COUNTRY_SEL_POL’,
function_schema => ‘HR’,
policy_function => ‘USER_ONLY’,
statement_types => ‘SELECT’);
END;

This application context package would set the context depending on the username (Analyst or
Executive). This package would be run by using a before report trigger that’s available in BIP.
Once this is done, the next step is to create a report using Data Templates. One can use the
following Data Template code.

<dataTemplate name=”JobDemo” description=”Job Demo” dataSourceRef=”BIP_VPD1″


defaultPackage=”Context_Package_XML” Version=”1.0″>
                                <input id=”P_USERNAME” value=”${SYSUSER.username}”/>
    <parameters>
                                        <parameter dataType=”character” name=”P_USERNAME”/>
                                </parameters>
    <dataQuery>
     <sqlStatement name=”Q1″>
 select COUNTRY_ID, COUNTRY_NAME, REGION_ID,CON_USER from countries
</sqlStatement>
    </dataQuery>
                                <dataTrigger name=”beforeReport”
source=”Context_Package_XML.BeforeReportTrigger”/>
    <dataStructure>
     <group name=”G_COUNTRIES” source=”Q1″>
      <element name=”COUNTRY_ID” value=”COUNTRY_ID”/>
      <element name=”COUNTRY_NAME” value=”COUNTRY_NAME”/>
      <element name=”REGION_ID” value=”REGION_ID”/>
                                                <element name=”CON_USER” value=”CON_USER”/>
     </group>
    </dataStructure>
</dataTemplate>

What this basically does is that it calls a before report trigger(a Pl/SQL package wherein we pass
the username of the user logged in using the ${SYSUSER.username} variable. The Pl/SQL
package basically sets the context thus enabling the report to be executed as the user based on the
context.

Posted in Bi Publisher | 1 Comment »

BI Publisher 10.1.3.2 and VPD


Posted by Venkatakrishnan J on July 23, 2007

I was going through an interesting post by Jonathan Lewis on Proxy Authentication that is available
for end users via Sql Plus in 10g R2. This post made me think about the availability of the same in
BI Publisher 10.1.3.2 wherein one can leverage the proxy authentication(for database connections
that are on 10g) to do VPD or row level security. This article would demostrate how to use Proxy
Authentication to do row level security within BI Publisher. Of course, this applies only if you
are 10.1.3.2 version of BIP and 10g of database. For users who are on earlier releases, I
would follow this one up with another article for showing how to go about doing the
same.Assume that there are end users Analyst and Executive within BI Publisher(Analyst and
Executive are also users within the 10g R2 database). There is one table under Analyst that has all
the Employee details. Assume that the Analyst is working on the Employee table but would like
Executive end user to see only those data wherein the salary is greater than 7000.

Create a Proxy user bipubapp_user that would be used to proxy authenticate both Analyst and
Executive. The following commands are performed as a user Sys(any admin user)

Create user bipubapp_user identified by welcome1;

grant create session to bipubapp_user;

create user Analyst identified by welcome1;

grant create session, create table to Analyst;

alter user Analyst grant connect through bipubapp_user;

create table Analyst.Employees as select * from HR.Employees;

create user Executive identified by welcome1;

grant create session to Executive;

alter user Executive grant connect through bipubapp_user;

The next step is to set up the VPD policy within the database. I have a user called VPD_ADMIN to
source the function and the VPD policy.

1. Create the following VPD function.

create or replace FUNCTION Executive_Apply 


                       RETURN VARCHAR2
AS
BEGIN
if USER = ‘ANALYST’ then
   RETURN ’1=1′;
else
IF USER = ‘EXECUTIVE’ THEN
   return ‘salary > 7000′;
ELSE
return ’1=0′;
end if;
end if;
END;

2. Add a VPD policy with the above function

BEGIN
DBMS_RLS.add_policy
         (object_schema => ‘ANALYST’,
          object_name => ‘EMPLOYEES’,
          policy_name => ‘EMPLOYEE_SEL_POL’,
          function_schema => ‘VPD_ADMIN’,
          policy_function => ‘EXECUTIVE_APPLY’,
          statement_types => ‘SELECT’);
END;

3. Check whether VPD is working

SQL> conn bipubapp_user[executive]/welcome1


Connected.
SQL> show user
USER is “EXECUTIVE”
SQL> select count(*) from analyst.employees;

  COUNT(*)
———-
        44

SQL> conn bipubapp_user[analyst]/welcome1


Connected.
SQL> show user
USER is “ANALYST”
SQL> select count(*) from analyst.employees;

  COUNT(*)
———-
       107

The next step is to go to the BI Publisher admin console and create 2 users Analyst and Executive.
Create a datasource that would use the bipubbapp_user as the login username. Make sure to enable
proxy authentication while creating the datasource.

Give the necessary privileges to Analyst and Executive. Log out and log in as Analyst and create a
report which would extract the data from the Employees table.

View the report. I have not created any templates here. This is just to show you how Proxy
Authentication works in BIP.

Log out and log in as Executive. View the same report.

Ofcourse, this works only with databases that are on 10g and the BIP version has to be 10.1.3.2 or
above. For the earlier releases, i would follow up with another article that would show you how to
set application contexts in order to use VPD. On the same lines, Mark Rittman has an interesting
article on setting up VPD in OBI EE. Interesting read.

I have not gone into details of Proxy Authentication. One can use secure application roles to have
one more layer of authentication. For more information on Proxy Authentication, would request
you to go through the docs here.

Posted in Bi Publisher | 5 Comments »

Creating a Hyperion Essbase(Analytic Server) Cube


Posted by Venkatakrishnan J on July 21, 2007

In this example, I would be using Sales Warehouse data that comes in Oracle SH schema. It would
make a lot of sense if one creates a cube out of transactional data. But for the sake of simplicity I
would be focussing on the cube creation process with a simple warehouse schema.

Before you start, ensure that you have all the components (Analytic Server and Analytic Integration
Services up and running)
Open up the Analytic Integration Services Console. As soon as you start, it would prompt you to
create an OLAP catalog.

Enter connection details for a schema that you generally use for storing metadata (recommended to
create a separate schema in order to store the metadata). Once that is done it would automatically
take us to the following screen
 

 
On to the left is the OLAP metadata connection. Enter the details that you entered in the previous
screen. On to the right is the Analytic Administration Services connection. Enter those details here.
The next step is to create an OLAP Model.

 
Next is the screen to establish a connection to the data source. As I said, I would be connecting to
the Sales Warehouse schema.
 

 
 
There are two types of files that we would be dealing here. They are
      Olap Model
      MetaOutline
In Olap Model one can establish all the joins of the tables that they want in their schema. It requires
a fact table and their corresponding dimensions. Hierarchies should be specified here.
 

 
Metaoutline is a file type wherein one can create the dimensions and specify the measures. Once
the Olap model is created the next step is to design the Metaoutline.
 
 
The next step is to load the data.

Then one can use the excel add in to view the data.
This is one of the ways to create a cube. One can also create the cube directly from the Analytic
Administration Services. Also, I have not gone into lots of other features that would make essbase
stand part. This was just to show an overview for people would like to start with Essbase but do not
know where to begin from.

Posted in Hyperion Essbase | 16 Comments »

Hyperion Essbase Analytic Server – First Impressions


Posted by Venkatakrishnan J on July 20, 2007

Hyperion Essbase (as it was formerly called) is one of the market leaders in the MOLAP space.
Prior to the acquisition there have been many cases wherein Oracle competed head on head with
Hyperion Essbase using Oracle OLAP. Both of these products have their own advantages. In this
article let’s try to understand the working of Hyperion Essbase vis-à-vis Oracle OLAP.

Hyperion System 9 BI was the latest and last offering from Hyperion before the acquisition. There
have been quite a few name changes for many of the well-known products like Essbase, Brio etc.
Also, there were quite a few changes in the architecture front. System 9 is based on a 3-tier
architecture. In System 9 Hyperion Essbase has been re-branded as the analytic server. There are 4
components that form the entire MOLAP engine. These components are as follows

1. Analytic Services
2. Analytic Administration Services
3. Analytic Integration Services
4. Analytic Provider Services

One must realize that even though Essbase (I will stick with this name to refer to all the above 4) is
a MOLAP engine, it’s considered as a database in itself. It’s more like a multi-dimensional
database. It is one of the fundamental components of Hyperion Planning and Financial
Management.
Following would be installation sequence that one would have to follow to get this up and running.
1.                  Install License Server
2.                  Install Shared Services
3.                  Install Analytic Services
4.                  Install Analytic Administration Services
5.                  Install Analytic Integration Services
6.                  Install Analytic Provider Services
7.                  Install the Excel Add in which is under BI + Analytic Services Client
After the installation one would have to startup the analytic server and the integration server.
Following is the architecture diagram for the analytic server

 
Let us try to understand the 4 components in detail.
Analytic Server:        
This is where the MOLAP cube is stored. The server acts as a shared resource handling all
data storage, calculatioo, sorting etc. It also contains the Outlines (just assume that outline is a file
that stores the dimension and measure specifications), rules (one can define rules for data load) etc.
            Analytic server has 2 kinds of storage
      Block Storage (Easy to use and implement but does not scale)
      Aggregate Storage (Has certain limitations but can scale)

 Analytic Administration Services:     

            Analytic Administration Services—the database and system administrators’ interface to


Analytic Services—provides a single-point-of-access console to multiple Analytic Servers. Using
Analytic Administration Services you can design, develop, maintain, and manage multiple Analytic
Servers, applications, and databases. You can preview data from within the console, without having
to open a client application such as Spreadsheet Add-in. You can also use custom Java plug-ins to
leverage and extend key functionality.

 Analytic Integration Services: 

            This is a very important component wherein one designs the dimensions and fact tables if
one wants to leverage different data sources like Oracle, DB2, SQL Server etc. It basically uses
ODBC to connect to different data sources. It also provides a drill through feature wherein one can
drill down from the database (MDB) to relational database.

 Analytic Provider Services:


            This is for enabling clustering of the database (essbase cube) across multiple machines.

Posted in Hyperion Essbase | 2 Comments »

Hyperion System 9 BI – Overview


Posted by Venkatakrishnan J on July 19, 2007

Before Oracle acquired Hyperion, their BI stack was called as System 9 that included a lot of
components ranging from BI to Performance management. After the acquisition, Oracle has come
out with a slightly modified bundle called as OBI EE Plus. The BI bundle was earlier called as OBI
EE. OBI EE+ = OBI EE + 4 Hyperion Components. Following are the components of OBI EE Plus

1. Oracle Dashboards
2. Oracle Answers
3. Oracle BI Publisher
4. Oracle Delivers
5. Oracle Disconnected Analytics
6. Financial Reporting
7. Production Reporting and SQR
8. Web Analysis
9. Smartview for Office

Now that we know the bundling of OBI EE+, lets try to understand the Hyperion System 9
components. These components lend further support to the OBI EE and makes it a complete
offering.

Financial Reporting: (Like BI Publisher with the ability to natively connect to Essbase, SAP BW
and Office integration with PowerPoint, Excel, Word etc)
        BI + module primarily utilized for highly formatted financial and operating reports
against OLAP, planning and HFM sources.
        Can do scheduling
        Can do report bursting
        Was known as Hyperion reports
        Primarily used for creating compliant financial reports
        2 interfaces – Desktop client and web client
        Desktop Client – Financial Reporting Studio
        Web Client – Part of System 9 Workspace
        Can have SAP BW as a data source
        Has MS Office integration
 

Production Reporting: (More like BI Publisher without bursting capabilities. One would have to
use Financial reporting for that feature)
        Web-based delivery of high volume, presentation quality reports
        Cross function reporting like creating reports based on data from CRM and financial
planning data
        Connection to DB2, Oracle, SQL Server, Essbase, SAP R/3, SAP BW
        Pixel-Perfect reporting
        Formerly known as SQR
        No Bursting capabilities
 
Web Analysis: (Like Discoverer for OLAP but with multiple OLAP sources and ability to create
dashboards and other features)
        BI + module primarily utilized for advanced analysis capabilities against OLAP data
(not restricted to Essbase alone)
        Analysis focused
        Adhoc querying
        Dashboard creation
        Was known as Hyperion Analyzer
        2 interfaces – Java Client and Web Client
        Java Client – Web Analysis Studio
        Web Client – Part of System 9 Workspace

Also, Mark Rittman has a writeup on Hyperion components here. This would give more details on
the components. The above post is just to give you an overview. It would be interesting to see how
these components would be integrated in the future. But for now, one would have to go through a
seperate download for the OBI EE and Hyperion to use OBI EE Plus. But again, that would be
worth it for the feature

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