Datatype Mapping for RAP

RAP datatypes map to Event Stream Processor datatypes.

RAP Datatype Event Stream Processor Datatype
uint8 integer
uint16 integer
uint32 long
uint64 long
sint8 integer
sint16 integer
sint32 integer
sint64 long
decimal(p, s) float or money(s)
datetime timestamp
datetime2 bigdatetime
date date
time timestamp
time2 interval
string string

If a RAP template definition contains a decimal datatype and you are planning on using the Event Stream Processor money datatype, make sure that the Event Stream Processor money(s) datatype has enough precision and scale. All Event Stream Processor money datatypes have a precision of 18 and a scale from 1 to 15.

However, Event Stream Processor does not have datatypes equivalent to certain datatypes in Adaptive Server  and Sybase IQ. Here are the suggested mappings for these datatypes in Event Stream Processor:
Adaptive Server Enterprise Datatypes Sybase IQ Datatypes Event Stream Processor Datatypes
tinyint tinyint integer
smallint smallint integer
unsigned smallint   integer
unsigned int unsigned int long
smallmoney smallmoney money
unsigned bigint unsigned bigint long
decimal (p,s) decimal (p,s) money
numeric (p,s) numeric (p,s) money

During message flow, the adapters verify whether incoming values can fit into the specified database columns without losing precision and reject the rows if they cannot. The mappings that require runtime data checks are identified at adapter startup, and only these mappings are verified for each record flowing through the adapter. Due to the negative performance impact of runtime checks on each Event Stream Processor record, Sybase recommends that you only use these mappings if changes to existing schemas are not an option.

For a complete list of supported Adaptive Server and Sybase IQ datatypes and datatype mappings requiring runtime checks, see the sections for the Sybase ASE  Output Adapter and the Sybase IQ Output Adapter in the Event Stream Processor Adapters Guide.