Contents SAS IOM Data Provider Previous Next

Schema Rowsets

Schema rowsets give the user metadata, including such things as

The SAS providers support three schema rowsets:

The TABLES schema rowset returns information about which tables (or SAS data sets) are available to the data source. The COLUMNS schema rowset returns information about all of the columns that are within those tables. The PROVIDER_TYPES schema rowset deals with what data types the provider supports, or what data types the provider uses to surface SAS data.

Further details about each schema rowset, including what columns they contain and how they map to SAS constructs, is described in the following section.

The TABLES Schema Rowset

The TABLES schema rowset returns metadata about all of the tables that are in the current data source. Each row in the TABLES schema rowset corresponds to an individual table. A table is a SAS data set.

The TABLES schema rowset contains all nine columns that are mentioned for TABLES in the OLE DB specification. Of those nine, only five columns actually contain data: TABLE_NAME (col. 3), TABLE_TYPE (col. 4), DESCRIPTION (col. 6), DATE_CREATED (col. 8), and DATE_MODIFIED (col. 9). For further information about the Type column that is shown below, see the OLE DB specification.

The value of the TABLE_NAME column is affected by the provider's concept of a data source. For this provider, data source is an IOM server, which encompasses all library names that are known to the server. Thus, libname.membername is returned for TABLE_NAME.

With regard to the TABLE_TYPE column's value, a SAS data set maps to a value of TABLE, while a view maps to VIEW.

Column name Type Description
TABLE_NAME DBTYPE_WSTR Table name. Value is libname.membername
TABLE_TYPE DBTYPE_WSTR Table type. Value is either TABLE or VIEW.
DESCRIPTION DBTYPE_WSTR A description of the table. This is the SAS data file's label.
DATE_CREATED DBTYPE_DATE Date when table was created.
DATE_MODIFIED DBTYPE_DATE Date when table was last modified.

This provider also extends the TABLES schema rowset to provide metadata that is specific to SAS. These extensions are contained in additional columns that are returned following the previously listed columns. For more information, see TABLES Schema-Rowset Extensions.

The COLUMNS Schema Rowset

The COLUMNS schema rowset returns metadata about all of the columns of tables that are in the current data source. Each row in the COLUMNS schema rowset corresponds to one column of a table (or one variable of a SAS data set). The COLUMNS schema rowset contains all 28 columns that are mentioned by the OLE DB specification, but only the following 11 of those 28 columns actually contain data:

The COLUMN_FLAGS column is a bitmask that describes the column. The DBCOLUMNFLAGS enumerated type lists all of the the possible bits that could be set in the bitmask. For more information on DBCOLUMNFLAGS, please see the OLE DB specification, under IColumnsInfo::GetColumnInfo. The values of DBCOLUMNFLAGS that the SAS providers may return in the COLUMN_FLAGS column are

Contents SAS IOM Data Provider Previous Next