Introduction to the GetMetadata Method

Overview

To get the attributes and associations for a metadata object, the SAS Open Metadata Interface provides the GetMetadata method. The default behavior of the GetMetadata method is to get the specified metadata object with whatever attributes and associations are specified in the INMETADATA parameter.
The GetMetadata method also supports flags. Flags are provided that:
  • get all of the attributes and associations that are documented for the specified metadata type.
  • get all of the attributes of the specified metadata object and any associated objects that are returned by the GetMetadata request.
  • get specified attributes and associations for subtypes of the specified object.
  • enable you to submit templates which specify attributes and associations to get for associated objects.
  • new in SAS 9.3, get the logical metadata definition for the specified metadata object as defined in the SAS type dictionary. The specified object must be a PublicType subtype, and it must store the name of a type definition in the PublicType attribute.

GetMetadata and Cross-Repository References

When you submit the GetMetadata method, you identify the object to get by specifying its metadata type and 17-character metadata identifier. The first eight characters of the 17-character identifier represent a repository identifier. A GetMetadata method call that requests associated objects will get all associated objects that are in the same repository. In addition, it will get cross-repository references to objects that are in repositories of a compatible type.
The SAS Metadata Server supports three types of repositories. Two of the repository types (the foundation and custom repositories) are considered public repositories; they hold metadata that is available for production use. The third type, project repositories, are private; they contain copies of objects for making changes that might or might not be promoted for production use.
  • A GetMetadata request that is issued on an object in a public repository returns associated objects that are in other public repositories by default. GetMetadata will not retrieve cross-repository references to objects that are in project repositories unless you specify a flag. For more information, see Including Objects from Project Repositories in a Public Query.
  • A GetMetadata request that is issued on an object in a project repository returns associated objects that are in the project repository. In addition, it returns cross-repository references from all of the public repositories that the project repository services.
Cross-repository references involving project repositories are managed by a change management facility. The change management facility is used exclusively by SAS Data Integration Studio.

GetMetadata and Logical Type Definitions

The GetMetadata method treats all metadata objects as independent objects. That is, it gets the specified metadata object and specified attributes and associations of the specified object. In previous releases, the only way to get information about the associations of associated objects was to set the OMI_TEMPLATE (4) flag, and then submit user-defined templates that specified the associations and secondary metadata types to expand.
SAS 9.3 provides the OMI_FULL_OBJECT (2) flag to get associations of associated objects. If the specified object is a PublicType subtype in the SAS Metadata Model, and if it stores a valid value in the PublicType attribute, the OMI_FULL_OBJECT flag gets all direct and nested associations in that object type’s logical metadata definition as defined in the SAS type dictionary.For more information about the SAS type dictionary, see Using Interfaces that Read and Write Metadata in SAS 9.3. For more information about the OMI_FULL_OBJECT flag, see Using the OMI_FULL_OBJECT Flag.