Wednesday, October 29, 2014

BI Publisher reports showing stale data?

Oracle has done a great job at integrating BI Publisher (BIP) with OBIEE. However not may folks are aware of the fact, that BI Publisher was an independent tool sold separate from OBIEE for a long time.

BI Publisher has a caching mechanism of its own, which is totally independent of OBIEE server cache. If you are experiencing stale data being shown on BI Publisher reports, it could be this caching which needs to be addressed. But here is the tricky part: there is no way to clear the 'BI Publisher' cache using scripts (atleast not at the time of writing this post). If you have scripts to clear BI Server cache, it is great, but that script will not clear the BI Publisher's reporting cache.

Here is the good news:

It is possible to disable the BIP cache, or during report runtime, if you refresh the report, it can bypass the cache (if it is enabled by the report developers). To access BIP cache setting, use following steps:

1. Open BIP report in edit mode.


2. Click on properties and then caching:




3. This where you can :change default BIP caching options:

If you deselect 'Enable Data Caching' it will disable the BIP level caching. This option should be disabled by companies where data is loaded during the day, and even a 30 or 60 minute report caching could make stale data appear for the user. Or if a company has global user base, and Europe users need to see new data as soon as US operations are done loading, then caching is best disabled for BIP.

Note: If BIP report uses a subject area for generating results, then BI server could also do caching (if it is enabled). Although this cache is much easier to manage and purge. 

Another interesting thing is BIP also has document caching in addition to data caching. When this is enabled, BIP stores entire report output (data and document) in the cache for time specified, 

In addition to report level caching, BIP also has server level caching. To access these properties, navigate to administration and click on 'BI Publisher > Manage BI Publisher 


Then click on 'Server Configuration':

Then scroll down to Caching section:



Here are the default values from Oracle for these:
Expiration: 30 mins
Cache size: 1000 items (data)
Max cached report definitions: 50 

On a side note there is an option on data model "Enable Scalable Mode". This option allows some level of local processing of data rather than server. It is useful when there are several users trying to execute several complex BIP report, and can ease the load on server. 






Tuesday, October 7, 2014

Open World 2014 Customer Appreciation Event


I should be blogging about new learning from Open World 2014 :( (I will very soon)

Here is a small preview of customer appreciation event on Wednesday night last week. Aerosmith gave a hot hot performance, totally worth it.












Wednesday, October 1, 2014

Oracle Openworld 2014

Gaining insight at Oracle Open World 2014. Here are few images from the event.
















Tuesday, June 10, 2014

How to select last updated transaction for every ID from a history table?

Here is the scenario:

You have multiple invoices in a table, with one record everytime the Invoice goes through a process, for example Invoice Created, Invoice Submitted, Invoice Approved etc. On top of that there could be multiple records for a step, for example an Invoice could be approved by multiple approvers, and that will end up being new records in the transaction history table.

If you need to create a report, that will show list of Invoices approved, and name of the last approver and the date, though could be tricky to get. After doing some research I found a simple way of determining that programatically:

We select the invoice along with timestamp of record, and sort them in descending order. We also select row_number for this query. The trick is to filter this result set where row_number is 1. Here is the exact sql if you need to refer:

Select  User_Id, approve_date,  Invoice_Id From (
 Select Sth.User_Id user_id, Sth.Timestamp approve_date, Swpv.Property_Value Invoice_Id,
  Row_Number() Over (Partition By Swpv.Property_Value Order By  To_Char(Sth.Timestamp,'DD-MON-YYYY HH24:MI:SS') Desc) R
  From Sf_Transition_History sth, Sf_Workitem_Property_Values_V swpv
Where Sth.Workitem_Instance_Id = swpv.Workitem_Instance_Id
   And Sth.Event_Name = 'Approved'
   And Swpv.Property_Name = 'InvoiceID'
)
Where R = 1



Friday, April 4, 2014

Table not found in Database

This could be annoying when analyzing databases for available tables in the schema. For quick reference, here is the query that can help locate any table in the database:

Select *
From Dba_Objects 
where lower(object_name) = 'table_name';


Wednesday, March 26, 2014

OBIEE BI Publisher prompts not visible when added to dashboard page

When creating a BI Publisher report from a BIP data model, we can add prompts on the report directly to have interactivity on the report. This is specifically useful if you end up creating a BIP report when all required field are not available in the Subject Area, and the report is more like a one-of report (not requiring any further Ad-Hoc analysis).



The report and prompts work well when accessed from a catalog directly. But when you try to add the same BIP report to a dashboard page, it does not show the prompts for some reason.



There are two workarounds for this problem:

1. Build the BI Publisher report from a Subject Area (and not a data model) and then use dashboard prompts to have interactivity on the report. This may not be an easy option for most cases, because if it was, you might not have started with a BI Publisher report in the first place.

2. Second and easy option is to create a link to BI Publisher report on the dashboard instead of directly adding it to the page. This is a bit tricky, but it allows report to be accessed through a dashboard link. If you try to add link, ordinarily, you will not be able to browse to the BI Publisher object:






To avoid the above situation, select "Destination" as URL, and copy the report URL there, but replace server name and port number by "../" . This is very important from migration to higher environments perspective. 



Once the page is saved, navigating back to the dashboard page will show a link to the BI Publisher report: 



Clicking on it does open the BI report with all the interactivity required. 









Friday, March 21, 2014

Date column showing values 0/0/0 12:00:00 AM in OBIEE 11g

Noticed strange appearance of dates in certain cases as below:



I checked the database, the date values for these records was null. It appears there is an easy fix for the problem: 

Open RPD > go to the problem date field > find physical layer column for that field > open physical layer column properties. 

The date might have been set to be Not Nullable. Make sure to Check 'Nullable' property in the physical layer



From data perspective the physical layer properties doesn't make much difference, but BI uses this for formatting reasons. An another example might be if you have a varchar field of length 150, but in physical layer you set it to 100, then BI presentation layer will only display upto 100 characters and truncate the rest. This situation is particularly possible when database changes are made by DBA after importing physical table in the RPD, and changes are not communicated to OBIEE architects.


Thankfully this was an easy fix (very annoying though)