jasonwjones / essbasepy

essbasepy is a MaxL Python module that provides Pythonic access to Oracle Essbase via MaxL. It is similar to the Perl module Essbase.pm.
27 stars 15 forks source link

essbasepy – MaxL Python Module

The MaxL Python Module, Essbase.py, provides access to Hyperion Essbase multi-dimensional databases from Python programs through MaxL. It is similar in function and usage to the Perl module Essbase.pm.

The Essbase Python module interfaces with Hyperion Essbase using a Python ctypes module wrapper for the primary MaxL dll (essmaxl.dll or essmaxlu.dll). The ctypes module is standard in Python 2.5+. Versions of the wrapper are available for Essbase 6.5, for Essbase 7-11.2.1, and for Essbase 11.1.2.2.

Distribution Notes

essbasepy files have now been consolidated down to a single distribution file. There are historical versions of essbasepy in for Essbase versions 6.5.x and 7.1.x in the legacy/ subfolder. Moving forward, they will not be maintained but will be part of this distribution for the foreseeable future.

General Installation

  1. Extract files
  2. (Optional) If you want Unicode support, edit Essbase.py and change ESS_UTF = False to ESS_UTF = True
  3. From the command line type: python setup.py install
  4. Test using one or more of the supplied sample Essbase/Python scripts.

Installation Sequence for 11.1.2.3/11.1.2.4

It took me awhile to get essbasepy to work on my Windows 2008 R2 64-bit server with Essbase (EPM) 11.1.2.3. After digging in, a solid sequence for getting essbasepy to work appears to be as follows. This assumes that your OS is 64-bit, and the Essbase/EPM software is 64-bit.

  1. Download and install Python 2.7.5 64-bit from python.org
  2. Extract essbasepy files to a folder such as C:\essbasepy. You should be able to put this anywhere but my recommendation would be to put it in a low level folder that doesn't have spaces in it
  3. Configure your PATH. You should have the Python folder and the Essbase DLL folder in your PATH. The beginning of my server's PATH is C:\Python27_64;C:\Oracle\Middleware\EPMSystem11R1\common\EssbaseRTC-64\11.1.2.0\bin
  4. Set the ESSBASEPATH environment variable.
    1. On my Windows 2008 R2 machine this is set to %EPM_ORACLE_HOME%\products\Essbase\EssbaseServer
    2. The EPM_ORACLE_HOME variable is set to C:\Oracle\Middleware\EPMSystem11R1
  5. Install the Essbase Python module with python setup.py install
  6. You should now be set. You should be able to run your own Python scripts that import the Essbase module from wherever you run them from

Functions

Example Scripts

MaxlExec.py - execute a MaxL command and display the results DisplayPrivilegeAll.py - display privileges of all users omitting databases with access of None mdxtest.py - sample MaxL and MDX commands

Common Issues

maxl.MaxLInit(byref(inst)) returns 6 (Fatal Error) Essbase.isInitialized = False

Ensure that the Essbase runtime client folder containing the MaxL dll is in your PATH. As of 11.1.2.1 the folder for 64-bit is %EPM_ORACLE_HOME%\common\EssbaseRTC-64\11.1.2.0\bin, for 32-bit it is %EPM_ORACLE_HOME%\common\EssbaseRTC\11.1.2.0\bin

History

October 19, 2017

March 10, 2016

August 30, 2013

Legacy History (prior to GitHub/moving to August 30, 2013)

To Do

In no particular order:

Authors

Currently maintained by Jason Jones. Originally created by David Welden.

License

essbasepy is licensed under the MIT License.