Datatype Mapping for the ASE Output Adapter

Event Stream Processor datatypes map to Adaptive Server datatypes.

Event Stream Processor does not have datatypes equivalent to these Adaptive Server datatypes:
  • tinyint
  • smallint
  • unsigned smallint
  • unsigned int
  • unsigned bigint
  • smallmoney
To use existing Adaptive Server schemas containing these datatypes, Sybase supports mapping of integer, long, money and money(1-15) Event Stream Processor datatypes to those Adaptive Server Enterprise datatypes.

During message flow, the adapter verifies that incoming values can fit into the specified Adaptive Server Enterprise columns without losing precision, and rejects the rows if they cannot. Any ASE column datatypes that are marked with an asterisk have data dependent limitations on the mapping, and only these mappings are verified for each record flowing through the adapter. Due to the performance impact of runtime checks on each record, Sybase recommends you do not use these mappings unless you cannot make changes to existing schemas.

Event Stream Processor Datatypes Adaptive Server Enterprise Datatypes Notes
integer

tinyint*, smallint*, unsigned smallint*, int, bigint, money, numeric and decimal datatypes with precision - scale >= 10

 
long

unsigned int*, bigint, unsigned bigint*, numeric and decimal datatypes with precision - scale >= 19

 
float double precision, numeric, decimal

There is no required precision or scale for float to numeric or decimal mapping during adapter initialization. However, during message flow, any rows which have an error occur while data is converting from Event Stream Processor float to Adaptive Server Enterprise numeric or decimal is rejected. This generally occurs due to insufficient precision of the target numeric and decimal datatype.

date date, smalldatetime, datetime, bigdatetime  
timestamp bigdatetime  
bigdatetime time, bigtime, bigdatetime, datetime  
string char(n), varchar(n)

If the destination column is not large enough to store the string value, the value is truncated to fit the column and a warning is displayed in the ESP Server logs.

boolean bit, tinyint*, smallint*, int, bigint, unsigned smallint*, unsigned int*, unsigned bigint*, varchar(5)

For boolean values that map to varchar(5) columns, the adapter inserts the text "true" or "false" into the database table. For boolean values that map to various integer database columns, the adapter inserts values 1 or 0.

money

smallmoney*, money, numeric* and decimal* datatypes with scale >= 4

 
money(n)

numeric(p,s)* and decimal(p,s)* datatypes with scale >= n

 
interval bigint  
binary binary(n), varbinary(n)