EntityType Element (CSDLBI)


Applies To: SQL Server 2016 Preview

The EntityType element is a complex type that represents the structure of a high-level entity, such as a customer or order, in a data model. The bi:EntityType element extends the definition of EntityType used in the Entity Data Framework.

An EntityType element must be specified for each of the entities that are included in the data model. The subelements of the EntityType describe the columns and measures in the table. Relationships among tables are included in the EntityContainer.

The following table lists the elements and attributes that define the EntityType element. Also see the attributes applicable to the EntityType element.

NameIs RequiredDescription
ContentsNoA string that contains the possible types of data in a column. The value is derived from the value of DimensionAttributeTypeEnumType in the data model.

If the value of DimensionAttributeTypeEnumType is "ExtendedType", the value of Contents is derived from the ExtendedType element of DimensionAttribute. The client is not required to respond to these values.
DefaultDetailsNoA list of property references that represent the set of columns in the table.

See DefaultDetails Element (CSDLBI).
DefaultImageNoA reference to a column that contains the image that illustrates the entity.

In multidimensional models, this element corresponds to a binary attribute on the dimension attribute. If this attribute is present, the element must contain exactly one MemberRef element.

See MemberRef Element (CSDLBI).
DefaultMeasureNoA reference to a measure in the entity that should be used as the default when making calculations over the entity. If not specified, the default is SUM.

See MemberRef Element (CSDLBI).
DisplayKeyNoA list of references to columns or to role ends that constitutes a strong identifier that uniquely identifies an entity instance.

See DisplayKey Element (CSDLBI).
HierarchyNoA list of hierarchies in the model.

See Hierarchy Element (CSDLBI).
ReferenceNameYesAn identifier that can be used to reference this entity in a Data Analysis Expressions (DAX) query.

If this attribute is not present, the fully qualified field name of the entity is used.
SortMembersNoA list of properties on which to sort. The SortDirection attribute indicates whether the order is ascending or descending.

The Contents element is a simple type that describes the type of data in the entity.

The contents of the entity (column) can be any of the following values:

RegularNot otherwise defined.
TimeAttributes represent time periods, such as years, semesters, quarters, months, or days.
GeographyAttributes represent geographic information, such as cities or postal codes.
OrganizationAttributes represent organizational information, such as employees or subsidiaries.
BillOfMaterialsAttributes represent inventory or manufacturing information, such as a parts lists for products.
AccountsAttributes represent a chart of accounts for financial reporting.
CustomersAttributes represent customer or contact information.
ProductsAttributes represent product information.
ScenarioAttributes represent planning or strategic analysis information.
QuantitativeAttributes represent quantitative information.
UtilityAttributes represent miscellaneous information.
CurrencyContains currency data and metadata.
RatesAttributes represent currency rate information.
ChannelAttributes represent channel information.
PromotionAttributes represent marketing promotion information.


The following sample shows part of the CSDLBI version 1.1 representation of the Geography table used in the AdventureWorks tabular model. The RowNumber column is a hidden column that is generated automatically as a row identifier in tabular models, and hence has the Contents attribute, RowNumber.

        <PropertyRef Name="RowNumber" />  
        Type="Int64" Nullable="false">  
        Stability="RowNumber" />  


The following sample shows the EntityType elements in CSDLBI version 1.1 that represent a portion of a time dimension from the Contoso Operations cube.

       <PropertyRef Name="RowNumber" />  
    <Property Name="RowNumber"   
    <Property Name="CalendarQuarter2"   
   <bi:EntityType />  

Technical Reference for BI Annotations to CSDL

Community Additions