Giter Site home page Giter Site logo

olap's Introduction

olap.xmla

This package is meant for accessing xmla datasources - see http://en.wikipedia.org/wiki/XML_for_Analysis

Example to set up a develop environment

In your workdir run:

# create virtualenv 
python3 -m venv xyz
cd xyz
source bin/activate
git clone https://github.com/may-day/olap
cd olap/xmla
# optional if you have it already
pip install pipenv
pipenv install -dev
python setup.py develop
# now you should be good to go

Testing

See HOWTO

Example

Here is an example how to use it:

    import olap.xmla.xmla as xmla
    p = xmla.XMLAProvider()
    # mondrian
    c = p.connect(location="http://localhost:8080/mondrian/xmla")

    # or ssas - note that thhis needs setup on an iis
    # also you'll probably need to authenticate using kerberos
    # from requests_kerberos import HTTPKerberosAuth
    # c = p.connect(location="https://my-as-server/olap/msmdpump.dll", 
    #               sslverify="/path/to/my/as-servers-ca-cert.pem", auth=HTTPKerberosAuth())

    # getting info about provided data
    print(c.getDatasources())
    print(c.getMDSchemaCubes())
    # for ssas a catalog is needed, so the call would be like
    # get a catalogname from a call to c.getDBSchemaCatalogs()
    # c.getMDSchemaCubes(properties={"Catalog":"a catalogname"})

    # execute a MDX (working against the foodmart sample catalog of mondrian)
    cmd= """
    select {[Measures].ALLMEMBERS} * {[Time].[1997].[Q2].children} on columns, 
    [Gender].[Gender].ALLMEMBERS on rows 
    from [Sales]
    """

    res = c.Execute(cmd, Catalog="FoodMart")
    #return only the Value property from the cells
    res.getSlice(properties="Value")
    # or two props
    res.getSlice(properties=["Value", "FmtValue"]) 

    # to return some subcube from the result you can
    # return all
    res.getSlice()
    # just the 4th column
    res.getSlice(Axis0=3) 
    # same as above, SlicerAxis is ignored
    res.getSlice(Axis0=3, SlicerAxis=0) 
    # return the data sliced at the 2nd and 3rd row
    res.getSlice(Axis1=[1,2]) 
    # return the data sliced at the 2nd and 3rd row and at the 4th column
    res.getSlice(Axis0=3, Axis1=[1,2]) 

Using the procedural interface:

    import olap.xmla.xmla as xmla

    p = xmla.XMLAProvider()
    c = p.connect(location="http://localhost:8080/mondrian/xmla")
    s = c.getOLAPSource()

    # import olap.interfaces as oi
    # oi.IOLAPSource.providedBy(s) == True

    s.getCatalogs()
    s.getCatalog("FoodMart").getCubes()
    s.getCatalog("FoodMart").getCube("HR").getDimensions()
    s.getCatalog("FoodMart").getCube("HR").getDimension("[Department]").\
    getMembers()
    s.getCatalog("FoodMart").getCube("HR").getDimension("[Department]").\
    getMember("[Department].[14]")

    cmd= """
    select {[Measures].ALLMEMBERS} * {[Time].[1997].[Q2].children} on columns, 
    [Gender].[Gender].ALLMEMBERS on rows 
    from [Sales]
    """
    res=s.getCatalog("FoodMart").query(cmd)
    res.getSlice()

Note

The contained vs.wsdl originates from the following package: http://www.microsoft.com/en-us/download/confirmation.aspx?id=9388 and was subsequently modified (which parameters go in the soap header) to work with the zeep.

olap's People

Contributors

may-day avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

olap's Issues

503 errors

Is there any way to improve 503 errors we get when hitting IIS service? We get those intermittently but are annoying. Configuration changes on IIS service resulted in nothing substantial.

Mondrian UnsupportedOperationException on XMLAMember.getChildren()

