Previous Page | Next Page

Using GetMetadata to Get the Properties of a Specified Metadata Object

Expanding a GetMetadata Request to Get All of an Object's Properties

To get all of a metadata object's properties (attributes and associations), set the OMI_ALL (1) flag in the GetMetadata request. The following is an example of a GetMetadata request that sets the OMI_ALL flag:

<GetMetadata>
 <Metadata>
   <Column Id="A53TPPVI.A5000001"/>
 </Metadata>
 <NS>SAS</NS>
 <!--OMI_ALL flag -->
 <Flags>1</Flags>
 <Options/>
</GetMetadata>

In the request, note the following:

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

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

<Column Id="A53TPPVI.A5000001" BeginPosition="0" ColumnLength="32" 
  ColumnName="City" ColumnType="12" Desc="City of Sales Office" EndPosition="0" 
  IsDiscrete="0" IsNullable="0" LockedBy="" MetadataCreated="05Feb2002:09:37:00" 
  MetadataUpdated="05Feb2002:09:37:00" Name="City" SASAttribute="" 
  SASColumnLength="32" SASColumnName="City" SASColumnType="C" SASExtendedColumnType="" 
  SASExtendedLength="0" SASFormat="$Char32." SASInformat="$32." SASPrecision="0" 
  SASScale="0" SortOrder="" SummaryRole="">
<AccessControls/>
<AnalyticColumns/>
<Changes/>
<DisplayForKey/>
<Documents/>
<Extensions/>
<ExternalIdentities/>
<ForeignKeyAssociations/>
<Groups/>
<Implementors/>
<Indexes/>
<Keys/>
<Keywords/>
<MLAggregations/>
<Notes/>
<PrimaryPropertyGroup/>
<Properties/>
<PropertySets/>
<QueryClauses/>
<ResponsibleParties/>
<SourceFeatureMaps/>
<SourceTransformations/>
<SpecSourceTransformations/>
<SpecTargetTransformations/>
<Table>
<PhysicalTable Id="A53TPPVI.A4000001" Name="Sales Offices" 
  Desc="Sales offices in NW region"/>
</Table>
<TargetFeatureMaps/>
<TargetTransformations/>
<Timestamps/>
  <Trees/>
<UniqueKeyAssociations/>
<UsedByPrototypes/>
<UsingAggregations/>
<UsingPrototype/>
</Column>

The GetMetadata method gets all attributes and associations for the specified Column object, including attributes and associations for which values have not been defined. To limit the output to attributes and associations that have values, also set the OMI_SUCCINCT (2048) flag. The OMI_SUCCINCT flag instructs the SAS Metadata Server to omit any attributes and associations that do not contain a value or that contain a null value from the output.

This Column object has one associated object defined. A PhysicalTable object is associated to the Column through the Table association name. The OMI_ALL flag returns the Id=, Name=, and Desc= values for associated objects.

Previous Page | Next Page | Top of Page