Whilst not changing nappies and singing lullabies, Sacha is developing a .Net mdx helper class that behaves very much like an ADOMD command and runs an mdx query that returns a data table. “Why not just use ADOMD?” I hear you ask – as Sacha mentions there are a number of reasons such as the fact that the data types are not returned (needed by .Net controls like Chartfx) and top level hierarchies (“All Time” etc ) are not always returned dependant on your query layout. And in fact Sacha’s little helper (ho ho ho) does use ADOMD but rather than use the returned table it parses the XML file that is generated. This XML is actually quite simple once you get your head around the layout and is in fact very rich containing all sorts of metadata that is not returned in by ADOMD
Other nice functionality includes the ability to return a number of cube and database properties (Description etc, last update, last processed);
But the functionality I really like is that the class uses a stored query definition which can contain parameters much like a SQL stored procedure. Sach and I have had a number of conversations over the past few days about why there is no concept of this in AS2005 (or 2008?) and haven’t come up with a valid reason. Surely people out there want to be able to re-use the same mdx queries (with different parameters). How cool would it be to be able to use “exec mdxsp_GetResults(Param1, Param2)” in various mdx editors. At current the query defs are stored in text files but we’re looking at alternatives such as using msdb or the even the xmla cube def itself.
In fact I’m surprised that no-one has done this already – or have they?? Very interested to know if people think this is something worthwhile?
NB – if you found this blog looking for the excellent AS Stored procedures project it’s here