I am attempting to crawl a hierarchy and am getting an error whenever I attempt to call "getChildren" on any XMLAMember. I've tried pulling members from a Hierarchy and a Level. The results are the same.

I've provided what I believe to be all relevant environment/context, but I'm happy to provide anything I'm able on request. From what I can tell, Mondrian is not liking the XML/A request coming from the library. Not sure if it's something that you're aware of, or if it's something that can be worked around.

I appreciate any help you're willing/able to provide.

Python Version: 2.7.3

Package Version (from "pip freeze"): xmla==0.7.2

Mondrian Version: 3.9

Example Code (sensitive information has been replaced. example output below)

import olap.xmla.xmla as xmla

location = "http://mondrian.example.com:8080/pentaho/Xmla"
username = "username"
password = "password"

xmla_provider = xmla.XMLAProvider()

xmla_connection = xmla_provider.connect(location=location, username=username, password=password)

olap_source = xmla_connection.getOLAPSource()

h = olap_source.getCatalog('MyCatalog').getCube('Click').getDimension('[Vendor]').getHierarchy('[Vendor]')

for member in h.getMembers():
    print "Member: %s" % member.getUniqueName()

    if member.hasChildren():
        #ERROR OCCURS WHEN EXECUTING NEXT LINE
        for child in member.getChildren():
            print "Child: %s" % child.getUniqueName()

OUTPUT:

No handlers could be found for logger "olap.xmla.requests_kerberosauth"
Member: [Vendor].[All Vendors]
Traceback (most recent call last):
  File "bug.py", line 19, in <module>
    for child in member.getChildren():
  File "/usr/local/lib/python2.7/dist-packages/olap/xmla/xmla.py", line 276, in getChildren
    more_restrictions={"TREE_OP":TREE_OP.CHILDREN})
  File "/usr/local/lib/python2.7/dist-packages/olap/xmla/xmla.py", line 101, in getSchemaElements
    props = func(r, properties)
  File "/usr/local/lib/python2.7/dist-packages/olap/xmla/connection.py", line 67, in <lambda>
    *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/olap/xmla/connection.py", line 109, in Discover
    raise XMLAException(fault.message, dictify(fault.fault))
olap.xmla.interfaces.XMLAException: Server raised fault: 'XMLA Discover unparse results error'

MONDRIAN Exception (from bi-server/tomcat/logs/pentaho.log)

2015-05-29 10:51:29,814 ERROR [mondrian.xmla.XmlaServlet] Errors when handling XML/A message
mondrian.xmla.XmlaException: Mondrian Error:XMLA Discover unparse results error
        at mondrian.xmla.XmlaHandler.discover(XmlaHandler.java:2873)
        at mondrian.xmla.XmlaHandler.process(XmlaHandler.java:671)
        at mondrian.xmla.impl.DefaultXmlaServlet.handleSoapBody(DefaultXmlaServlet.java:507)
        at mondrian.xmla.XmlaServlet.doPost(XmlaServlet.java:318)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
...
Caused by: java.lang.UnsupportedOperationException
        at mondrian.xmla.RowsetDefinition$SharedDimensionHolderCube.lookupMember(RowsetDefinition.java:6552)
        at mondrian.xmla.RowsetDefinition$MdschemaMembersRowset.outputUniqueMemberName(RowsetDefinition.java:5711)
        at mondrian.xmla.RowsetDefinition$MdschemaMembersRowset.populateCatalog(RowsetDefinition.java:5476)
        at mondrian.xmla.RowsetDefinition$MdschemaMembersRowset.populateImpl(RowsetDefinition.java:5459)
        at mondrian.xmla.Rowset.populate(Rowset.java:222)
        at mondrian.xmla.Rowset.unparse(Rowset.java:194)
        at mondrian.xmla.XmlaHandler.discover(XmlaHandler.java:2867)

...

Update for Python3

Not sure if this is the right place: the current version doesn't appear to work with Python3 due to reliance on the suds package. The package suds-jurko appears to be a potential replacement. Any plan to update to work with Python3?

