Previous Page | Next Page

Introduction to the Metadata API

Identifying Metadata

Each metadata object in a repository, such as the metadata for a particular column in a SAS table, has a unique identifier. Each object can have a name and a description as well. For example, here is the ID, name, and description for a SAS table column, as returned by the metadata API's _GET_METADATA_ method.

COLUMNS=( ( ID='A000000E.WHCOLDTL.A0000032'
               NAME='PRODNUM'
               DESC='product number'
               )[575]
              ) [671]

To read or write a metadata object, you must pass a list of properties for that type to the appropriate metadata API method. (These methods are listed in Index to Metadata API Methods.) The following properties are common to all metadata types. They are often referred to as the general identifying information for a metadata object.

ID

specifies the unique three-level identifier for a metadata object. It takes the following form: reposid.typeid.instanceid. For example, in the previous code example, the ID for the COLUMNS object is A000000E.WHCOLDTL.A0000032.

A000000E is the repository ID that is assigned to a particular warehouse repository when it was created in SAS/Warehouse Administrator. A reposid (metadata repository ID) is a unique 8-character string that identifies the metadata repository that stores the object. Each application has one or more repositories.

WHCOLDTL is the type ID for a column in a SAS/Warehouse Administrator detail table. A typeid (metadata type ID) is a maximum 8-character string that defines the type of the metadata object. Each application has its own set of metadata types. For example, SAS/Warehouse Administrator metadata types are listed in Index to SAS/Warehouse Administrator Metadata Types.

A0000032 is the instance ID that is assigned to a particular column in the detail table when it was created in SAS/Warehouse Administrator. An instanceid (metadata object instance ID) is an 8-character string that distinguishes one metadata object from all other objects of the same type within a given repository.

NAME

specifies the name of the metadata object, up to 40 characters long. The name is from the context of the component that it comes from. For example, SAS/Warehouse Administrator names are those that appear in the Explorer, the Setup window, the Process Editor, and other frames in that application. In the previous code example, the NAME of the table column is PRODNUM.

DESC

describes the metadata object, up to 200 characters long. Not all objects will have a description. In the previous code example, the DESC of the table column is "product number."

CAUTION:
It is strongly recommended that you avoid coding the literal identifier of a particular metadata object in a client application.

Instead, use the _GET_METADATA_OBJECTS_ method or other metadata API methods to return an SCL list of the unique object identifiers, names, and descriptions for objects of a particular type.  [cautionend]

Previous Page | Next Page | Top of Page