The following is an
example of an UpdateMetadata request that adds a single association
(one that has a 0:1 or 1:1 cardinality in the metadata type documentation).
PhysicalTable object A53TPPVI.A4000001 is updated to add a PrimaryPropertyGroup
association to a PropertyGroup object. A PhysicalTable object has
a 0:1 cardinality to a PropertyGroup object in a PrimaryPropertyGroup
association.
<UpdateMetadata>
<Metadata>
<PhysicalTable Id="A53TPPVI.A4000001">
<PrimaryPropertyGroup Function="Modify">
<PropertyGroup Id="" Name="Read Options"/>
</PrimaryPropertyGroup>
</PhysicalTable>
</Metadata>
<NS>SAS</NS>
<!-- OMI_TRUSTED_CLIENT Flag -->
<Flags>268435456</Flags>
<Options/>
</UpdateMetadata>
In the request, note
the following:
-
The Id attribute is used in the
main element and specifies a real value.
-
The association name element (PrimaryPropertyGroup)
specifies the Function attribute with the MODIFY directive, which
is required to modify single associations.
-
Use of the Id attribute in the
associated object definition with a null value instructs the SAS Metadata
Server to create the PrimaryPropertyGroup association and the required
PropertyGroup object if they do not exist, and to modify the properties
of the PropertyGroup object if it does exist.
To replace an existing PrimaryPropertyGroup association
with a new association, you need to specify Function="REPLACE".