Closing a connection

This is not an issue but I don't know where else to submit a question for feedback.

Is there a way to close a connection using xmla? Following the examples, what do you do when a session is over? I see there is an EndSession definition in the connection module but it doesn't seem like this should be called directly since the corresponding BeginSession is never used by the user. The XMLAProvider and XMLAClass also do not appear to have any close method.

I was thinking there would be a connection.close() method or something similar to cleanly close the connection to the server. It feels weird just letting it hang and hoping the system will close correctly/eventually after a program is executed and closes.

Any comments/guidance are appreciated.

ModuleNotFoundError: No module named 'client'

ERROR: Command errored out with exit status 1:
command: 'C:\ProgramData\Anaconda3\pythonw.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\e110772\AppData\Local\Temp\1\pip-install-_mqjhstk\suds\setup.py'"'"'; file='"'"'C:\Users\e110772\AppData\Local\Temp\1\pip-install-_mqjhstk\suds\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\e110772\AppData\Local\Temp\1\pip-pip-egg-info-9jxxtdhu'
cwd: C:\Users\e110772\AppData\Local\Temp\1\pip-install-_mqjhstk\suds
Complete output (7 lines):
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\e110772\AppData\Local\Temp\1\pip-install-_mqjhstk\suds\setup.py", line 20, in
import suds
File "C:\Users\e110772\AppData\Local\Temp\1\pip-install-mqjhstk\suds\suds_init.py", line 154, in
import client
ModuleNotFoundError: No module named 'client'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

examples don't work

the problem was simply

if you write

import olap.xmla.xmla as xmla
p = xmla.XMLAProvider()
c = p.connect("http://localhost:XXXX/mondrian/xmla")

xmla will fail because the first parameter is url of wsdl

Te correct syntax is

import olap.xmla.xmla as xmla
p = xmla.XMLAProvider()
c = p.connect(location="http://localhost:XXXX/mondrian/xmla")

Connecting to MS SAAS

Hi,

I am trying to connect from Ubuntu 20.04 to a 3rd party MS SAAS service on the Internet. This is the current code:

import olap.xmla.xmla as xmla
from requests import Session
from requests_ntlm import HttpNtlmAuth

# for debugging the authentication
from zeep import Client
from zeep.transports import Transport

MYUSER='THEDOMAIN\\THEUSER'
MYPASS='THEPASSWORD'
MYURL='https://THEINTERNETDOMAIN/olap/msmdpump.dll'

session = Session()
session.auth = HttpNtlmAuth(MYUSER, MYPASS)

# first we test it we can actually authenticate with user + pass
# this is done directly with Zeep and depends on the IP being whitelisted
try:
    client = Client( MYURL , transport=Transport(session=session))
except Exception as e:
    # 500 means auth is OK, 401 means authentication problem
    #print('Connection result was ' + str(e)

    if "500 Server Error" in str(e):
        print('Authentication was sucessful')
    else:
        print('Authentication problem - check your credentials and source IP')

# then we try to work with the XMLA connection provider, which uses Zeep underneath
p = xmla.XMLAProvider()

# the connection REALLY needs to be NTLM
c = p.connect(location=MYURL, session=session, Log=True, sslverify=False )

# in order to debug this change to the logger to debug level
# at the top of "olap/xmla/connection.py"
#
# logging.basicConfig(level=logging.DEBUG)

# getting info about provided data
print(c.getDatasources())

