How to convince ascmd.exe to make tables as output rather than XML file?

I am trying to see data in my OLAP cube using the ascmd utility. As input, I put in an MDX query, but only what I have as output (on the command line) is an XML file. I tried to use -Tf text and -Tf csv parameters, but they don't work the way I think they should (I have XML in the output all the time). I want my output to be something like this www.pinaldave.com/download/sqlcmd4.gif - Is it possible to get the text output in ascmd (as in sqlcmd)?

Thanks for the help. Regards.

PS. the syntax I am using is: ascmd.exe -S Servername -d Database -i query.mdx -Tf csv -o output.csv

+1


source to share


2 answers


I believe -Tf is the format for capturing trace output, not query results.



You can register this as a request in the Issue Tracker on the ascmd site . Another possible workaround is to set up a linked server on your SQL Server and use the OPENQUERY () function to send the MDX to SSAS.

+3


source


Indeed, the ascmd utility does not provide table output. I think this is because MDX queries can generate multidimensional outputs (like pivot tables that have many items and hierarchies for rows and columns). If you need the ability to generate CSV output, try creating a static method that converts XMLA to CSV and adds it to the ascmd source code.



0


source







All Articles