About Schema Rowsets

What Are Schema Rowsets?

Schema rowsets provide metadata about a data source. The definition of data source depends on the provider being used:
  • For the local provider, a data source is a single directory on disk, which corresponds to a single library.
  • For the SAS/SHARE provider, a data source consists of all library names that are known to a SAS/SHARE server.
  • For the IOM provider, a data source consists of all library names that are known to a SAS Workspace Server.
  • For the OLAP provider, a data source consists of all cubes that are known to a SAS OLAP Server.
  • For the Base SAS provider, a data source consists of all library names that are known to a local installation of Base SAS.

Supported Schema Rowsets

The SAS providers support the following three schema rowsets:
Schema Rowsets Supported by All Providers
Schema Rowset
Description
TABLES
Provides information about which tables are available to the data source.
COLUMNS
Provides information about all of the columns within those tables.
PROVIDER_TYPES
Indicates which data types the provider uses to expose SAS data.
In addition, the OLAP Provider also supports the following OLE DB for OLAP schema rowsets:
Schema Rowsets Supported by the OLAP Provider
Schema Rowset
Description
CATALOGS
Provides information about the catalogs that are available to the data source.
CUBES
Provides information about the cubes that are available to the data source.
DIMENSIONS
Provides information about the dimensions that are available in a specified cube.
HIERARCHIES
Provides information about the hierarchies that are available in a specified dimension.
LEVELS
Provides information about the levels that are available in a specified dimension.
MEASURES
Provides information about the measures that are available to the data source.
PROPERTIES
Provides information about the properties that are available in each level and cell.
MEMBERS
Provides information about the members that are available to the data source.
FUNCTIONS
Provides information about the functions that are available to the data source.
SETS
Provides information about any currently defined sets.
Note: The tables in each schema rowset topic list type indicators. For definitions of the type indicators, see the OLE DB Programmer’s Reference and Data Access SDK.

How Are Schema Rowsets Obtained?

You can obtain schema rowsets in the following ways:
  • If you are using ADO, you can pass one of the elements of the ADO SchemaEnum enumeration to the OpenSchema method of an open Connection object.
  • If you are using OLE DB, you can pass the GUID that represents the desired schema to the IDBSchemaRowset::GetRowset method on an open Session object.

How to Restrict the Rows That Are Returned

You can use DBSchemaRowset::GetRowset to restrict the rows that are returned in a schema rowset. A restriction is a value for a specific column. When a restriction is passed to IDBSchemaRowset::GetRowset, all rows that are returned in the schema rowset must match the restriction value on the specified column. Restriction values do not support pattern matching or wildcards. For example, the restriction value D_F matches D_F but not DEF.
Tip
To determine which columns support restrictions, write an OLE DB consumer that calls IDBSchemaRowset::GetSchemas.