Adding Schema Annotations - Analytics Database - Teradata Vantage

XML Data Type

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-10-30
dita:mapPath
tkc1628112506748.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
dgs1472251600184
lifecycle
latest
Product Category
Teradata Vantage™

To add an annotation to an XML schema, you add an xs:annotation element with an xs:appInfo as its child element, and any application specific elements under it.

This is an example of a Context annotation that is used to explain the various elements that occur as part of the annotations:

<xs:annotation>
   <xs:appinfo>
      <context xmlFeatureVersion="1.0" xmlns="http://www.teradata.com/xml">
         <defaultDatabase>XMLTYPE_TEST</defaultDatabase>
         <defaultEncoding>ISO-8859-1</defaultEncoding>
         <rootElement ref="_customer_item_"/>
         <transaction>
            <operation type="insert">
               <table name="CUSTDTL">
                  <column name="ID" ref="_customerID_item_" path="Customer/@ID">
                     <sqltype name="char">
                        <constraint name="length">9</constraint>
                     </sqltype>
                  </column>
                  ...
                  ...
</xs:annotation>

The Context annotation is the most important annotation in the schema for defining how a document should be shredded. You add it as the first annotation under the xs:schema element in the root schema document that describes the XML documents to be shredded. The following sections describe some of the key components of the context annotation.