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 |
---|---|---|
bigdatetime | date, time, seconddate, timestamp | |
binary | binary, varbinary, as well as ST_POINT and ST_GEOMETRY columns |
Passing in binary data longer than the size of the database column causes that row or batch to be rejected. ESP string data maps to ST_POINT and ST_GEOMETRY SAP HANA columns when the ESP data is in the Well-Known Text format. The current standard definition is in the ISO/IEC 13249-3:2011 standard. If SAP HANA is unable to parse or validate the Well-Known Text data, the batch (which may include other rows) fails. Data mapping ST_POINT and ST_GEOMETRY SAP HANA columns are limited to 1000 hexadecimal characters. |
boolean | tinyint, smallint, integer, bigint | |
seconddate | date, time, seconddate, timestamp |
Values are truncated to fit into the destination datatype. |
decimal | decimal |
ESP performs runtime checks to ensure the whole-number portion of your decimal fits into the database column. However, ESP does not ensure the fractional portion fits into the database column. |
float | double, float (25+), real, smalldecimal |
The mapping of the Event Stream Processor float to the SAP HANA real datatype uses a run time check to ensure that any values passed are within the range of +-3.4x10^38. smalldecimal is a limited precision floating type in SAP HANA, which truncates values to fit into the destination datatype. Mapping smalldecimal to datatypes other than float in ESP may result in unexpected behavior. For example, mapping smalldecimal to money types may result in an abnormal shutdown for ESP. |
integer | tinyint*, smallint*, integer, bigint, decimal (if p-s is at least 10), decimal (floating) |
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. |
interval | bigint | |
long | bigint, decimal (if precision scale is 19+), decimal (floating) | |
money | decimal (if scale is at least 4, with runtime check that precision-scale is enough to store the integer value), decimal (floating) |
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. 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) |
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. 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. |
string | varchar, nvarchar, alphanum, char, nchar, shorttext, as well as ST_POINT and ST_GEOMETRY columns |
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. ESP string data maps to ST_POINT and ST_GEOMETRY SAP HANA columns when the ESP data is in the Well-Known Text format. The current standard definition is in the ISO/IEC 13249-3:2011 standard. If SAP HANA is unable to parse or validate the Well-Known Text data, the batch (which may include other rows) fails. Data mapping ST_POINT and ST_GEOMETRY SAP HANA columns are limited to 1000 characters. |
time | time, timestamp | When the ESP time value is mapped to a HANA timestamp value, the date portion is set to January1, 1970 (the UNIX epoch). |
msdate | date, time, seconddate, timestamp |
Values are truncated to fit into the destination datatype. |