Export (0) Print
Expand All
1 out of 2 rated this helpful - Rate this topic

DISCOVER_CSDL_METADATA Rowset

SQL Server 2012

Returns information about a tabular data model, including the definition of the model in the Conceptual Schema Definition Language (CSDL). CSDL is an XML schema used by the Entity Data Framework that is used for communication between an Analysis Services server and the Power View client. For more information about tabular data models, see CSDL Annotations for Business Intelligence (CSDLBI).

The security context of the command affects the rowset that is returned. Read permissions on the Analysis Services instance are required to obtain the CSDL definition from the server.

The language identifier of the client that issues the rowset request is included in the connection string for the command, and affects the language displayed in several properties that are returned as part of the rowset. For information about properties and description that may be affected by the language identifier, see the Remarks section.

Applies to: tabular models

The DISCOVER_CSDL_METADATA rowset contains the following columns.

Column name

Type indicator

Restriction

Description

CATALOG_NAME

DBTYPE_WSTR

Yes

Specifies the name of the database for which the CSDL description is requested. If omitted, the current database is used.

The DISCOVER_CSDL_METADATA rowset must be restricted by using this column.

PERSPECTIVE_NAME

DBTYPE_WSTR

Yes

Specifies the name of a perspective that has been defined on the model specified by CATALOG_NAME.

The DISCOVER_CSDL_METADATA rowset can optionally be restricted by using this column.

This restriction is required for CSDL queries on multidimensional databases that contain more than one cube or perspective. This functionality was introduced in SQL Server 2012 SP1.

METADATA

DBTYPE_WSTR

A string containing the XML definition of a data source and its properties, according to the CSDL schema.

DISCOVER_CSDL_METADATA has the following requirements:

  • The DISCOVER request will fail if a database is not specified by using the CATALOG_NAME restriction.

  • If a perspective is provided as a restriction, the same CSDL rowset is returned as for the model. However, all objects that are in the model but not included in the specified perspective are marked as Hidden = True.

  • For tables and columns, the DISCOVER request always outputs a value from the cube dimension. If the cube dimension property is not set, the request returns the value from the dimension.

  • The DISCOVER request cannot return any measure or calculated columns that contain a semantic error.

  • The DISCOVER request will not return any information for objects that do not have property values. The DISCOVER request will also not return values for attributes that use the default value.

The XML string that is returned in the rowset may include the following language-specific properties or values. For example, if you issue the rowset request from a client that has the LCID of 0403 (Catalan Spanish), the property will return the following values as appropriate for Catalan Spanish. If translations are not available on the server, the string for the default language of the server is returned.

  • Caption

  • Qualifier

  • SortDirection

  • IsRightToLeft

The following XMLA query returns the CSDL representation of the database, Model, on the current connection.

<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
<RequestType>DISCOVER_CSDL_METADATA</RequestType>
    <Restrictions>
<RestrictionList>
<CATALOG_NAME>Model</CATALOG_NAME>
</RestrictionList>
</Restrictions>
    <Properties>
<PropertyList>
                 <FORMAT>Tabular</FORMAT>
   </PropertyList>
</Properties>
</Discover>

When using ADOMD.NET and the schema rowset to retrieve metadata, you can use either the GUID or string to reference a schema rowset object in the GetSchemaDataSet method. For more information, see Working with Schema Rowsets in ADOMD.NET.

The following table provides the GUID and string values that identify this rowset.

Argument

Value

GUID

87B86062-21C3-460F-B4F8-5BE98394F13B

ADOMDNAME

Csdl

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.