The Discover method retrieves information, such as the list of data sources on a server or details about a data source. The data retrieved with the Discover method depends on the values of the parameters passed to it.
Namespace
urn:schemas-microsoft-com:xml-analysis
SOAP Action
"urn:schemas-microsoft-com:xml-analysis:Discover"
Syntax
Discover ( [in] RequestType As EnumString, [in] Restrictions As Restrictions, [in] Properties As Properties, [out] Result As Rowset)
Parameters
RequestType [in]
This required parameter comprises a RequestType enumeration value, which determines the type of information to be returned. The RequestType enumeration is used by the Discover method to determine the structure and content of the rowset returned in the Result parameter. The Restrictions parameter format and XML result set are also dependent on the value specified in this parameter. This enumeration can be extended to support provider-specific enumeration strings.
Each RequestType enumeration value corresponds to a return rowset. For rowset definitions, see XMLA Rowsets. Support is required for the following explicitly named RequestType enumeration values.
Enumeration value | Description |
---|---|
DISCOVER_DATASOURCES | Returns a list of XMLA data sources available on the server or Web Service. (For an example of how these may be published, see "XMLA Implementation Walkthrough" in the XML for Analysis Specification, available on the Hyperion Developer Network.) |
DISCOVER_PROPERTIES | Returns a list of information and values about the requested properties that are supported by the specified data source (provider). |
DISCOVER_SCHEMA_ROWSETS | Returns the names, values, and other information of all supported RequestType enumeration values (including those listed here), and any additional provider-specific enumeration values. |
DISCOVER_ENUMERATORS | Returns a list of names, data types, and enumeration values of enumerators supported by the provider of a specific data source. |
DISCOVER_KEYWORDS | Returns a rowset containing a list of keywords reserved by the provider. |
DISCOVER_LITERALS | Returns information about literals supported by the data source provider. Schema Rowset Constant Given, a constant that corresponds to one of the schema rowset names defined by OLE DB, such as MDSCHEMA_CUBES, returns the OLE DB schema rowset in XML format. Note that providers also may extend OLEDB by providing additional provider-specific schema rowsets. The schema rowsets that tabular data providers (TDP) and multidimensional data providers (MDP) are required to support are listed in the section "DISCOVER_SCHEMA_ROWSETS Rowset." |
Restrictions [in]
This parameter, of the Restrictions data type, enables the user to restrict the data returned in Result. Result columns are defined by the rowset specified in the RequestType parameter. Some columns of Result can filter the rows returned. For these columns and those that can be restricted, see the rowset tables in XMLA Rowsets. To obtain the restriction information for provider-specific schema rowsets, use the DISCOVER_SCHEMA_ROWSETS request type. This parameter can be empty, but it must be included.
Properties [in]
This parameter, of the Properties data type, comprises a collection of XMLA properties. Each property enables users to control some aspect of the Discover method, such as specifying the return format of the result set, the timeout, or the locale in which the data should be formatted.
You can obtain the available properties by using the DISCOVER_PROPERTIES request type with the Discover method.
The properties in the Properties parameter have no required order. This parameter can be empty, but it must be included.
Result [out]
This required parameter contains the result set returned by the provider as a Rowset object. The columns and content of the result set are specified by the values in the RequestType and Restrictions parameters. The column layout of the returned result set also is determined by the value specified in RequestType. For information about the rowset layouts that correspond to for each RequestType value, see XMLA Rowsets.
Example
In the following sample, the client sends the XML Discover call to request a list of cubes from the Demo catalog:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SOAP-ENV:Body> <Discover xmlns="urn:schemas-microsoft-com:xml-analysis" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <RequestType>MDSCHEMA_CUBES</RequestType> <Restrictions> <RestrictionList> <CATALOG_NAME>Demo</CATALOG_NAME> </RestrictionList> </Restrictions> <Properties> <PropertyList> <DataSourceInfo> Provider=Essbase;Data Source=localhost </DataSourceInfo> <Format>Tabular</Format> </PropertyList> </Properties> </Discover> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
The provider returns the following result to the client:
<?xml version="1.0"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <m:DiscoverResponse xmlns:m="urn:schemas-microsoft-com:xml-analysis"> <m:return xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <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 xmlns="urn:schemas-microsoft-com:xml-analysis:rowset" targetNamespace="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: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:complexType name="row"> <xsd:sequence maxOccurs="unbounded" minOccurs="0"> <xsd:element name="CATALOG_NAME" type="xsd:string" sql:field="CATALOG_NAME"/> <xsd:element name="CUBE_NAME" type="xsd:string" sql:field="CUBE_NAME"/> <xsd:element name="CUBE_TYPE" type="xsd:string" sql:field="CUBE_TYPE"/> <xsd:element name="LAST_SCHEMA_UPDATE" type="xsd:dateTime" sql:field="LAST_SCHEMA_UPDATE" minOccurs="0"/> <xsd:element name="DESCRIPTION" type="xsd:string" sql:field="DESCRIPTION" minOccurs="0"/> </xsd:sequence> </xsd:complexType> </xsd:schema> <row> <CATALOG_NAME>Demo</CATALOG_NAME> <CUBE_NAME>Demo.Basic</CUBE_NAME> <CUBE_TYPE>CUBE</CUBE_TYPE> </row> </root> </m:return> </m:DiscoverResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>