I have an XMLA query which returns the State and Last Processed date of an Analysis Services cube as XML, like so:
Query:
<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
<RequestType>DISCOVER_XML_METADATA</RequestType>
<Restrictions >
<RestrictionList xmlns="urn:schemas-microsoft-com:xml-analysis">
<DatabaseID>SSAS - Premium and Claims V2</DatabaseID>
<CubeID>PDW04 1</CubeID>
<ObjectExpansion>ReferenceOnly</ObjectExpansion>
</RestrictionList>
</Restrictions>
<Properties />
</Discover>
Result:
<return xmlns="urn:schemas-microsoft-com:xml-analysis">
<root xmlns="urn:schemas-microsoft-com:xml-analysis:rowset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:schema targetNamespace="urn:schemas-microsoft-com:xml-analysis:rowset" xmlns:sql="urn:schemas-microsoft-com:xml-sql" elementFormDefault="qualified">
<xsd:element name="root">
<xsd:complexType>
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
<xsd:element name="row" type="row" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:simpleType name="uuid">
<xsd:restriction base="xsd:string">
<xsd:pattern value="[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}" />
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="xmlDocument">
<xsd:sequence>
<xsd:any />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="row">
<xsd:sequence>
<xsd:element sql:field="METADATA" name="METADATA" type="xmlDocument" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
<row>
<xars:METADATA xmlns="http://schemas.microsoft.com/analysisservices/2003/engine" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:xars="urn:schemas-microsoft-com:xml-analysis:rowset">
<Cube>
<Name>Premium</Name>
<ID>PDW04 1</ID>
<CreatedTimestamp>2008-11-23T22:31:06</CreatedTimestamp>
<LastSchemaUpdate>2009-01-22T00:50:13</LastSchemaUpdate>
<LastProcessed>2009-01-07T22:28:34</LastProcessed>
<State>Processed</State>
</Cube>
</xars:METADATA>
</row>
</root>
</return>
I would like to be able to use this XMLA query in an Integration Services package, parsing and storing the result in a SQL Server database table. However the only tasks that seems to execute an XMLA query is the "Analysis Services Execute DDL" task, which does not have a method of returning results of the query as far as I can tell.
Does anyone have any suggestions on how else to achieve this?