Metadata Access (IOMI Interface) |
To read or write a metadata object, you must pass a string of properties that describe the object to the SAS Metadata Server. This property string is passed to the server in the INMETADATA parameter of the method call.
A metadata object is described by the following:
its metadata type
attributes that are specific to the metadata object, such as its ID, name, description, and other characteristics
its associations with other metadata objects
The SAS Open Metadata Interface supports the following XML elements for defining a metadata property string:
identifies the metadata type that you want to read or write, enclosed in angle brackets. The following example shows the XML element representing the PhysicalTable metadata type:
<PhysicalTable></PhysicalTable>A shorthand method of specifying this XML element is as follows:
<PhysicalTable/>
specifies the attributes of the metadata type as XML attributes (enclosed in the angle brackets of the metadata type). The following example shows the PhysicalTable metadata type with "NE Sales" as the Name= attribute.
<PhysicalTable Name="NE Sales"/>
describe the relationship between the metadata object in the main XML element and one or more other metadata types as nested XML elements. For example:
<PhysicalTable Name="NE Sales"/> <Columns> <Column/> </Columns> </PhysicalTable>
In this example, the first nested element, Columns, is the association name. The association name is a label that describes the relationship between the main XML element and the subelement. The SAS Metadata Model defines the association names that are supported for every metadata type.
The second nested element, Column, is the association subelement. The association subelement specifies the associated metadata type that you are interested in. The Columns association name supports associated objects of the metadata types Column and ColumnRange. By specifying Column in the property string, you indicate to the SAS Metadata Server that you are only interested in associated objects of this metadata type.
All in all, the nested elements in the example specify that the main metadata object, PhysicalTable, has a Columns association to an object of metadata type Column.
Quotation Marks and Special Characters |
The metadata property string is passed as a string literal (a quoted string) in most programming environments. To ensure that the string is parsed correctly, it is recommended that any additional double quotation marks, such as those enclosing XML attribute values in the metadata property string, be marked to indicate that they should be treated as characters. Here are examples of using escape characters in different programming environments to mark the additional double quotation marks:
Special characters that are used in XML syntax are specified as follows:
< = <
> = >
& = &
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.