RDS Template and Element Descriptions

Element descriptions for the available RDS template elements, and a sample template.

RDS template XML element descriptions

Element

Description

Template

Root element for the template.

MessageDefnList

A list of one or more message definitions.

MessageDefn

Information that defines a single message type.

MessageDesc

Description of the type of market data message, for example, Stock Quote. This element is used only for descriptive purposes, and can contain any string.

MessageType

Unique number representing the type of market data message. This number must uniquely identify the message type across all message definitions within all templates. The value can contain any integer from 1 – 65535.

DestTableName

Name of the database table into which the message should be stored. There is one database table per message type. The value can contain any string.

FieldDefnList

A list of one or more field definitions.

FieldDefn

Information that defines a single field.

FieldName

Name of the field. The value can contain any string.

IntegerField

Indicates that the field is some type of integer.

IntegerDataType

Data type of an integer field. Valid values: uint8, uint16, uint32, uint64, sint8, sint16, sint32, sint64.

DecimalField

Indicates that the field is a decimal value. The field definition can contain only one of: IntegerField, DecimalField, StringField, DateField, TimeField, DateTimeField, DateTime2Field, Time2Field.

Precision

Precision of a decimal field. Maximum precision allowed is 38 digits.

Scale

Scale of a decimal field (the number of digits after the decimal point). Maximum scale can be no larger than the precision (38).

StringField

Indicates that the field is a string.

DateField

Indicates that the field is a date. The field definition can contain only one of: IntegerField, DecimalField, StringField, DateField, TimeField, DateTimeField, DateTime2Field, Time2Field.

TimeField

Indicates that the field is a time.

Time2Field

Indicates that the field is a bigtime (granularity to 6 decimal places). The field definition can contain only one of: IntegerField, DecimalField, StringField, DateField, TimeField, DateTimeField, DateTime2Field, Time2Field.

DateTimeField

Indicates that the field is a datetime.

DateTime2Field

Indicates that the field is a bigdatetime (granularity to 6 decimal places). The field definition can contain only one of: IntegerField, DecimalField, StringField, DateField, TimeField, DateTimeField, DateTime2Field, Time2Field.

DestColumnName

Name of the column into which the field data should be stored. There is one column per field. The value of this element can contain any string.

Lookup

Indicates that the data in the field should be used as a lookup for another table. This is an optional element. If it does not appear in a field definition, then no lookup is required.

LookupTableName

Name of the table to use to look up a value.

LookupColumnName

Name of the column to use to look up a value.

LookupColumnReturn

Name of the column from which to return data when doing a lookup.

Sample RDS Template

Each RDS template file in the templates folder defines the information required by the Publisher API and subscribers. Subscribers allow lookups of a field value from a database table before inserting the value into the RAP schema. The RDS sample template allows the information required for this lookup to be defined.

A sample template is shown below. An XML schema (.xsd) describing the XML format is included with the product.
Note: Refer to the installed sample template files in the templates directory for each publisher and subscriber for the actual template content.
<Template xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi=noNamespaceSchemaLocation="..template.xsd">
 <MessageDefnList>
  <MessageDefn>
   <MessageDesc>Stock Quote</MessageDesc>
   <MessageType>4</MessageType>
   <DestTableName>STOCK_QUOTE</DestTableName>
   <FieldDefnList>
      <FieldDefn>
       <FieldName>Instrument</FieldName>
       <StringField/>
		 <DestColumName>INSTRUMENT_ID</DestColumnName>
		 <Lookup>
				<LookupTableName>INSTRUMENT</LookupTableName>
				<LookupColumnName>TRADING_SYMBOL</LookupColumnName>
				<LookupColumnReturn>INSTRUMENT_ID</LookupColumnReturn>
		 </Lookup>
	   </FieldDefn >
	   <FieldDefn>
		  <FieldName>Quote Date</FieldName>
		  <DateField/>
		  <DestColumnName>QUOTE_DATE</DestColumnName>
		 </FieldDefn>
      <FieldDefn>
		  <FieldName>Quote Sequence Number</FieldName>
        <IntegerField>
        <IntegerDataType>sint32</IntegerDataType>
		  <DestColumnName>QUOTE_SEQ_NBR</DestColumnName>
	   <FieldDefn>
		  <FieldName>Trading Symbol</FieldName>
		  <StringField/>
		  <DestColumnName>TRADING_SYMBOL</DestColumnName>
	   </FieldDefn>
		<FieldDefn>
		  <FieldName>Quote Time</FieldName>
		  <DateTimeField/>
		  <DestColumnName>QUOTE_TIME</DestColumnName>
		</FieldDefn>
		<FieldDefn>
			<FieldName>Ask Price</FieldName>
			<DecimalField>
				<Precision>18</Precision>
				<Scale>4</Scale>
			</DecimalField>
			<DestColumnName>ASK_PRICE</DestColumnName>
		</FieldDefn>
		<FieldDefn>
			<FieldName>Ask Size</FieldName>
			<IntegerField>
				<IntegerDataType>sint32</IntegerDataType>
			</IntegerField>
		<DestColumnName>ASK_SIZE</DestColumnName>
		</FieldDefn>
		<FieldDefn>
			<FieldName>Bid Price</FieldName>
			<DecimalField>
				<Precision>18</Precision>
				<Scale>4</Scale>
			</DecimalField>
			<DestColumnName>BID_PRICE</DestColumnName>
		</FieldDefn>
		<FieldDefn>
			<FieldName>Bid Size</FieldName>
			<IntegerField>
				<IntegerDataType>sint32</IntegerDataType>
			</IntegerField>
		 <DestColumnName>BID_SIZE</DestColumnName>
		</FieldDefn>
    </FieldDefnList>
  </MessageDefn>
 </MessageDefnList>
</Template>
Note: The installed sample template has only one <MessageDefn> ... </MessageDefn>. A template for a custom feed handler can include as many as needed.
Related reference
Set Field Methods