我有一个 XMLA 查询,它以 XML 形式返回 Analysis Services 多维数据集的状态和上次处理日期,如下所示:
询问:
<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>
结果:
<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>
我希望能够在 Integration Services 包中使用这个 XMLA 查询,解析结果并将结果存储在 SQL Server 数据库表中。然而,似乎执行 XMLA 查询的唯一任务是“Analysis Services Execute DDL”任务,据我所知,它没有返回查询结果的方法。
有没有人对如何实现这一目标有任何建议?