Reference to Metadata Objects for the Metadata Engine |
What Is a Metadata Type? |
The SAS metadata model includes metadata types for the most commonly used SAS applications. A metadata type is like a template. Each metadata object is a unique instance of a metadata type. For example, the metadata type Column models the metadata for a variable in a SAS data set. Each Column object has a unique name, but they are all of the metadata type Column.
A metadata object is also known as a metadata definition. For more information about the applications that use SAS metadata, see the SAS Intelligence Platform: System Administration Guide.
How the Metadata Engine Uses SAS Metadata Types |
The following list of SAS metadata types is taken from the SAS Open Metadata Architecture. With the exception of PhysicalTable and Column, metadata must already be defined in the repository.
represents the domain that controls user access to the server for the underlying engine. User login information is retrieved from the authentication domain when no default login information has been provided with the SAS library. This user login information is included in the LIBNAME statement constructed for the underlying engine. An AuthenticationDomain object does not exist if user IDs and passwords are not used to connect to the server, or if a Base SAS engine is the underlying engine.
not applicable
This association from the AuthenticationDomain object to Login object(s) is used to retrieve only the user logins (Login objects) that the user is authorized (through SAS Open Metadata Architecture security) to use. The logic for retrieving user login information is in the description for the Login object. The cardinality on this association enables an authentication domain to control several user logins.
represents a column on a library member. Column metadata is retrieved when opening a library member, and when retrieving indexes on an opened library member.
The SAS column label field.
The column name that is used by SAS. This attribute must be populated.
The column type that is used by SAS. This attribute must be populated.
The column length that is used by SAS. This attribute must be populated.
The SAS format that is applied to the column.
The SAS informat that is applied to the column.
not applicable
represents a DBMS schema. The SCHEMA= option cannot be represented with a Property object. The DBMS schema must be represented with a DatabaseSchema object. The DatabaseSchema object, if available, must be associated with a SASLibrary object. Only one schema can be associated with the SAS library. If more than one schema is retrieved, the first schema is used.
DBMS schema metadata is retrieved to obtain the name of the DBMS schema that is used in the LIBNAME statement for the underlying engine. The DBMS schema metadata is retrieved after the LIBNAME statement for the metadata engine is executed. The DBMS schema is used as a point of reference when retrieving library member information and when opening a library member.
The name of the DBMS schema. The metadata engine includes this schema name as the value for the SCHEMA= option in the LIBNAME statement for the underlying engine. This attribute must be populated.
Exception: | The SAS/ACCESS interfaces for ODBC, OLE DB, Microsoft Access, and Microsoft Excel do not use a schema when their underlying data source does not support schemas. In these cases, the SchemaName attribute is blank. |
This association from the DatabaseSchema object to PhysicalTable object(s) is used to obtain all DBMS tables that are associated with the DBMS schema in the repository. The tables that are associated with the schema might differ from the tables that are under the schema in the DBMS. The cardinality on this association enables the DBMS schema to have many DBMS tables.
represents a file system directory. Directory metadata is retrieved to obtain the physical name that is used as the library specifications in the LIBNAME statement for the underlying engine. Directory metadata is retrieved after the LIBNAME statement for the metadata engine is executed. No library members are associated with a Directory object. The library members are associated with the SASLibrary object that is using this Directory object.
Directory name, including any delimiters that are specific to the operating environment. The metadata engine treats the value of this attribute as a string, including the total string in the LIBNAME statement for the underlying engine.
Note: For the metadata engine, do not use quotation marks in the directory path.
Indicates that this directory is a subdirectory and has a parent directory. When this attribute is set to true (1), the DirectoryName attribute does not contain the complete name. The parent directory must be retrieved to complete the name. Several subdirectories can be involved in completing a directory name.
This association from the Directory object to another Directory object is used to obtain the remaining name when a directory is relative to another directory. To construct a complete directory name, the value of the DirectoryName attribute in the parent directory is appended to the beginning of the value of the DirectoryName attribute of the subdirectory. The cardinality on this association enables a subdirectory to have (at most) one parent directory. However, many subdirectories and parents might be traversed before the directory name is complete.
represents an index on a library member. When index information is requested for an opened library member, index metadata is retrieved to obtain the name of the index and column(s) that compose the index.
The name of the index on the library member. This attribute must be populated.
This association from the Index object to column object(s) is used to obtain the columns that make up the index. The cardinality on this association enables the index to be a simple index (of one column) or a composite index (made up of more than one column).
represents a user's login information (user ID and password) that is used to connect to a server. This user login information is retrieved after the LIBNAME statement for the metadata engine is executed and is included in the LIBNAME statement constructed for the underlying engine. If no Login object is associated with the SASLibrary object, the user login information is retrieved from the AuthenticationDomain object.
Here is the logic for retrieving user login information from the AuthenticationDomain object:
If no Login object is retrieved for the user, then no user login information is included in the LIBNAME statement for the underlying engine. It is assumed that either no user login information is required to connect to the server for the underlying engine, or the user login information has been stored in a location according to the setup for the underlying engine. A connection is attempted without user login information, and the user is notified of any connection failures.
If there is only one Login object retrieved, this user ID and password is included in the LIBNAME statement for the underlying engine as values for the USERID= and PASSWORD= connection options.
A user ID that is used to connect to a server for the underlying engine. This attribute must be populated.
The password that enables a user to access a server for the underlying engine. This attribute must be populated.
not applicable
represents a member in a SAS library. Metadata for a library member is retrieved when a library member listing is requested, a library member is opened for use, or an index is requested. Metadata for a library member is retrieved to obtain the name and type of the member and, in some cases, the columns of the library member.
Note: To access physical data with METAOUT=ALL, the table's PhysicalTable and Column objects must be defined in the repository. To access physical data with METAOUT=DATA, the PhysicalTable and Column objects are not required.
The SAS label field.
The SAS name for a library member (for example, DBMS table, SAS data set, and so on). This attribute must be populated.
The SAS type for a library member (for example, DATA or VIEW). This attribute must be populated.
This association from the PhysicalTable object to Column object(s) is used to obtain the columns of an opened library member. The cardinality on this association enables a library member to have many columns.
This association from the PhysicalTable object to Index object(s) is used to identify the indexes of an opened library member. The cardinality on this association enables a library member to have several indexes.
This association from the PhysicalTable object to Property object(s) is used to obtain the data set options to be used when accessing a library member. These options are considered the default data set options. They are applied each time the library member is opened unless a PropertySet object is specified in the metadata engine data set option OPTSET=. The cardinality on this association enables a library member to have an unlimited number of data set options.
This association from the PhysicalTable object to PropertySet object(s) is used to obtain the data set options to be used when opening a library member. This association is used when a PropertySet object is specified in the metadata engine data set option OPTSET=. If OPTSET= is not specified, any default data set options from the Properties association is applied. The cardinality on this association enables a library member to have many PropertySet objects
This association from the PhysicalTable object to SASPassword object(s) is used to obtain the READ=, WRITE=, ALTER=, and PW= password values for a SAS data set. This association is valid only when a Base SAS engine is the underlying engine for the metadata engine. This association is used each time the SAS data set is opened. The cardinality on this association enables a SAS data set to have more than one SAS password.
This association from the PhysicalTable object to a DatabaseSchema or SASLibrary object is used to identify the DBMS schema or SAS library, respectively, to which this library member belongs. The cardinality on this association enables a library member to belong to one DBMS schema or SAS library.
represents a SAS option. A Property object can be associated with a SASLibrary object for LIBNAME options, and a SASClientConnection object for server connection options. These options are the default options that are included in the LIBNAME statement for the underlying engine. A Property object can be associated with a PhysicalTable object for data set options. In this case, these options are the default options that are applied when the associated library member is referenced. A Property object can be associated with a PropertySet object. In this case, these options are applied only when the PropertySet object is included as a value in the metadata LIBNAME statement arguments LIBOPTSET=, CONOPTSET=, or the metadata engine data set option OPTSET=. When options within a PropertySet object are used, default options are not used. For more information, see How the Metadata Engine Constructs Options.
The USERID=, PASSWORD=, and SCHEMA= options cannot be represented with a Property object. User IDs and passwords must be represented with a Login object. A DBMS schema must be represented with a DatabaseSchema object. The READ=, WRITE=, ALTER=, and PW= data set password options cannot be represented with a Property object. The SAPW= remote server access password option cannot be represented with a Property object. These passwords must be represented with a SASPassword object.
Value for the option. This attribute must be populated.
The delimiter between the option name and the option value. For most SAS options, the delimiter is an equal sign (=). This attribute is not used if the UseValueOnly attribute is set to true (1).
Name of the option. This attribute is not used if the UseValueOnly attribute is set to true (1).
Indicates a Boolean option. When this attribute is set to true (1), only the DefaultValue attribute is used to specify the option. When this attribute is set to false (0), the PropertyName, Delimiter, and DefaultValue attributes are used to specify the option.
not applicable
groups a set of Property objects, representing SAS options, to be used in a particular context. PropertySet objects can be used to group a set of LIBNAME statement, connection, or data set options as follows:
When you specify a PropertySet name in the LIBOPTSET= argument, the metadata engine includes a set of LIBNAME options in the constructed LIBNAME statement for the underlying engine. The OwningObject for these sets of Property objects is a SASLibrary object.
When you specify a PropertySet name in the CONOPTSET= argument, the metadata engine includes a set of connection options in the constructed LIBNAME statement for the underlying engine. The OwningObject for these sets of Property objects is a SASClientConnection object.
When you specify a PropertySet name in the OPTSET= data set option, the metadata engine applies a set of data set options to the specified table. The OwningObject for this set of Property objects is a PhysicalTable object.
Only one set of Property objects is used for an OwningObject, which is either the set of Property objects that are associated directly with the OwningObject, or the set of Property objects that are associated with the PropertySet object specified for an OwningObject. For more information, see How the Metadata Engine Constructs Options and Example: Creating a PropertySet Object for Use with LIBOPTSET=.
Name of the PropertySet object. This name is the value specified for the LIBOPTSET= or CONOPTSET= argument or the OPTSET= data set option. This attribute must be populated.
This association from the PropertySet object to Property object(s) is used to obtain the options defined in the PropertySet. The cardinality of this association enables the PropertySet to contain many options.
represents information needed by SAS to connect to a server for the underlying engine.
not applicable
This association from the SASClientConnection object to an AuthenticationDomain object is used to access the authorization domain that maintains the user identities (user IDs and passwords) used to access the server. The cardinality on this association enables the client connection to be associated with (at most) one authentication domain.
This association from the SASClientConnection to Property object(s) is used to obtain the connection options to be included in the LIBNAME statement for the underlying engine. These options are considered the default connection options and are applied each time a LIBNAME statement is constructed for the underlying engine, unless a PropertySet object is specified in the metadata engine LIBNAME statement option CONOPTSET=. The cardinality of this association enables a connection to have many connection options.
This association from the SASClientConnection to PropertySet object(s) is used to obtain connection options to be included in the LIBNAME statement for the underlying engine. This association is used when a PropertySet object is specified in the CONOPTSET= argument. If CONOPTSET= is not specified, any default connection options from the Properties association is applied. The cardinality of this association enables a connection to have many sets of connection options.
This association from the SASClientConnection to a SASPassword object is used to obtain a SAS server access password option to be included in the LIBNAME statement for the underlying engine. The cardinality of this association enables a connection to have (at most) one SAS password.
represents a SAS library. The SASLibrary object is specified by the LIBID=, LIBRARY=, or LIBURI= argument in the LIBNAME statement. The metadata engine exits with an error if the SASLibrary object is not specified in the metadata LIBNAME statement. Metadata included in this library is used to construct a LIBNAME statement for the underlying engine.
The engine that is used with this library. This attribute tells the metadata engine which engine to assign as the underlying engine. A SAS library is associated with only one engine. This attribute must be populated.
The libref that is used to assign the underlying engine. This attribute must be populated.
Indicates whether this library is used to construct a LIBNAME statement for a DBMS engine. If this attribute is set to true (1), then a DatabaseSchema object must be associated with this library (UsingPackages association).
This association from the SASLibrary object to a Login object is used to obtain the user login (user ID and password) metadata that is used as values for the user ID and password parameters in the LIBNAME statement. However, many engines do not require user login metadata; therefore, this association might not exist. If this association does not exist, the metadata engine attempts to obtain user login metadata from the AuthenticationDomain object through the SASClientConnection object. If user login metadata cannot be obtained through the AuthenticationDomain object, the metadata engine attempts to assign the underlying engine with a LIBNAME statement without any user login information. The cardinality of this association enables the SAS library to use (at most) one user ID and password for the LIBNAME statement.
This association from the SASLibrary object to a SASClientConnection object is used to obtain engine connection options. These options are represented as Property objects associated with the SASClientConnection object, or a with PropertySet object that is associated with the SASClientConnection object. This association is used to retrieve user login metadata, where applicable, through the SASClientConnection object and AuthenticationDomain object. The cardinality on this association enables the SAS library to access (at most) one SASClientConnection object.
This association from the SASLibrary object to Property object(s) is used to obtain library options that should be included in the LIBNAME statement for the underlying engine. These options are considered the default options and are applied each time a LIBNAME statement is constructed for the underlying engine unless a PropertySet object is specified in the metadata engine LIBOPTSET= argument in the metadata LIBNAME statement. The cardinality on this association enables a SAS library to have many library options.
This association from the SASLibrary object to PropertySet object(s) is used to obtain LIBNAME options to be included in the LIBNAME statement for the underlying engine. This association is used when a PropertySet object is specified in the LIBOPTSET= argument in the metadata LIBNAME statement. If no LIBNAME option is specified, any default LIBNAME options from the Properties association will be applied. The cardinality of this association enables a SAS data library to have many sets of options.
This association from the SASLibrary object to either a DatabaseSchema or Directory is used to obtain metadata concerning a DBMS schema or a system directory, respectively. Only one DatabaseSchema or Directory object can be associated with a SASLibrary object.
represents a SAS password. The READ=, WRITE=, ALTER=, and PW= data set password options cannot be represented with a Property object. The SAPW= remote engine server password option cannot be represented with a Property object. These options must be represented with a SASPassword object. SAS passwords are retrieved when the underlying engine for the metadata engine is a Base SAS engine and a password-protected SAS data set is opened. A SASPassword can also be retrieved when the LIBNAME statement is executed for the metadata engine.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.