Data type conversion

Data type conversion reference

This document describes default conversions of data types of supported databases into target redis data types.

General ANSI SQL data types

Source data type Target data type for HASH Example for HASH
array not supported
bigint string 2147483648 will be saved as '2147483648'
binary bytes string
bytes or base64-encoded String, or a hex-encoded String, based on the connector configuration property setting binary.handling.mode
When binary.handling.mode = bytes the string 'hello' will be added to the table as the binary string '0x68656C6C6F',will be converted by Debezium to 'aGVsbG8AAAAAAAAAAAAAAAAAAAA=' and will be stored in Redis target database as: 'aGVsbG8AAAAAAAAAAAAAAAAAAAA='
bit string not supported
blob bytes string
bytes or base64-encoded String, or a hex-encoded String, based on the connector configuration property setting binary.handling.mode
When binary.handling.mode = bytes the binary image file ,which was loaded into the table ,will be converted by Debezium to bytes and will be stored in Redis target database as bytes string
boolean string The boolean value: false will be converted by the Applier to 0 and will be saved in Redis target database as the string '0'
char string When PostgreSQL data type is char(14) 'hello world' will be saved as 'hello world   '
date string
Mapped to ms.microsec since epoch
PG field value: '2021-01-29' will be converted by Debezium to the int 18656 (number of dates since epoch), which will be converted to number of ms since epoch and will be stored in Redis target database as: '1611878400000'
integer string 2147483640 will be saved as '2147483640'
interval not supported
null The field with null value will be sent by Debezium as null and will not be stored in Redis target database
numeric string
Debezium configuration parameter decimal.handling.mode determines how the connector maps decimal values.When decimal.handling.mode = 'precision' the binary string,recieved by Debezium,will be converted to its corresponding numeric value and will be stored in Redis target database as string
PG field value: 4521398.56 will be converted by Debezium to binary string 'GvMbUA==', which will be converted to numeric value and will be stored in Redis target database as: '4521398.56'
smallint string 32767 will be saved as '32767'
text string 'This is a very long text for the PostgreSQL text column'
time string
mapped to number of seconds past midnight
'14:23:46' will be converted to '51826000000' sec
PostgreSQL, Oracle, Cassandra: timestamp
MySQL, SQL Server: datetime
string
mapped to ms.microsec since epoch.
SQL Server datetime format: YYYY-MM-DD hh:mm:ss[.nnn],
range: 1753-01-01 through 9999-12-31
PG field value: '2018-06-20 15:13:16.945104' will be converted by Debezium to '1529507596945104'(micro seconds) and will be stored in Redis target database as '1529507596945.104'
PosrgreSQL: timestamptz
Oracle: timestamp with local timezone
MySQL: timestamp
string
converted to UTC and stored as number of ms.microsec since epoch
timetz string
converted to UTC and stored as number of seconds past midnight
PG field value: '14:23:46.12345' will be converted by Debezium to the string '12:23:46.12345Z' and will be stored in Redis target database as: '44638.345'
varbinary bytes string
bytes or base64-encoded String, or a hex-encoded String, based on the connector configuration property setting binary.handling.mode
When binary.handling.mode = bytes the string 'hello' will be added to the table as the binary string '0x68656C6C6F',will be converted by Debezium to 'aGVsbG8=' and will be stored in Redis target database as: 'aGVsbG8='
varchar string 'hello world' will be saved as 'hello world'
xml string
Source data type Target data type for JSON Example for JSON
array not supported
bigint number 2147483648 will be saved as 2147483648
binary bytes string When binary.handling.mode = bytes the string 'hello' will be added to the table as the binary string '0x68656C6C6F',will be converted by Debezium to 'aGVsbG8AAAAAAAAAAAAAAAAAAAA=' and will be stored in Redis target database as: 'aGVsbG8AAAAAAAAAAAAAAAAAAAA='
bit string not supported
blob bytes string When binary.handling.mode = bytes the binary image file ,which was loaded into the table ,will be converted by Debezium to bytes and will be stored in Redis target database as bytes string
boolean boolean The boolean value:true will be saved in Redis target database as boolean data type with value True
char string When PostgreSQL data type is char(14) 'hello world' will be saved as 'hello world   '
date number
Mapped to ms.microsec since epoch
PG field value: 2021-01-29 will be converted by Debezium to the int 18656 (number of dates since epoch), which will be converted to number of ms since epoch and will be stored in Redis target database as: 1611878400000
integer number 2147483640 will be saved as 2147483640
interval not supported
null The field with null value will be sent by Debezium as null and will be stored in Redis target database with the value null
numeric Debezium configuration parameter decimal.handling.mode determines how the connector maps decimal values. When decimal.handling.mode = 'precision' the binary string received by Debezium will be converted to its corresponding numeric value and will be stored in Redis target database db as number. When decimal.handling.mode = 'string' the string ,received by Debezium, will be stored in Redis target database as string. When decimal.handling.mode = 'double' the double value received by Debezium will be stored in Redis target database as number. decimal.handling.mode = string: PG field value: 4521398.56 will be recieved by Debezium as the string '4521398.56', and will be stored in Redis target database as the string: '4521398.56' .
smallint number 32767 will be saved as 32767
text string
time number number
mapped to the number of seconds past midnight
'14:23:46' will be converted to 51826000000 sec
PostgreSQL, Oracle, Cassandra: timestamp
MySQL, SQL Server: datetime
decimal
mapped to ms.microsec since epoch.
SQL Server datetime format: YYYY-MM-DD hh:mm:ss[.nnn],
range: 1753-01-01 through 9999-12-31
PG field value: '2018-06-20 15:13:16.945104' will be converted by Debezium to '1529507596945104'(micro seconds) and will be stored in Redis target database as `1529507596945.104
PosrgreSQL: timestamptz
Oracle: timestamp with local timezone
MySQL: timestamp
number
converted to UTC and stored as number of ms.microsec since epoch
timetz number
converted to UTC and stored as number of ms.microsec since epoch
PG field value: '14:23:46.12345' will be converted by Debezium to the string '12:23:46.12345Z' and will be stored in Redis target database as: 44638.345
varbinary bytes string
bytes or base64-encoded String, or a hex-encoded String, based on the connector configuration property setting binary.handling.mode
When binary.handling.mode = bytes the string 'hello' will be added to the table as the binary string '0x68656C6C6F',will be converted by Debezium to 'aGVsbG8=' and will be stored in Redis target database as: 'aGVsbG8='
varchar string 'hello world' will be saved as 'hello world’
xml string

Cassandra data types

Source data type Target data type for HASH Example for HASH
ascii string
counter (64-bit long) string 2
date not supported
decimal not supported
double string '1.007308023'
duration not supported
float string The number -3.4E+38 will be received by debezium as -3.4E38, will be converted by the Applier to -340000000000000000000000000000000000000 and will be saved in Redis target database as '-340000000000000000000000000000000000000'
frozen string {'10.10.11.1', '10.10.10.1', '10.10.12.1'} will be saved in Redis target database as a string: '{'10.10.11.1', '10.10.10.1', '10.10.12.1'}'
frozen udt string {'city': 'City','street': 'Street','streetno': 2,'zipcode': '02-212'} will be saved in Redis target database as a string: '{'city': 'City','street': 'Street','streetno': 2,'zipcode': '02-212'}'
inet string
IPv4 and IPv6 network addresses
The IP address 4.35.221.243 will be converted by debezium to '/4.35.221.243' and will be saved in Redis target database as '/4.35.221.243'
list string The list ['New York', 'Paris','London','New York'] will be sent by debezium as array of strings: ['New York', 'Paris','London','New York'] and will be saved in Redis target database as the string "['New York', 'Paris','London','New York']"
map string {'fruit' : 'Apple', 'band' : 'Beatles'} will be saved in Redis target database as a string: '{'fruit' : 'Apple', 'band' : 'Beatles'}'
set string The set {'y','n'} will be saved in Redis target database as the string `'{'y','n'}'
tinyint string
uuid string b9980b96-a85b-411c-b8e7-4be55c123793
tuple string The tuple { "field1": 1, "field2": "testing tuple", "field3": 2 } will be saved in Redis target database as a string: ' { "field1": 1, "field2": "testing tuple", "field3": 2 }'
varint not supported
Source data type Target data type for JSON Example for JSON
ascii string
counter (64-bit long) number 2
date not supported
decimal not supported
double number 1.007308023
duration not supported
float number The number -3.4E+38 will be received by debezium as -3.4E38 and will be saved in Redis target database as -1e+38
frozen array {'10.10.11.1', '10.10.10.1', '10.10.12.1'} will be saved in Redis target database as an array: {'/10.10.11.1', '/10.10.10.1', '/10.10.12.1'}
frozen udt object {'city': 'City','street': 'Street','streetno': 2,'zipcode': '02-212'} will be saved in Redis target database as string will be saved in Redis target database as an object: {'city': 'City','street': 'Street','streetno': 2,'zipcode': '02-212'}
inet string
IPv4 and IPv6 network addresses
The IP address 4.35.221.243 will be converted by debezium to '/4.35.221.243' and will be saved in Redis target database as '/4.35.221.243'
list array The list ['New York', 'Paris','London','New York'] will be sent by debezium as array of strings: ['New York', 'Paris','London','New York'] and will be saved in Redis target database as an array: ['New York', 'Paris','London','New York']
map object {'fruit' : 'Apple', 'band' : 'Beatles'} will be saved in Redis target database as an object: {'fruit' : 'Apple', 'band' : 'Beatles'}
set array The set {'y','n'} will be saved in Redis target database as an array: {'y','n'}
tinyint
uuid string b9980b96-a85b-411c-b8e7-4be55c123793
tuple object The tuple { "field1": 1, "field2": "testing tuple", "field3": 2 } will be saved in Redis target database as an object: { "field1": 1, "field2": "testing tuple", "field3": 2 }
varint not supported

