views:

329

answers:

2

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

Thanks for help. Best Regards.

PS. syntax I use: ascmd.exe -S Servername -d Database -i query.mdx -Tf csv -o output.csv

+1  A: 

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

You could log this as a request in the Issue Tracker on the ascmd site. Another possible work around would be to configure a linked server on your SQL Server and use the OPENQUERY() function to send MDX to SSAS.

Darren Gosbell
A: 

Indeed ascmd utility doesn't provide table output. I think it's because MDX queries can create multidimensional outputs (like pivot-tables, where there are many elements and hierarchies on rows and on columns). If you need the ability to create output in CSV format, try creating static method which transform XMLA to CSV and add it to ascmd source code.

pascon