xmla

Access olap data sources through xmla
Download

xmla Ranking & Summary

Advertisement

  • Rating:
  • License:
  • The Apache License 2.0
  • Price:
  • FREE
  • Publisher Name:
  • Norman Kramer
  • Publisher web site:
  • https://github.com/may-day/

xmla Tags


xmla Description

xmla is a Python module meant for accessing xmla datasources - see http://en.wikipedia.org/wiki/XML_for_AnalysisBUILDIn this directory, run: python setup.py buildTESTINGTests are done against the Mondrian and SSAS 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).SAMPLEHere is an example how to use it:import olap.xmla.xmla as xmlap = xmla.XMLAProvider()c = p.connect(location="http://localhost:8080/mondrian/xmla", doKerberos = False)# getting info about provided dataprint 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 {.ALLMEMBERS} * {...children} on columns,..ALLMEMBERS on rowsfrom """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 canres.getSlice() # return allres.getSlice(Axis0=3) # carve out the 4th columnres.getSlice(Axis0=3, SlicerAxis=0) # same as above, SlicerAxis is ignoredres.getSlice(Axis1=) # return the data sliced at the 2nd and 3rd rowres.getSlice(Axis0=3, Axis1=) # return the data sliced at the 2nd and 3rd row in addition to the 4th columnNoteThe 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 suds package.Product's homepage


xmla Related Software