The connection seems to succeed but the XML response, visible with logging.DEBUG, brings the following error:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault xmlns="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>XMLAnalysisError.0xc10d0009</faultcode><faultstring>An error was encountered in the transport layer.</faultstring><detail><Error ErrorCode="3238854665" Description="An error was encountered in the transport layer." Source="Unknown" HelpFile=""/></detail></soap:Fault></soap:Body></soap:Envelope>
Traceback (most recent call last):
  File "/home/gustavo/cubetest/xyz/olap/xmla/olap/xmla/connection.py", line 154, in Discover
    doc=self.service.Discover(RequestType=what, Restrictions=rl, Properties=pl, _soapheaders=self._soapheaders)
  File "/home/gustavo/cubetest/xyz/lib/python3.8/site-packages/zeep-4.0.0-py3.8.egg/zeep/proxy.py", line 46, in __call__
    return self._proxy._binding.send(
  File "/home/gustavo/cubetest/xyz/lib/python3.8/site-packages/zeep-4.0.0-py3.8.egg/zeep/wsdl/bindings/soap.py", line 135, in send
    return self.process_reply(client, operation_obj, response)
  File "/home/gustavo/cubetest/xyz/lib/python3.8/site-packages/zeep-4.0.0-py3.8.egg/zeep/wsdl/bindings/soap.py", line 229, in process_reply
    return self.process_error(doc, operation)
  File "/home/gustavo/cubetest/xyz/lib/python3.8/site-packages/zeep-4.0.0-py3.8.egg/zeep/wsdl/bindings/soap.py", line 329, in process_error
    raise Fault(
zeep.exceptions.Fault: None

Googling for "An error was encountered in the transport layer." we found many occurrences of this error on different environments but it isn't clear how a solution could be applied here. Any ideas on how to overcome this?

dependencies on >= instead of ==

The dependencies in xmla/setup.py are really strict and depend on exact versions, down to the third digit. This prevents fpm-built Debian packages from being usable, as fpm puts these dependencies into the Debian control file.
Would it be possible to use >= instead of == ?

Can't import package

I'm using Python 2.7.15 and installing xmla-0.7.2 via git clone
I have tried running the sample code and it appeared not working since the import package line.

import olap.xmla.xmla as xmla
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named xmla.xmla

Not Getting dimension members from ROWS

I need dimension memeber's data from rows, so for example from below query I need value of set3 which is not possible with the current setup.
"""select {%(set1)s} * {%(set2)s} on columns,
%(set3)s on rows
from %(cube)s"""

Error on install

I'm trying to install the module but get an error message after entering "pip install xmla". I'm completely new to Python, so I'm assuming user error (and forgive my ignorance), but any feedback would be fantastic. See screenshot.
capture

Can't import XMLAConnection

I am trying to import olap but i am getting this error:

Cannot improt name 'XMLAConnection'. Does anybody have a clue?

Thanks for your help.

Connecting with authentication

Hi

I would like to connect to a Pentaho Business Intelligence Server that runs an instance of Mondrian. It, however, requires that you authenticate with a username and password during connection. Is that possible with this library. I could not find any way to add credentials to the connection.

Thanks

Is it possible to connect to PowerBI?

I'm trying to access a PBI data using XMLS endpoint, my code looks like this:

    url = f"powerbi://api.powerbi.com/v1.0/myorg/{workspace_name}"
    print(url)

    p = xmla.XMLAProvider()
    c = p.connect(location=url)       # <-- code fails here

The output is given below:

powerbi://api.powerbi.com/v1.0/myorg/<My workspace name>
Traceback (most recent call last):
  File "<My project path>\test XMLA connectivity.py", line 130, in <module>
    get_pbi_data_with_dax_XMLA(workspace_name, initial_catalog, sp_powerbi_login, sp_powerbi_pass, dax)
  File "<My project path>\test XMLA connectivity.py", line 97, in get_pbi_data_with_dax_XMLA
    c = p.connect(location=url)
  File "<My project venv>\Lib\site-packages\olap\xmla\olap\xmla\xmla.py", line 26, in connect
    return XMLASource(url, location, sslverify, **kwargs)
  File "<My project venv>\Lib\site-packages\olap\xmla\olap\xmla\xmla.py", line 143, in __init__
    XMLAConnection.__init__(self, urlwsdl, location, sslverify, **kwargs)
  File "<My project venv>\Lib\site-packages\olap\xmla\olap\xmla\connection.py", line 124, in __init__
    self.client = Client(url, 
  File "<My project venv>\lib\site-packages\zeep-4.2.1-py3.10.egg\zeep\client.py", line 76, in __init__
    self.wsdl = Document(wsdl, self.transport, settings=self.settings)
  File "<My project venv>\lib\site-packages\zeep-4.2.1-py3.10.egg\zeep\wsdl\wsdl.py", line 92, in __init__
    self.load(location)
  File "<My project venv>\lib\site-packages\zeep-4.2.1-py3.10.egg\zeep\wsdl\wsdl.py", line 95, in load
    document = self._get_xml_document(location)
  File "<My project venv>\lib\site-packages\zeep-4.2.1-py3.10.egg\zeep\wsdl\wsdl.py", line 155, in _get_xml_document
    return load_external(
  File "<My project venv>\lib\site-packages\zeep-4.2.1-py3.10.egg\zeep\loader.py", line 89, in load_external
    content = transport.load(url)
  File "<My project venv>\lib\site-packages\zeep-4.2.1-py3.10.egg\zeep\transports.py", line 123, in load
    content = self._load_remote_data(url)
  File "<My project venv>\lib\site-packages\zeep-4.2.1-py3.10.egg\zeep\transports.py", line 135, in _load_remote_data
    response = self.session.get(url, timeout=self.load_timeout)
  File "<My project venv>\lib\site-packages\requests\sessions.py", line 602, in get
    return self.request("GET", url, **kwargs)
  File "<My project venv>\lib\site-packages\requests\sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "<My project venv>\lib\site-packages\requests\sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "<My project venv>\lib\site-packages\requests_file-1.5.1-py3.10.egg\requests_file.py", line 34, in send
    raise ValueError("file: URLs with hostname components are not permitted")
ValueError: file: URLs with hostname components are not permitted

Installation was done the way it is shown in a Readme in Cygwin, a step pipenv install -dev was omitted as it said:

pipenv install -dev
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRT
UALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "<My project venv>\Scripts\pipenv.exe\__main__.py", line 7, in <module>
  File "<My project venv>\lib\site-packages\pipenv\vendor\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "<My project venv>\lib\site-packages\pipenv\cli\options.py", line 58, in main
    return super().main(*args, **kwargs, windows_expand_args=False)
  File "<My project venv>\lib\site-packages\pipenv\vendor\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "<My project venv>\lib\site-packages\pipenv\vendor\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "<My project venv>\lib\site-packages\pipenv\vendor\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "<My project venv>\lib\site-packages\pipenv\vendor\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "<My project venv>\lib\site-packages\pipenv\vendor\click\decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "<My project venv>\lib\site-packages\pipenv\vendor\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "<My project venv>\lib\site-packages\pipenv\cli\command.py", line 235, in install
    do_install(
  File "<My project venv>\lib\site-packages\pipenv\routines\install.py", line 69, in do_install
    ensure_project(
  File "<My project venv>\lib\site-packages\pipenv\utils\project.py", line 32, in ensure_project
    ensure_virtualenv(
  File "<My project venv>\lib\site-packages\pipenv\utils\virtualenv.py", line 148, in ensure_virtualenv
    python = ensure_python(project, python=python)
  File "<My project venv>\lib\site-packages\pipenv\utils\virtualenv.py", line 242, in ensure_python
    path_to_python = find_a_system_python(python)
  File "<My project venv>\lib\site-packages\pipenv\utils\virtualenv.py", line 353, in find_a_system_python
    finder = Finder(system=False, global_search=True)
  File "<My project venv>\lib\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 24, in __init__
    self.system_path = self.create_system_path()
  File "<My project venv>\lib\site-packages\pipenv\vendor\pythonfinder\pythonfinder.py", line 38, in create_system_path
    return SystemPath.create(
  File "<My project venv>\lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 541, in create
    instance._run_setup()
  File "<My project venv>\lib\site-packages\pipenv\vendor\pythonfinder\models\path.py", line 200, in _run_setup
    venv = ensure_path(venv)
  File "<My project venv>\lib\site-packages\pipenv\vendor\pythonfinder\utils.py", line 237, in ensure_path
    path = possibly_convert_to_windows_style_path(path)
  File "<My project venv>\lib\site-packages\pipenv\vendor\pythonfinder\environment.py", line 26, in possibly_convert_to_windows_style_path
    drive, tail = re.match(r"^/([a-zA-Z])/(.*)", path).groups()
AttributeError: 'NoneType' object has no attribute 'groups'
(venv)

Am I right that this XMLA reader requires some DLLs that are not of open-source type?

Thank you!

Cannot see tabular models on my SSAS server using XMLA0.7.2

I am able to query SSAS tabular model using other clients over http but with XMLA0.7.2 Package I am not able to see my catalog, following is the error I get.

import olap.xmla.xmla as xmla
provider = xmla.XMLAProvider()
connect = provider.connect(location=โ€˜http://101.101.101.27/ankit/msmdpump.dll',username='test_user',password='')
source = connect.getOLAPSource()
print(source.getCatalog("AdvenrureWorks2012-1200"))
Traceback (most recent call last):
File "/home/ankigupt/pythonxmla1/olap/xmla/olap/xmla/connection.py", line 153, in Discover
doc=self.service.Discover(RequestType=what, Restrictions=rl, Properties=pl, _soapheaders=self._soapheaders)
File "/home/ankigupt/pythonxmla1/lib/python3.6/site-packages/zeep/proxy.py", line 45, in call
kwargs,
File "/home/ankigupt/pythonxmla1/lib/python3.6/site-packages/zeep/wsdl/bindings/soap.py", line 130, in send
return self.process_reply(client, operation_obj, response)
File "/home/ankigupt/pythonxmla1/lib/python3.6/site-packages/zeep/wsdl/bindings/soap.py", line 195, in process_reply
return self.process_error(doc, operation)
File "/home/ankigupt/pythonxmla1/lib/python3.6/site-packages/zeep/wsdl/bindings/soap.py", line 287, in process_error
detail=etree_to_string(doc),
zeep.exceptions.Fault: Unknown fault occured

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "/home/ankigupt/pythonxmla1/olap/xmla/olap/xmla/xmla.py", line 156, in getCatalog
aslist=unique_name==None)
File "/home/ankigupt/pythonxmla1/olap/xmla/olap/xmla/xmla.py", line 112, in getSchemaElements
props = func(r, properties)
File "/home/ankigupt/pythonxmla1/olap/xmla/olap/xmla/connection.py", line 93, in
*args, **kw)
File "/home/ankigupt/pythonxmla1/olap/xmla/olap/xmla/connection.py", line 159, in Discover
raise XMLAException(fault.message, dictify(fromETree(fault.detail, ns=None)))
File "/home/ankigupt/pythonxmla1/olap/xmla/olap/xmla/utils.py", line 143, in fromETree
for (k,v) in e.attrib.items():
AttributeError: 'bytes' object has no attribute 'attrib'

Anything missing from my side?

Connecting to local OLAP Server

I looked through the readme and have attempted to log in to a local OLAP Server. From the Readme and everywhere I've looked online I don't know if this is able to connect to a local OLAP or only through http?

My code is probably wrong?

location = 'SQLOLAPCP'
username = 'username'
password = 'password'
provider = xmla.XMLAProvider()
cxn = provider.connect(location=location, username=username, password=password)
print cxn.getOLAPSource()

This code gives me the following error:
No handlers could be found for logger "olap.xmla.requests_kerberosauth"
XMLASource:{}

Thanks for your help!

Installation forces outdated requests.

Dear all,
install of this package forces my requests to downgrade to 1.2.3 which is 8 years old now.
Is there a way to upgrade the requirements?

Best

Daniel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.