Previous Page | Next Page

Using GetMetadata to Get the Properties of a Specified Metadata Object

Introduction to the GetMetadata Method

To get properties for a metadata object, the SAS Open Metadata Interface provides the GetMetadata method. The default behavior of the GetMetadata method is to get the metadata object with whatever properties are specified in the INMETADATA parameter. The properties can include the XML attributes of the specified metadata object and association names. For example, consider the following GetMetadata request, which is formatted for the DoRequest interface:

<GetMetadata>
 <Metadata>
   <Column Id="A53TPPVI.A5000001" Name="" Desc="" ColumnType="" SASFormat="">
    <Table/>
   </Column>
 </Metadata>
 <NS>SAS</NS>
 <Flags>0</Flags>
 <Options/>
</GetMetadata>

In the <METADATA> element, the property string specifies to get the following:

Here is an example of the output returned by the SAS Metadata Server:

<!-- Using the GETMETADATA method. -->

<Column Id="A53TPPVI.A5000001" Name="City" Desc="City of Sales Office" 
  ColumnType="12" SASFormat="$Char32.">
  <Table>
    <PhysicalTable Id="A53TPPVI.A4000001" Name="Sales Offices"/>
   </Table>
</Column>

The SAS Metadata Server returns values for the requested attributes of the specified Column object, and general, identifying information (Id= and Name=) about the associated PhysicalTable object.

To get additional properties for the specified Column object and its associated objects, the GetMetadata method supports the following flags:

For examples of how these GetMetadata flags are used, see:

Previous Page | Next Page | Top of Page