Wednesday 14 January 2015

Essbase and Planning drill-through with CubeDrill

Drill-through from Hyperion Essbase and Planning to data stored in relational databases or web reports is a fairly common requirement. Oracle does offer tools (FDM, Essbase Studio) to address this requirement which mostly work well but there are compromises to be made:
  • ETL needs to be built using the tool that does the drill-through. Most of the time ETL processes have already been built so re-writing them is costly and not always possible.
  • Upper level drill-through is not always possible. Needing to go to the lowest level in the hierarchy before performing a drill-through is not popular with users and it is not very useful either.
CubeDrill is an application that allows easy drill-through from Essbase and Planning to relational databases and web reports. CubeDrill has the following features:
  • Works as a plug-in on top of existing implementations so there is no need to re-write or modify existing data loads.
  • Allows drill-through from Essbase ASO/BSO and Planning to data stored in relational databases and web reports.
    • The drill-through can be performed from any level in the hierarchy using either Excel/Smart View or Planning web forms.
    • Supports drill-through to relational databases like SQL Server and Oracle Database. Most relational databases that have a JDBC driver are supported.
    • Supports drill-through to Financial Reports (using single sign-on) and other web reporting tools like OBIEE.
  • Does not store any data or metadata so maintenance is kept to a minimum. All information about hierarchies and members is sourced from the cube and the relational data store at query time.
  • It's easy to deploy and maintain as both the user and admin interfaces are web applications so no clients need to be deployed or maintained.
  • Once deployed the drill-through will be immediately available in existing and new Excel reports and Planning web forms.
Below is a quick and simple example of creating a drill-through report using CubeDrill. The example shows the building blocks of a drill-through report from Essbase Sample.Basic database to an Oracle Database. The drill-through can be done from any level in the Year, Measures, Product and Market dimensions with the Scenario dimension fixed to Actual.

Building a drill-through report in CubeDrill

Identify requirements
  • What dimensions will the drill-through be available for? What dimensions will be fixed (like Actual/Final) and what dimensions will the users be allowed to select at any level? 
    Let's say that data in Sample.Basic is loaded against Actual from a relational database. We want to only display a drill-through report if members Actual and Final are selected but allow the user to select any member at any level on the Year, Measures, Product and Market. To keep it simple no attributes dimensions were used but they are supported.
  • What is the data source and what tables will be queried ?
    EBS, Pronto, JDEdwards will probably translate to either SQL Server or Oracle DB. 
    For demo purposes a table called "SAMPLE_BASIC" is used which holds sample data used to load the Sample.Basic database.
Create drill-through report

Set up the connection to Essbase and the connection to the relational database. The Essbase connection and either be direct or trough provider services.


Create a new drill-through report, define a name and an action type. The action type can be either "Database Retrieve" or "HTTP Get/Post". In this example "Database Retrieve" will be used.


A new report is created. The drill regions, member queries and action (sql query) need to be defined
 




Define which regions of the database the drill-through will be available for. This way only a specific slice of the database will show the drill-through.
In the screenshot below ${ActualScenario} is a global substitution variable that can be defined at environment level and was used in this drill-region in order not to hardcode the name of the scenario.



Import cube dimensions from Essbase and define the member queries. When users perform a drill-through the member queries are executed against the Essbase outline to get the bottom level members. Import dimensions by clicking on the Auto Refresh button.


Create a member queries that get the level 0 descendants for each dimension. These member queries will return a comma separated list of members which are level 0 descendants of the year, measure, market or product selected by the user when it executes the drill-through report.

Member queries can be generated from the Dimensions section by clicking on the Generate Member Query button and selecting the appropriate option.


Member queries are generated for Year, Measures, Product and Market. More complex member queries that combine dimensions and attributes can be inputted manually.


The action that the report will execute once a user initiates a drill-through needs to be built. The action in this example is to retrieve data from an Oracle Database that matches the year, measure, market and product selected by the user. If the user selects an upper level member on any dimension then the records in the SAMPLE_BASIC table matching the level 0 descendants of that members will be returned to the user.

First select the database that the query will be run against and then define the file type that will be returned to the user: CSV, XLS, XLSX, PDF or HTML.
Now the SQL query that will be executed when a user does a drill-through needs to be built. The SQL query will be using substitution variables and upper level members that the users have selected will be expanded to their bottom level descendants by querying the Essbase outline.

The report is now ready. Click on the "Upload to Essbase" button to activate the report and make it available to all users (authenticated and authorised users)


Now the drill-through report is visible to all users in Smart View and Planning web forms.

In Excel a drill-through can be initiated by double clicking on the data cell or clicking on the Drill-Through button in the Smart View ribbon. If more than one drill-through report is defined for a cell than a list of reports will be shown for the user to choose the one it needs.



In Planning a drill-through can be initiated by right clicking the data cell and selecting Drill Back To Source.  As with Smart View if more than one drill-through report is defined for a cell than a list of reports will be shown for the user to choose the one it needs.








Based on the defined drill-through report action once the user initiates the drill-through from either Excel or Web Forms an XLSX document will be returned that contains all the records in the SAMPLE_BASIC table that match member or the level 0 descendants of the members selected by the user. Below is an example of a file created in return to a drill-through.


If logging is enabled all generated drill-through reports will be logged. Looking at the logs how the SQL query is built and how the substitution variables get expanded to level 0 members becomes more evident.