2.2.3.1 AffectedObjects

An application that uses the Tabular Metadata commands described in section 3.1.5.1.1 can set the ReturnAffectedObjects XMLA property. When this property is equal to or greater than 1, the command returns an object in the return element of the ExecuteResponse element (see [MS-SSAS] section 3.1.4.3.2.2.1) called AffectedObjects.

The AffectedObjects element has the following attributes.

Attribute

Type

Description

name

string

The name of the database that was affected by the operation.

BaseVersion

integer

The version of the Tabular model before this operation was performed.

CurrentVersion

integer

The version of the Tabular model after this operation was performed.

The AffectedObjects element has the following child elements.

Element

Type

Description

root

Array of rowset objects

Zero or more rowset objects. Each rowset contains rows representing metadata objects that were affected by the operation.

The rowset object type is defined in [MS-SSAS].

Each root element adds the following attribute.

Attribute

Type

Description

name

string

The type of object that was affected by the operation.

The name attribute identifies the type of object that was affected.

The columns of the rowset correspond to the columns defined by the Discover response for that object type. The columns for each Discover response that are specific to a particular Discover operation are described with the operation in section 3.1.5.1.1.

In addition, the following column is appended to each rowset.

Column

Type

Default

Description

ImpactType

integer

0

The type of modification that was made to the object. The possible values are as follows:

  • 0 – The object in the row was modified by the operation. The row then contains the new state of the object.

  • 1 - The object in the row was deleted by the operation.<2>

A client application can use the AffectedObjects object to determine the new state of all objects that were changed on the server as a result of the operation. A request to the server can indirectly affect more objects than the ones explicitly specified in the request.

The following is an example of the AffectedObjects response.

 <return xmlns="urn:schemas-microsoft-com:xml-analysis">
   <AffectedObjects xmlns="http://schemas.microsoft.com/analysisservices/2003/xmla-multipleresults" name="TMTestDB" BaseVersion="1" CurrentVersion="2">
     <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" xmlns:msxmla="http://schemas.microsoft.com/analysisservices/2003/xmla" name="Model">
       <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="ID" name="ID" type="xsd:unsignedLong" minOccurs="0" />
             <xsd:element sql:field="Name" name="Name" type="xsd:string" minOccurs="0" />
             <xsd:element sql:field="Description" name="Description" type="xsd:string" minOccurs="0" />
             <xsd:element sql:field="StorageLocation" name="StorageLocation" type="xsd:string" minOccurs="0" />
             <xsd:element sql:field="DefaultMode" name="DefaultMode" type="xsd:long" minOccurs="0" />
             <xsd:element sql:field="DefaultDataView" name="DefaultDataView" type="xsd:long" minOccurs="0" />
             <xsd:element sql:field="Culture" name="Culture" type="xsd:string" minOccurs="0" />
             <xsd:element sql:field="Collation" name="Collation" type="xsd:string" minOccurs="0" />
             <xsd:element sql:field="ModifiedTime" name="ModifiedTime" type="xsd:dateTime" minOccurs="0" />
             <xsd:element sql:field="StructureModifiedTime" name="StructureModifiedTime" type="xsd:dateTime" minOccurs="0" />
             <xsd:element sql:field="Version" name="Version" type="xsd:long" minOccurs="0" />
             <xsd:element sql:field="ImpactType" name="ImpactType" type="xsd:int" minOccurs="0" />
           </xsd:sequence>
         </xsd:complexType>
       </xsd:schema>
       <row>
         <ID>1</ID>
         <Name>Model</Name>
         <Description>Model description</Description>
         <DefaultMode>0</DefaultMode>
         <DefaultDataView>0</DefaultDataView>
         <Culture>en-US</Culture>
         <ModifiedTime>2016-01-31T00:01:24.016667</ModifiedTime>
         <StructureModifiedTime>2016-01-31T00:01:24.13</StructureModifiedTime>
         <Version>2</Version>
         <ImpactType>1</ImpactType>
       </row>
     </root>
   </AffectedObjects>
 </return>