MySQL and MariaDB data types

Source data type Source data type for HASH Example for Hash
enum string MySQL enum value 'cat' will be stored in Redis target database as 'cat'
geometry not supported
geometrycollection not supported
json string {"pid": 102, "name": "name2"}
linestring not supported
multilinestring not supported
multipoint not supported
multypolygon not supported
polygon not supported
set string '1,2,3' will be stored in Redis target database as: '1,2,3'
year string The value '55' will be stored in the database as 2055 and will be sent by Debezium as int32 data type with value 2055. It will be stored in Redis target database as the string '2055' as well
Source data type Target data type for JSON Example for JSON
enum string MySQL enum value 'cat' will be stored in Redis target database as 'cat'
geometry not supported
geometrycollection not supported
json object {"pid": 102, "name": "name2"}
linestring not supported
multilinestring not supported
multipoint not supported
multypolygon not supported
polygon not supported
set string '1,2,3' will be stored in Redis target database as: '1,2,3'
year number The value '55' will be stored in the database as 2055 and will be sent by Debezium as int32 data type with value 2055. It will be stored in Redis target database as the number 2055 as well

Oracle data types

Source data type Source data type for HASH Example for Hash
bfile not supported
binary_double string '1.7E+308'
binary_float string '3.40282E38'
clob string large block of text
float,real,double precision
real = FLOAT(63),double precision = FLOAT(126).
string The value -3.402E+38 will be saved in Redis target database as the string '-340200000000000000000000000000000000000' when Debezium configuration parameter decimal.handling.mode = 'double'
long raw not supported
nchar string - is Unicode data type that can store Unicode characters The string 'testing hebrew שלום' will be stored in Redis target database as 'testing hebrew \xd7\xa9\xd7\x9c\xd7\x95\xd7\x9d         '
nclob not supported
number(p,s) string '10385274000.32'
nvarchar string - is Unicode data type that can store Unicode characters The string testing hebrew שלום' will be stored in Redis target database as 'testing hebrew \xd7\xa9\xd7\x9c\xd7\x95\xd7\x9d'
raw not supported
rowid string AAAR1QAAOAAAACFAAA
timestamp with tz string '2021-12-30 14:23:46' will be converted by Debezium to the string '2021-12-30T14:23:46+02:00' and will be stored in Redis target database as the string: '1611878400000' which is the number of ms since epoch
urowid not supported
Source data type Target data type for JSON Example for JSON
bfile not supported
binary_double number 1.7E+308
binary_float number 3.40282E38
clob string large block of text
float,real,double precision
real = FLOAT(63),double precision = FLOAT(126).
number/string the value -3.402E+38 will be saved in Redis target database as the number -340200000000000000000000000000000000000 when Debezium configuration parameter decimal.handling.mode = 'double'
long raw not supported
nchar string - is Unicode data type that can store Unicode characters The string 'testing hebrew שלום' will be stored in Redis target database as 'testing hebrew \xd7\xa9\xd7\x9c\xd7\x95\xd7\x9d         '
nclob not supported
number(p,s) number 10385274000.32
nvarchar string - is Unicode data type that can store Unicode characters The string testing hebrew שלום' will be stored in Redis target database as 'testing hebrew \xd7\xa9\xd7\x9c\xd7\x95\xd7\x9d'
raw not supported
rowid string AAAR1QAAOAAAACFAAA
timestamp with tz number '2021-12-30 14:23:46' will be converted by Debezium to the string '2021-12-30T14:23:46+02:00' and will be stored in Redis target database as the number: 1611878400000 which is the number of ms since epoch
urowid not supported

