0

I'm trying to directly connect to Essbase using Python. I can import Essbase, but I'm getting an error

  File "<ipython-input-14-a27e56c0bf67>", line 702, in <module>
    esss = Essbase.Essbase()

TypeError: 'module' object is not callable

code

import Essbase
import subprocess


if __name__ == '__main__':




    fomat_meta = """

        alter session set dml_output alias off 
        alter session set dml_output numerical_display fixed_decimal 
        alter session set dml_output precision 2 
        set column_width 50;


        """

    MDX_SQL = """



               SELECT NON EMPTY {Uda([Org Unit], "PA")} ON ROWS
               ,
               {[Nov]} ON COLUMNS 

               from CUBE 
               where ([Measure].[33333],[Product].[CHQ]) 
           """


    sql = [

        MDX_SQL
    ]


    esss = Essbase.Essbase()
    eh = esss.connect("USERID", "PASSWORD", "123.123.123.123")

    print(MDX_SQL)
    esss.bMdxQuery = True

    #for sqls in sql:
    esss.execute(MDX_SQL)

    xxx = esss.rows()


    print("Disconnecting...")
    esss.disconnect()

I tried calling Essbase and Essbase.Essbase Then I get below. I think module does exist.

Essbase will return: module 'Essbase' from 'C:\Python3\Lib\Essbase.py'

Essbase.Essbase will return: module 'Essbase' from 'C:\Python3\Lib\Essbase.py'

khelwood
  • 55,782
  • 14
  • 81
  • 108
Blue_Lion
  • 73
  • 8
  • 1
    Seems like an installation problem since the example provided by Essbasepy used the same call https://github.com/jasonwjones/essbasepy/blob/8528f9f10082fccf202aa17a081b880cc1b9eeb2/examples/mdxtest.py#L2 Did you use the installation instruction here? https://github.com/jasonwjones/essbasepy#general-installation – kkawabat Aug 28 '19 at 21:47
  • Thanks, this is helpful. I realized ESSBASEPATH environmental variable is not set. I have installed EssbaseClient but this path wasn't created during installation. The provided github link suggests C:\Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseServer but I don't have EssbaseServer folder. Instead, I have 3 other folders under C:\ORACLE\Middleware\EPMSystem11R1\products\Essbase\EssbaseClient. Do you know how I can find the right path for ESSBASEPATH? – Blue_Lion Aug 29 '19 at 02:19
  • 1
    I don't actually use Essbase but you can maybe try searching your whole system directory for the keyword EssbaseServer. Also maybe you don't have the Essbase/EPM server installed, maybe you only installed the client? can you see if you have the path detailed here to run the server?if not you propbably dont have it installed https://docs.oracle.com/cd/E57185_01/EPMIS/apcs01s07.html – kkawabat Aug 29 '19 at 17:06

0 Answers0