Datatype Mapping for the SAP HANA Output Adapter

Event Stream Processor datatypes map to SAP HANA datatypes.

The SAP HANA Output adapter supports all available Event Stream Processor datatypes. On initialization, the adapter ensures that the schema of the Event Stream Processor window or stream to which the adapter is attached and the schema of the target SAP HANA database table have compatible column datatypes.

References to a "decimal (floating)" datatype for SAP HANA mean specifying a decimal datatype without giving precision or scale.

Event Stream Processor Datatypes SAP HANA Datatypes Notes
integer tinyint*, smallint*, integer, bigint, decimal (if p-s is at least 10), decimal (floating), smalldecimal

Any SAP HANA column datatypes that are marked with an asterisk have data-dependent limitations on the mapping. Due to the performance implications of the runtime checks on these mappings, SAP recommends that you do not use them unless modification of your database schema is not an option.

long bigint, decimal (if precision scale is 19+), decimal (floating)  
float double, float (25+), real

The mapping of an Event Stream Processor float to an SAP HANA real datatype uses a run time check to ensure that any value passed is within the range of +-3.4x10^38.

date date, time, seconddate, timestamp

Values are truncated to fit into the destination datatype.

timestamp date, time, seconddate, timestamp

Values are truncated to fit into the destination datatype.

bigdatetime date, time, seconddate, timestamp  
string varchar, nvarchar, alphanum, char, nchar, shorttext

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 written in the ESP Server logs.

boolean tinyint, smallint, integer, bigint  
money decimal (if scale is at least 4, with runtime check that precision-scale is enough to store the integer value), decimal (floating), smalldecimal

If the decimal column's precision is less than 19, decimal columns use run time checks to ensure that the whole-number precision (precision-scale) of the column is enough to hold the whole-number decimal places of each value that passes through the adapter. To avoid these checks and increase performance, use decimal columns with precision 19 or higher.

smalldecimal has a precision 16, and always uses run time checks.

The adapter does not permit mapping a money column to a decimal column where the scale is greater than the precision. For example, a decimal(4,6) column is not allowed.

money(1-15) decimal, decimal (floating), smalldecimal

If scale is at least 1-15, with runtime check that precision-scale is enough to store the integer value.

If the decimal column's precision is less than 19, decimal columns use run time checks to ensure that the whole-number precision (precision-scale) of the column is enough to hold the whole-number decimal places of each value that passes through the adapter. To avoid these checks and increase performance, use decimal columns with precision 19 or higher.

smalldecimal has precision 16, and always uses run-time checks.

The adapter does not permit mapping a money column to a decimal column where the scale is greater than the precision. For example, a decimal(4,6) column is not allowed.

interval bigint  
binary binary, varbinary

Passing in binary data longer than the size of the database column causes that row or batch to be rejected.