PostgreSQL data types

Source data type Source data type for HASH Example for Hash
box not supported
cidr string
IPv4 and IPv6 networks addresses.
'4.35.221.243/32'
circle not supported
domain string
hstore string '{"pages":"368","author":"Katherine Dunn","category":"fiction"}'
inet string
IPv4 and IPv6 network addresses
'4.35.221.243'
json string "{"guid":  "9c36adc1-7fb5-4d5b-83b4-90356a46061a",
"name": "Angela Barton",
"is_active": null,
"company": "Magnafone"
"address": "178 Howard Place, Gulf, Washington,702",
"registered": "2009-11-07T08:53:22 +08:00",
"latitude": 19.793713,
"longitude": 86.513373,
"tags": ["enim","aliquip","qui" ]}"
line not supported
macaddr string
mac addresses
'08:00:2b:01:02:03'
money string When decimal.handling.mode = 'double' the money value -8793780.01 will be received by Debezium as -8793780.01 with double data type, and will be stored in Redis target database as the string'-8793780.01'
path not supported
point not supported
polygon not supported
uuid string 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'
Source data type Target data type for JSON Example for JSON
box not supported
cidr string
IPv4 and IPv6 networks addresses.
'4.35.221.243/32'
circle not supported
domain string
hstore string '{"pages":"368","author":"Katherine Dunn","category":"fiction"}
inet string
IPv4 and IPv6 network addresses
'4.35.221.243'
json object {"guid":  "9c36adc1-7fb5-4d5b-83b4-90356a46061a",
"name": "Angela Barton",
"is_active": null,
"company": "Magnafone"
"address": "178 Howard Place, Gulf, Washington,702",
"registered": "2009-11-07T08:53:22 +08:00",
"latitude": 19.793713,
"longitude": 86.513373,
"tags": ["enim","aliquip","qui" ]}
line not supported
macaddr string
mac addresses
'08:00:2b:01:02:03'
money string When decimal.handling.mode = 'double' the money value -8793780.01 will be received by Debezium as -8793780.01, with double data type and will be stored in Redis target database as the number -8793780.01
path not supported
point not supported
polygon not supported
uuid string 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'

