Overview of Querying Metadata |
To get general information about a repository, such as its Engine=, MetadataCreated=, and MetadataUpdated= values, use the GetMetadata method and set the OMI_ALL (1) flag.
The following GetMetadata method call, which is formatted for the INMETADATA parameter of the DoRequest method, requests information about the Foundation repository:
<GetMetadata> <Metadata> <RepositoryBase Id="A0000001.A55WR3E8" Name="Foundation" /> </Metadata> <NS>REPOS</NS> <Flags>1</Flags> <Options/> </GetMetadata>
In the method call, note the following:
the <METADATA> element specifies the metadata type RepositoryBase, not Repository.
the <NS> element specifies the REPOS namespace.
the <FLAGS> element specifies a 1, setting the OMI_ALL flag. If this flag were not set, the GetMetadata method would return only the Id= and Name= attributes of the repository, which we already know.
Here is an example of the output returned from the request:
<!-- Using the GETMETADATA method. --> <GetMetadata> <Metadata> <RepositoryBase Id="A0000001.A55WR3E8" Name="Foundation" Access="0" Desc=" " Engine="BASE" MetadataCreated="09Apr2008:18:06:57" MetadataUpdated= "18Sep2008:18:47:54" Options=" " Path="C:\SAS\FoundationServers\Lev1\SASMain\ MetadataServer\MetadataRepositories\Foundation" RepositoryFormat="11" RepositoryType="FOUNDATION"> <DependencyUsedBy/> <DependencyUses/> </RepositoryBase> </Metadata> <NS>REPOS</NS> <Flags>1</Flags> <Options/> </GetMetadata>
The GetMetadata method returns the following attribute values that are not returned by the GetRepositories method: Engine=, MetadataCreated=, MetadataUpdated=, and Options=. The value Access="0" is comparable to OMS_FULL and means ONLINE with full access.
A GetMetadataObjects method that is issued in the REPOS namespace on the RepositoryBase metadata type with the OMI_GET_METADATA (256) flag and OMI_ALL (1) flag set will get this same information for all registered repositories.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.