Skip to main content

Access olap data sources through xmla

Project description


This package is meant for accessing xmla datasources - see


In this directory, run:

python build


Tests are done against the Mondrian, SSAS, icCube XMLA providers. The testsDiscover module tests behavior with different XMLA providers with the Discover command while testsExecute does the same with the Execute command. Note that you likely need to modify the sources if you want to test yourself since they contain specifics (namely the location of the services and names of the data sources).


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")
# to analysis services (if iis proxies requests at /olap/msmdpump.dll)
# you will need a valid kerberos ticket of course
# c = p.connect(location="https://my-as-server/olap/msmdpump.dll", sslverify="/path/to/my/as-servers-ca-cert.pem") # or sslverify=False :)
# to icCube
# c = p.connect(location="http://localhost:8282/icCube/xmla", username="demo", password="demo")

# 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")
res.getSlice(property="Value") #return only the Value property from the cells

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


The contained vs.wsdl originates from the following package: and was subsequently modified (which parameters go in the soap header) to work with the suds package.olap.xmla



  • keyword kerberos is gone. kerberos auth need is detected automatically
  • BeginSession and EndSession provide XMLA Sessionsupport
  • changes to work with icCube XMLA provider


  • changed keyword doKerberos in XMLProvider.connect to kerberos
  • added sslverify keyword to XMLProvider.connect defaulting to True. This will be handed to requests get method, so you can point it to your certificate bundle file.


  • removed dependencies on specific versions in

Project details

Release history Release notifications

History Node


History Node


History Node


History Node


History Node


This version
History Node


History Node


History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
xmla-0.4.tar.gz (14.5 kB) Copy SHA256 hash SHA256 Source None Jun 18, 2012

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page