SQL server data types

Source data type Source data type for HASH Example for Hash
bit string When value >0 it will be converted by Debezium to true and will be saved in Redis target database as '1' while when value = 0 it will be converted by Debezium to false and will be saved in Redis target database as '0'
datetime2 string
Represents the number of milliseconds since the epoch, and does not include timezone information.
When Debezium configuration parameter time.precision.mode='connect', the value '2018-06-20 15:13:16.945104' will be converted by Debezium to the value '1529507596945104' and will be saved in Redis target database database as the string '1529507596945.104'
datetimeoffset string When Debezium configuration parameter decimal.handling.mode = 'precision', the datetimeoffset datatype value '12-10-25 12:32:10 +01:00' will be converted to the string '2025-12-10T12:32:10+01:00' and will be saved in Redis target database as 1765366330000
decimal,float,real string
range of values: decimal-10^38 +1 to 10^38,float-1.79E+308 to -2.23E-308, 0 and 2.23E-308 to 1.79E+308,real:- 3.40E + 38 to -1.18E - 38, 0 and 1.18E - 38 to 3.40E + 38
When Debezium configuration parameter decimal.handling.mode = 'precision' the value '-3.402E+38' will be converted by Debezium to the binary string '/wAP3QCzc/wpiIGe8AAAAAA=' and will be saved in Redis target database as the string '-340200000000000000000000000000000000000'
image string
Variable-length binary data from 0 through 2,147,483,647 bytes.
money string
range of values: -922,337,203,685,477,5808 to 922,337,203,685,477.5807
When Debezium configuration parameter decimal.handling.mode = 'precision' the value 922337203685477.5807 will be converted by Debezium to the binary 'f/////////8=' string and will be saved in Redis target database as the string '922337203685477.5807'
nchar string - fixed-size string data , Unicode data type that can store Unicode characters
nvarchar string - variable-size string data, Unicode data type that can store Unicode characters
numeric string
range of values - 10^38 +1 to 10^38
When Debezium configuration parameter time.precision.mode = 'connect' and decimal.handling.mode = 'precision' , the value 1.00E +33 will be converted by Debezium to the binary string 'SztMqFqGw1MAAAAAAAAAAA==' and will be saved in Redis target database as the string '1000000000000000000000000000000000'
rowversion string
data type that exposes automatically generated, unique binary numbers within a database. rowversion is generally used as a mechanism for version-stamping table rows.
0x00000000000007D0
smalldatetime string
represents the number of milliseconds past the epoch, and does not include timezone information.
'2018-06-20 15:13:16' will be converted by Debezium to 1529507580000 ms past the epoch and will be saved in Write-behind as the string '1529507580000'.
number of seconds: 16 will be not be included in the convertion and will not be saved in Redis target database
smallmoney string
range of values: - 214,748.3648 to 214,748.3647
When Debezium configuration parameter decimal.handling.mode = 'string' the value -214748.3648 will be converted by Debezium to the string '-214748.3648' and will be saved in Redis target database as '-214748.3648'
Spatial Geometry Types not supported
Spatial Geography Types not supported
table not supported
text Variable-length Unicode data
uniqueidentifier string 06BEEF00-F859-406B-9A60-0A56AB81A97
Source data type Target data type for JSON Example for JSON
bit boolean When value >0 it will be converted by Debezium to true and will be saved in Redis target database as True while when value = 0 it will be converted by Debezium to false and will be saved in Redis target database as False
datetime2 number
Represents the number of milliseconds since the epoch, and does not include timezone
When Debezium configuration parameter time.precision.mode='connect', the value '2018-06-20 15:13:16.945104' will be converted by Debezium to the value '1529507596945104' and will be saved in Redis target database database as the number 1529507596945.104
datetimeoffset number When Debezium configuration parameter decimal.handling.mode = 'precision', the datetimeoffset datatype value '12-10-25 12:32:10 +01:00' will be converted to the string '2025-12-10T12:32:10+01:00' and will be saved in Redis target database as the string 1765366330000
decimal,float,real number/string When Debezium configuration parameter decimal.handling.mode = 'precision' the value '-3.402E+38' will be converted by Debezium to the binary string '/wAP3QCzc/wpiIGe8AAAAAA=' and will be saved in Redis target database as the number -340200000000000000000000000000000000000
image string
money number/string depending on the value of decimal.handling.mode When Debezium configuration parameter decimal.handling.mode = 'precision' the value 922337203685477.5807 will be converted by Debezium to the binary 'f/////////8=' string and will be saved in Redis target database as the number 922337203685477.5807
nchar string
nvarchar string - variable-size string data, Unicode data type that can store Unicode characters
numeric number When Debezium configuration parameter time.precision.mode = 'connect' and decimal.handling.mode = 'precision' , the value 1.00E +33 will be converted by Debezium to the binary string 'SztMqFqGw1MAAAAAAAAAAA==' and will be saved in Redis target database as the number1000000000000000000000000000000000
rowversion string
data type that exposes automatically generated, unique binary numbers within a database. rowversion is generally used as a mechanism for version-stamping table rows.
0x00000000000007D0
smalldatetime number
represents the number of milliseconds past the epoch, and does not include timezone information.
'2018-06-20 15:13:16' will be converted by Debezium to 1529507580000 ms past the epoch and will be saved in Write-behind as the number 1529507580000.
number of seconds: 16 will be not be included in the convertion and will not be saved in Redis target database
smallmoney number When Debezium configuration parameter decimal.handling.mode = 'string' the value -214748.3648 will be converted by Debezium to the string '-214748.3648' and will be saved in Redis target database as '-214748.3648'
Spatial Geometry Types not supported
Spatial Geography Types not supported
table not supported
text
uniqueidentifier string 06BEEF00-F859-406B-9A60-0A56AB81A97

* fields with "not supported" data type will not appear in target hash.

RATE THIS PAGE
Back to top ↑