Adding Metadata Objects |
The SAS 9.2 Metadata Model defines approximately 160 metadata types that represent application elements. The metadata types are intended to be used in combination by clients to create metadata describing application data or entities used by an application.
The metadata programmer begins by selecting a metadata type that most closely describes the entity for which he wants to store metadata. For example, when creating metadata describing a data source, a metadata programmer might select the SASLibrary metadata type to represent data in a SAS library. This becomes the primary or top-level object in the metadata definition. He then needs to examine the SAS Metadata Model to select metadata types that more closely describe the data source, and he might need to provide supporting information. For example, if the SAS library he is describing contains SAS tables that exist in a physical file system, he might select the PhysicalTable metadata type to describe the tables. If the tables are transient, he might use the WorkTable or QueryTable metadata types to describe the tables. To describe each table's columns, he might use the Column metadata type. If the tables have passwords, he might use the SASPassword metadata type, and so on.
Once he has identified all of the metadata types necessary to fully describe the data source, he can use the AddMetadata method to create metadata objects representing each application element, and to associate the objects with one another.
To assist metadata programmers in building consistent metadata definitions, the SAS 9.2 Metadata Model categorizes metadata types as being either primary or secondary:
Metadata types that are subtypes of the PrimaryType supertype are intended to be used as the topmost object in a metadata definition, or to describe an application element that provides supporting information, but can be referenced, secured, and deleted independently of the primary object that it supports.
Metadata types that are subtypes of the SecondaryType supertype provide supporting information for a primary type and are never referenced directly within a SAS application.
For a list of the metadata types in each category, see PrimaryType and SecondaryType.
The PrimaryType metadata type defines attributes and associations that support the management of the entities described by the metadata definitions. For more information about these attributes and associations, see PrimaryType and SecondaryType Abstract Types.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.