site site-navbranch.xsl site

Skip to main content.

Looking for PowerPoint and/or Google Analytics solutions? Please follow the above links to

section no_callout.xsl no_callout

page static_html.xsl b2003_11_1

A full command-line XML/A client in WSH

This articles continues to incrementally build up a toolkit for declarative analytics using XML/A. The scripts execute.wsf and discover.wsf demonstrated the basics of a WSH command-line client for XML/A. This article will exand this idea into a full XML/A client. I and others have found this program quite useful in working with Analysis Services and XML/A.

The script xmla.wsf acts as a command-line proxy to XML/A servers. The command-line arguments provide access to most of the XML/A functionality. Some sample invocations of this script are shown in the file xmla.cmd. For example

cscript xmla.wsh /c:"FoodMart 2000" /d:cubes

will return a list of the cubes present in the FoodMart catalog. And

cscript xmla.wsh /c:"FoodMart 2000" /d:dimensions /r:"cube=Sales"

will list the dimensions present in the Sales cube. The /r parameter allows a list of restriction name-value pairs to be passed into the script. More complex examples are listed in the script source. Note that this script further generalizes listing3.1 by also supporting a /e (execute) parameter which accepts a quoted MDX expression to Execute. The /d and /e parameters are mutually exclusive. Other command-line arguments are supported - see the source and the xmla.cmd file.

I demonstrate in xmla.wsh a program that can actually be useful in testing queries against Analysis Services via XML/A. Even with the more sophisticated samples I will demonstrate in future articles, I will continue to use this script to test queries and check the metadata in the cube.

downloads: (8K)