Column Data Types
SAP Datasphere supports a wide range of data types for your columns. Once a table is deployed and contains data, column data types can only be changed if the change is compatible with the type of data contained in the column and will not truncate any value.
Datetime Data Types
| Data Type | Default Format | Supported Value Range | Can Be Converted To... |
|---|---|---|---|
|
Date |
YYYY-MM-DD |
‘0001-01-01’ to ‘9999-12-31’ |
Datetime, String |
|
Datetime |
YYYY-MM-DD HH24:MI:SS |
‘0001-01-01 00:00:00’ to ‘9999-12-31 23:59:59’ |
Date, String, Time |
|
Time |
HH24:MI:SS |
‘00:00:00 ’ to ’23:59:59’ |
Datetime, String |
|
Timestamp |
YYYY-MM-DD HH24:MI:SS |
‘0001-01-01 00:00:00’ to ‘9999-12-31 23:59:59’ |
String |
Character String Data Types
| Data Type | Can contain... | Can Be Converted To... |
|---|---|---|
|
LargeString |
Variable length string of up to 2 GB. |
No data type conversion possible |
|
String(n) |
Variable-length Unicode string of up 5000 characters. |
Binary, Boolean, Date, Datetime, Decimal, Double, hana.SMALLINT, hana.TINYINT, hana.SMALLDECIMAL, hana.REAL, hana.BINARY, Integer, Integer64, LargeBinary, LargeString, Time, Timestamp.
|
Numeric Data Types
| Data Type | Description | Example Value | Can Be Converted To... |
|---|---|---|---|
|
Decimal (p, s) |
Precision (p) defines the number of total digits and can be between 1 and 38. Scale (s) defines the number of digits after the decimal point and can be between 0 and p. |
15.2 |
Double, String |
|
DecimalFloat |
Decimal floating-point number with 34 mantissa digits. |
15.2 |
|
|
Double |
Double-precision, 64-bit floating-point number |
15.2 |
String |
|
Integer |
Respective container's standard signed integer. |
1337 |
Boolean, Decimal, Double, hana.SMALLINT, hana.TINYINT, Integer64, String |
|
Integer64 |
Signed 64-bit integer |
1337 |
Boolean, Decimal, Double, hana.SMALLINT, hana.TINYINT, Integer, String |
|
hana.REAL |
32-bit binary floating-point number |
15.2 |
Double, hana.SMALLDECIMAL, String |
|
hana.SMALLDECIMAL |
64-bit decimal floating-point number, where (p) can be between 1 and 16 and s can be between -369 and 368. |
15.2 |
Double, hana.REAL, String |
|
hana.SMALLINT |
Signed 16-bit integer supporting the values -32,768 to 32,767 |
15 |
Decimal, Double, hana.SMALLDECIMAL, hana.TINYINT, Integer, Integer64, hana.REAL, String |
|
hana.TINYINT |
Unsigned 8-bit integer supporting the values 0 to 255 |
15 |
Decimal, Double, hana.SMALLDECIMAL, hana.SMALLINT, hana.REAL, Integer, Integer64, String |
Boolean Data Types
| Data Type | Can contain... | Can Be Converted To... |
|---|---|---|
|
Boolean |
TRUE, FALSE and UNKNOWN, where UNKNOWN is a synonym of NULL. |
Integer, String |
Binary Data Types
| Data Type | Can contain... | Can Be Converted To... |
|---|---|---|
|
Binary(n) |
Variable length byte string with user-defined length limit of up to 4000 bytes. |
String, LargeBinary, hana.BINARY |
|
LargeBinary |
Variable length byte string of up to 2 GB. |
No data type conversion possible |
|
hana.BINARY (n) |
Byte string of fixed length (n). |
LargeBinary, String, Binary |
Universally Unique Identifier Data Type
| Data Type | Description | Example Value | Can Be Converted To... |
|---|---|---|---|
|
UUID |
Universally unique identifier encoded as a 128-bit integer. |
be071623-8699-4106-b6fa-8e3cb04c261e |
String(n) where n >=36 |
Spatial Data Types
| Data Type | Can contain... | Can Be Converted To... |
|---|---|---|
|
hana.ST_GEOMETRY[(<srid>)] |
Spatial data in any form, including 0-dimensional points, lines, multi-lines, and polygons. |
No data type conversion possible |
|
hana.ST_POINT[(<srid>)] |
Spatial data in the form of 0-dimensional points that represents a single location in coordinate space. |
No data type conversion possible |