Created
May 1, 2014 18:24
-
-
Save bkanuka/11458189 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import olap.xmla.xmla as xmla | |
provider = xmla.XMLAProvider() | |
con = provider.connect(location='http://{server}/OLAP/msmdpump.dll'.format(server='YOUR SERVER IP')) | |
# Verify that we are connected | |
print c.getMDSchemaCubes() | |
# Write MDX query | |
cmd = """SELECT NON EMPTY { [Measures].[Count] } ON COLUMNS FROM [OLAP]""" | |
cur = con.Execute(cmd) | |
# get all data: | |
cur.getSlice() | |
# get Values only: | |
cur.getSlice(properties="Value") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment