The following UpdateMetadata
request adds an association and a new Column object to PhysicalTable
A53TPPVI.A4000002 using the APPEND directive:
<UpdateMetadata>
<Metadata>
<PhysicalTable Id="A53TPPVI.A4000002">
<Columns Function="Append">
<Column Id="" Name="Salary"
PublicType="Column"/>
</Columns>
</PhysicalTable>
</Metadata>
<NS>SAS</NS>
<!-- OMI_TRUSTED_CLIENT Flag -->
<Flags>268435456</Flags>
<Options/>
</UpdateMetadata>
In the example, the
null Id value in the associated object definition indicates the associated
object is to be created. Here is an example of the output returned
by the SAS Metadata Server:
<!-- Using the UPDATEMETADATA method. -->
<PhysicalTable Id="A53TPPVI.A4000002">
<Columns Function="Append">
<Column Id="A53TPPVI.A500002U" Name="Salary">
<Table>
<PhysicalTable ObjRef="A53TPPVI.A4000002"/>
</Table>
</Column>
</Columns>
</PhysicalTable>
The association to the
new Column object is added to the existing association list without
affecting other associated objects. Here are the results of a GetMetadata
request that lists the Column objects associated with PhysicalTable
A53TPPVI.A4000002:
<!-- Using the GETMETADATA method. -->
<PhysicalTable Id="A53TPPVI.A4000002" Name="Sales Associates">
<Columns>
<Column Id="A53TPPVI.A5000005" Name="EmployeeName" Desc="Name of employee"/>
<Column Id="A53TPPVI.A5000006" Name="Address" Desc="Home Address"/>
<Column Id="A53TPPVI.A5000007" Name="Title" Desc="Job grade"/>
<Column Id="A53TPPVI.A500002U" Name="Salary" Desc=""/>
</Columns>
</PhysicalTable>