SmartView is a Ruby library for implementing clients that can communicate with Hyperion’s SmartView providers.
Hyperion® SmartView for Office is a Microsoft Office Add-In that allows Office products to interact with Oracle’s Hyperion Essbase, Hyperion Financial Management, Hyperion Planning and Hyperion Workspace products.
The SmartView Add-In communicates with SmartView Providers via XML over HTTP. This protocol is not published, but is fairly straightforward to reverse engineer. Providers appear to use a common protocol, albeit with some small differences depending on the data source.
The SmartView gem provides a Ruby implementation of the SmartView protocol, allowing Ruby programs to act as clients to SmartView providers. The SmartView gem hides the details of the protocol, and provides a relatively simple interface for Ruby programs that wish to retrieve data and metadata from Hperion Essbase and Financial Management.
-
Download the source from github, then run the following command to create the SmartView gem:
rake gem:gem
-
Install the gem into your Ruby using the following gem command:
gem install <path-to-gem>
-
The SmartView gem has a small number of dependencies: builder, hpricot, and httpclient. If you are using JRuby and wish to use SSL, you will also need to install the jruby-openssl gem.
Now that you have the SmartView gem installed, you are ready to interact with a SmartView provider, and retrieve data.
require 'smartview' sm = SmartView.new 'http://<some-server>/HFMProvider/HFMProvider.aspx' sm.connect user, password # or sm.connect = sso_token sm.open_app server, app, cube grid = sm.free_form_grid( {'Accounts' => ['IS', 'BS']}, # Row dimension is Accounts, members are IS and BS {['Year', 'Periods'] => [['2009', 'Dec'], ['2010', 'Jan']}, # Two column dimensions {'Scenario' => 'Actual', 'Value' => 'USD Total'} # Non-default POVs ) puts grid # Outputs: # 2009 2010 # Dec Jan # IS 1234.56 2345.67 # BS 7890.12 8910.12 sm.close_app
The SmartView gem provides a number of methods for obtaining metadata from a SmartView provider.
Returns a list of the dimensions within the current cube.
Note: For Essbase cubes, this method does not return attribute dimensions. Support for obtaining additional metadata about individual dimensions, including the attribute dimensions to which they are linked, will be added shortly.
Returns a list of available filters for a dimension. This includes standard hierarchical filters, which vary by provider and dimension type, but are otherwise common across cubes, as well as custom member lists for HFM data sources.
Returns a list of members in a dimension, optionally filtered by a filter specification.
Returns a list of member names within a dimension that match the specified member name pattern.
This code is provided under a BSD-style licence - See COPYING for licence terms.