2.1.7 TEntityType

The TEntityType complex type annotates the EntityType element, as defined in [MC-CSDL] section 2.1.2. The EntityType element represents the structure of a top-level concept, such as a customer or order, in a conceptual model. An entity type is a template for instances of entity types in an application.

The TEntityType complex type is defined in the schema as follows.

  <xs:complexType name ="TEntityType">
   <xs:sequence >
    <xs:element name="DisplayKey" type="bi:TMemberRefs" minOccurs="0"
          maxOccurs="1"/>
    <xs:element name="DefaultDetails" type="bi:TMemberRefs" minOccurs="0"
          maxOccurs="1"/>
    <xs:element name="DefaultImage" minOccurs="0" maxOccurs="1" >
     <xs:complexType >
      <xs:sequence>
       <xs:element name="MemberRef" type="bi:TMemberRef" minOccurs="1"
          maxOccurs="1" />
      </xs:sequence>
     </xs:complexType>
    </xs:element>
    <xs:element name="DefaultMeasure" minOccurs="0" maxOccurs="1" >
     <xs:complexType >
      <xs:sequence>
       <xs:element name="MemberRef" type="bi:TMemberRef" minOccurs="1"
          maxOccurs="1" />
      </xs:sequence>
     </xs:complexType>
    </xs:element>
    <xs:element name="SortMembers" type="bi:TMemberRefs" minOccurs="0"
          maxOccurs="1"/>
    <xs:element name="Hierarchy" type ="bi:THierarchy" minOccurs="0"
          maxOccurs="unbounded" />
    <xs:element name="Statistics" type="bi:TEntityStatistics" minOccurs="0"
          maxOccurs="1"/>
   </xs:sequence>
   <xs:attribute name="Contents" type="bi:TEntityContents" default="Regular"
          use="optional"/>
   <xs:attribute name="ReferenceName" type="xs:string" use="optional"/>
  </xs:complexType>

The elements and attributes that are defined by the TEntityType complex type are specified in the following tables.

Element

Description

DisplayKey

A list of references to columns or to role ends that constitutes a strong identifier that uniquely identifies an entity instance. The list is expected to be unique. However, the SQL Server Analysis Services protocol [MS-SSAS], which provides CSDLBI output, does not verify that the list is unique.

DefaultDetails

A list of property references that, together, represent the larger set of columns in the table. A single property MUST be a column or a measure.

DefaultImage

A reference to a column that contains the image that illustrates the entity. In the Unified Dimensional Model (UDM), this element is represented by a binary attribute on the dimension attribute. If this element is present, it MUST contain exactly one MemberRef element whose contents are defined by the TMemberRef complex type (section 2.1.9).

DefaultMeasure

A reference to a measure that is used as the default representation for multiple instances of the entity. If this element is present, it MUST contain exactly one MemberRef element whose contents are defined by the TMemberRef complex type (section 2.1.9).

SortMembers

A list of properties on which to sort. TSortDirection (section 2.1.16.2) provides a hint to the sort engine about whether the order is ascending or descending.

Hierarchy

A list of hierarchies (THierarchy, section 2.1.10).

Statistics

In CSDLBI 2.0 and CSDLBI 2.5, a set of statistics from the underlying data that is associated with the entity. These statistics are defined by the TEntityStatistics complex type and are provided only if they are not computationally expensive to generate, as described in section 2.1.22.

Attribute

Description

Contents

The type of data in the entity. The contents of this attribute are defined by the TEntityContents simple type (section 2.1.7.1).

ReferenceName

The identifier that references this entity in a Data Analysis Expressions (DAX) query. If this attribute is omitted, the field name is used.

Show: