Heterogeneous databases have different data types. When Data Transmission Service (DTS) synchronizes data between heterogeneous databases, DTS converts the data types of the source database to those of the destination database. This topic lists the data type mappings for you to view and evaluate the impact of data synchronization on your business.

Overview

You can view the data type mappings between heterogeneous databases based on the following synchronization scenarios:

Synchronize data from a MySQL database

The following table lists the data type mappings between MySQL and AnalyticDB databases. The source instance can be a self-managed MySQL database, an ApsaraDB RDS for MySQL instance, or a PolarDB for MySQL cluster. The destination instance can be an AnalyticDB for MySQL cluster V2.0 or an AnalyticDB for PostgreSQL instance.
Note If the value range of the data to be synchronized from the source instance exceeds the range supported by DTS, the accuracy of the data written to the destination instance will decrease.
Table 1. Destination instance: an AnalyticDB for MySQL cluster or an AnalyticDB for PostgreSQL instance
CategoryData type of the source instanceValue rangeData type of AnalyticDB for MySQLData type of AnalyticDB for PostgreSQL
IntegerBIT[(M)]1 ~ 64VARCHARBIT
TINYINT[(M)]-128 ~ 127TINYINTSMALLINT
TINYINT[(M)] [UNSIGNED]0 ~ 255SMALLINTSMALLINT
SMALLINT[(M)]-32768 ~ 32767SMALLINTSMALLINT
SMALLINT[(M)] [UNSIGNED]0 ~ 65535INTINTEGER
MEDIUMINT[(M)]-8388608 ~ 8388607INTINTEGER
MEDIUMINT[(M)] [UNSIGNED]0 ~ 16777215INTINTEGER
INT[(M)]-2147483648 ~ 2147483647INTINTEGER
INT[(M)] [UNSIGNED]0 ~ 4294967295BIGINTBIGINT
BIGINT[(M)]-9223372036854775808 ~ 9223372036854775807BIGINTBIGINT
BIGINT[(M)] [UNSIGNED]0 ~ 18446744073709551615DECIMAL(20,0)NUMERIC(20)
DecimalDECIMAL[(M[,D])]M: 0 to 65
D: 0 to 30
DECIMAL[(M[,D])]DECIMAL
FLOAT(p)1.175494351E-38 ~ 3.402823466E+38FLOATREAL
DOUBLE[(M,D)]2.2250738585072014E-308 ~ 1.7976931348623157E+308DOUBLEDOUBLE PRECISION
Date and timeDATE1000-01-01~9999-12-31
Note The format is YYYY-MM-DD, in UTC.
DATEDATE
DATETIME[(fsp)]1000-01-01 00:00:00.000000 ~ 9999-12-31 23:59:59.999999
Note The format is YYYY-MM-DD hh:mm:ss[.fraction], in UTC.
DATETIMETIMESTAMP
TIMESTAMP[(fsp)]1970-01-01 00:00:01.000000 ~ 2038-01-19 03:14:07.999999
Note The format is YYYY-MM-DD hh:mm:ss[.fraction], in UTC.
TIMESTAMPTIMESTAMP WITH TIME ZONE
TIME[(fsp)]-838:59:59.000000 ~ 838:59:59.000000
Note The format is hh:mm:ss[.fraction], in UTC.
TIMETIME
YEAR[(4)]1901 to 2155, or 0000INTINTEGER
StringCHAR[(M)]0 to 255 charactersVARCHARCHAR
VARCHAR(M)0 to 65,535 charactersVARCHARVARCHAR
BINARY[(M)]0 to 255 bytesVARBINARYBYTEA
VARBINARY(M)0 to 65,535 bytesVARBINARYBYTEA
TINYBLOB255 (2^8 - 1) bytesVARBINARYBYTEA
TINYTEXT255 (2^8 - 1) charactersVARCHARTEXT
BLOB65,535 (2^16 - 1) bytesVARBINARYBYTEA
TEXT65,535 (2^16 - 1) charactersVARCHARTEXT
MEDIUMBLOB16,777,215 (2^24 - 1) bytesVARBINARYBYTEA
MEDIUMTEXT16,777,215 (2^24 - 1) charactersVARCHARTEXT
LONGBLOB4,294,967,295 or 4 GB (2^32 - 1) bytesVARBINARYBYTEA
LONGTEXT4,294,967,295 or 4 GB (2^32 - 1) charactersVARCHARTEXT
ENUM('value1','value2',...)An ENUM column can have a maximum of 65,535 distinct elements.VARCHARVARCHAR(128)
SET('value1','value2',...)A SET column can have a maximum of 64 distinct elements.VARCHARVARCHAR(128)
SpatialGEOMETRYGeometry values of any typeVARBINARYPOLYGON
POINTN/AVARBINARYPOINT
LINESTRINGN/AVARBINARYPATH
POLYGONN/AVARBINARYPOLYGON
MULTIPOINTN/AVARBINARYPOLYGON
MULTILINESTRINGN/AVARBINARYPATH
MULTIPOLYGONN/AVARBINARYPOLYGON
GEOMETRYCOLLECTIONA collection of geometry values of any typeVARBINARYPOLYGON
JSONJSONN/AJSONJSON
Table 2. Destination instance: a DataHub project, a Message Queue for Apache Kafka instance, or a self-managed Kafka cluster
CategoryData type of the source instanceValue rangeData type of DataHubData type of a Message Queue for Apache Kafka instance or a self-managed Kafka cluster
IntegerBIT[(M)]1 ~ 64BOOLEAN | STRINGConsistent with the data types of MySQL or PolarDB for MySQL
TINYINT[(M)]-128 ~ 127BIGINT
TINYINT[(M)] [UNSIGNED]0 ~ 255BIGINT
SMALLINT[(M)]-32768 ~ 32767BIGINT
SMALLINT[(M)] [UNSIGNED]0 ~ 65535BIGINT
MEDIUMINT[(M)]-8388608 ~ 8388607BIGINT
MEDIUMINT[(M)] [UNSIGNED]0 ~ 16777215BIGINT
INT[(M)]-2147483648 ~ 2147483647BIGINT
INT[(M)] [UNSIGNED]0 ~ 4294967295BIGINT
BIGINT[(M)]-9223372036854775808 ~ 9223372036854775807BIGINT
BIGINT[(M)] [UNSIGNED]0 ~ 18446744073709551615BIGINT
DecimalDECIMAL[(M[,D])]M: 0 to 65
D: 0 to 30
DECIMAL
FLOAT(p)1.175494351E-38 ~ 3.402823466E+38DOUBLE
DOUBLE[(M,D)]2.2250738585072014E-308 ~ 1.7976931348623157E+308DOUBLE
Date and timeDATE1000-01-01~9999-12-31
Note The format is YYYY-MM-DD, in UTC.
TIMESTAMP
DATETIME[(fsp)]1000-01-01 00:00:00.000000 ~ 9999-12-31 23:59:59.999999
Note The format is YYYY-MM-DD hh:mm:ss[.fraction], in UTC.
TIMESTAMP
TIMESTAMP[(fsp)]1970-01-01 00:00:01.000000 ~ 2038-01-19 03:14:07.999999
Note The format is YYYY-MM-DD hh:mm:ss[.fraction], in UTC.
TIMESTAMP
TIME[(fsp)]-838:59:59.000000 ~ 838:59:59.000000
Note The format is hh:mm:ss[.fraction], in UTC.
STRING
YEAR[(4)]1901 to 2155, or 0000STRING
StringCHAR[(M)]0 to 255 charactersSTRING
VARCHAR(M)0 to 65,535 charactersSTRING
BINARY[(M)]0 to 255 bytesSTRING
VARBINARY(M)0 to 65,535 bytesSTRING
TINYBLOB255 (2^8 - 1) bytesSTRING
TINYTEXT255 (2^8 - 1) charactersSTRING
BLOB65,535 (2^16 - 1) bytesSTRING
TEXT65,535 (2^16 - 1) charactersSTRING
MEDIUMBLOB16,777,215 (2^24 - 1) bytesSTRING
MEDIUMTEXT16,777,215 (2^24 - 1) charactersSTRING
LONGBLOB4,294,967,295 or 4 GB (2^32 - 1) bytesSTRING
LONGTEXT4,294,967,295 or 4 GB (2^32 - 1) charactersSTRING
ENUM('value1','value2',...)An ENUM column can have a maximum of 65,535 distinct elements.STRING
SET('value1','value2',...)A SET column can have a maximum of 64 distinct elements.STRING
SpatialGEOMETRYGeometry values of any typeSTRING
POINTN/ASTRING
LINESTRINGN/ASTRING
POLYGONN/ASTRING
MULTIPOINTN/ASTRING
MULTILINESTRINGN/ASTRING
MULTIPOLYGONN/ASTRING
GEOMETRYCOLLECTIONA collection of geometry values of any typeSTRING
JSONJSONN/ASTRING
Table 3. Destination instance: a MaxCompute project or an Elasticsearch cluster
CategoryData type of the source instanceValue rangeMaxComputeElasticsearch
IntegerBIT[(M)]1 ~ 64BOOLEAN | STRINGBOOLEAN | LONG
Note If the data is only one byte long, we recommend that you use the BOOLEAN data type in Elasticsearch.
TINYINT[(M)]-128 ~ 127BIGINTSHORT
TINYINT[(M)] [UNSIGNED]0 ~ 255BIGINTINTEGER
SMALLINT[(M)]-32768 ~ 32767BIGINTSHORT
SMALLINT[(M)] [UNSIGNED]0 ~ 65535BIGINTINTEGER
MEDIUMINT[(M)]-8388608 ~ 8388607BIGINTINTEGER
MEDIUMINT[(M)] [UNSIGNED]0 ~ 16777215BIGINTINTEGER
INT[(M)]-2147483648 ~ 2147483647BIGINTINTEGER
INT[(M)] [UNSIGNED]0 ~ 4294967295BIGINTLONG
BIGINT[(M)]-9223372036854775808 ~ 9223372036854775807BIGINTLONG
BIGINT[(M)] [UNSIGNED]0 ~ 18446744073709551615BIGINTLONG
DecimalDECIMAL[(M[,D])]M: 0 to 65
D: 0 to 30
DOUBLEDOUBLE
Note If the DECIMAL value contains a decimal point, we recommend that you use the TEXT data type in Elasticsearch to ensure data consistency.
FLOAT(p)1.175494351E-38 ~ 3.402823466E+38DOUBLEFLOAT
DOUBLE[(M,D)]2.2250738585072014E-308 ~ 1.7976931348623157E+308DOUBLEDOUBLE
Date and timeDATE1000-01-01~9999-12-31
Note The format is YYYY-MM-DD, in UTC.
DATETIMEDATE
Note The format is YYYY-MM-DD, in UTC. For more information, see Date format mappings.
DATETIME[(fsp)]1000-01-01 00:00:00.000000 ~ 9999-12-31 23:59:59.999999
Note The format is YYYY-MM-DD hh:mm:ss[.fraction], in UTC.
DATETIMEDATE
Note The DATE format is yyyy-MM-dd'T'HH:mm:ss, in UTC. If DATE is accurate to microseconds, its format is yyyy-MM-dd'T'HH:mm:ss.S. For more information, see Date format mappings.
TIMESTAMP[(fsp)]1970-01-01 00:00:01.000000 ~ 2038-01-19 03:14:07.999999
Note The format is YYYY-MM-DD hh:mm:ss[.fraction], in UTC.
DATETIMEDATE
Note The DATE format is yyyy-MM-dd'T'HH:mm:ss, in UTC. If DATE is accurate to microseconds, its format is yyyy-MM-dd'T'HH:mm:ss.S. For more information, see Date format mappings.
TIME[(fsp)]-838:59:59.000000 ~ 838:59:59.000000
Note The format is hh:mm:ss[.fraction], in UTC.
STRINGDATE
Note The DATE format is YYYY-MM-DD, in UTC. For more information, see Date format mappings.
YEAR[(4)]1901 to 2155, or 0000STRINGDATE
Note The DATE format is yyyy, in UTC. For more information, see Date format mappings.
StringCHAR[(M)]0 to 255 charactersSTRINGTEXT
VARCHAR(M)0 to 65,535 charactersSTRINGTEXT
BINARY[(M)]0 to 255 bytesSTRINGBINARY
VARBINARY(M)0 to 65,535 bytesSTRINGBINARY
TINYBLOB255 (2^8 - 1) bytesSTRINGBINARY
TINYTEXT255 (2^8 - 1) charactersSTRINGTEXT
BLOB65,535 (2^16 - 1) bytesSTRINGBINARY
TEXT65,535 (2^16 - 1) charactersSTRINGTEXT
MEDIUMBLOB16,777,215 (2^24 - 1) bytesSTRINGBINARY
MEDIUMTEXT16,777,215 (2^24 - 1) charactersSTRINGTEXT
LONGBLOB4,294,967,295 or 4 GB (2^32 - 1) bytesSTRINGBINARY
LONGTEXT4,294,967,295 or 4 GB (2^32 - 1) charactersSTRINGTEXT
ENUM('value1','value2',...)An ENUM column can have a maximum of 65,535 distinct elements.STRINGKEYWORD
SET('value1','value2',...)A SET column can have a maximum of 64 distinct elements.STRINGKEYWORD
SpatialGEOMETRYGeometry values of any typeSTRINGGEO_SHAPE
POINTN/ASTRINGGEO_POINT
LINESTRINGN/ASTRINGGEO_SHAPE
POLYGONN/ASTRINGGEO_SHAPE
MULTIPOINTN/ASTRINGGEO_SHAPE
Note If the data is only one byte long, we recommend that you use the BOOLEAN data type in Elasticsearch.
MULTILINESTRINGN/ASTRINGGEO_SHAPE
MULTIPOLYGONN/ASTRINGGEO_SHAPE
GEOMETRYCOLLECTIONA collection of geometry values of any typeSTRINGGEO_SHAPE
JSONJSONN/ASTRINGOBJECT
Note If the data is only one byte long, we recommend that you use the BOOLEAN data type in Elasticsearch.

Synchronize data from an Oracle database

The following table lists the data type mappings between a self-managed Oracle database and an AnalyticDB for PostgreSQL instance.
Note If the value range of the data to be synchronized from the source instance exceeds the range supported by DTS, the accuracy of the data written to the destination instance will decrease.
Category Data type of Oracle Value rangeData type of AnalyticDB for PostgreSQL
NumericNUMBER(p,s)1 to 22 bytes
The argument p indicates the precision. Valid values: 1 to 38.
The argument s indicates the scale. Valid values: -84 to 127.
DECIMAL | TINYINT | SMALLINT | INTEGER | BIGINT
FLOAT(p)1 to 22 bytes
The variable p indicates a pointer. Valid values: 1 to 126 bits.
DOUBLE PRECISION
BINARY_FLOATA 32-bit floating-point number (4 bytes) DOUBLE PRECISION
BINARY_DOUBLEA 64-bit floating-point number (8 bytes) DOUBLE PRECISION
Date and timeDATEN/ATIMESTAMP(0)
TIMESTAMP [(fractional_seconds_precision)]N/ATIMESTAMP
TIMESTAMP [(fractional_seconds_precision)] WITH TIME ZONEN/ATIMESTAMP WITH TIME ZONE
TIMESTAMP [(fractional_seconds_precision)] WITH LOCAL TIME ZONEN/ATIMESTAMP WITH TIME ZONE
INTERVAL YEAR [(year_precision)] TO MONTHN/AVARCHAR(32)
INTERVAL DAY [(day_precision)] TO SECOND [(fractional_seconds_precision)]N/AVARCHAR(32)
StringCHAR [(size [BYTE | CHAR])]2,000 bytes CHAR
NCHAR[(size)]2,000 bytes VARCHAR
VARCHAR2(size [BYTE | CHAR])If MAX_STRING_SIZE is set to EXTENDED, the maximum size is 32,767 bytes.
If MAX_STRING_SIZE is set to STANDARD, the maximum size is 4,000 bytes.
VARCHAR
NVARCHAR2(size)If MAX_STRING_SIZE is set to EXTENDED, the maximum size is 32,767 bytes.
If MAX_STRING_SIZE is set to STANDARD, the maximum size is 4,000 bytes.
VARCHAR
LONGThe maximum size is 2 GB (2^31 - 1). TEXT
RAW(size)The maximum size is 32,767 bytes or 2,000 bytes. BYTEA
LONG RAWThe maximum size is 2 GB. BYTEA
CLOBThe maximum size is (4 GB - 1) × DB_BLOCK_SIZE. TEXT
NCLOBThe maximum size is (4 GB - 1) × DB_BLOCK_SIZE. TEXT
BLOBThe maximum size is (4 GB - 1) × DB_BLOCK_SIZE. BYTEA
BFILEThe maximum size is 4 GB. Not supported
JSONJSONThe maximum size is 32 MB. JSON
ROWIDROWID64 characters OID
SpatialCustomization requiredNot supported
Note If an Oracle data type is not supported by AnalyticDB for PostgreSQL, DTS converts the data type to BYTEA. If the conversion fails, DTS sets the field value to NULL.

Synchronize data from a PostgreSQL database

The following table lists the data type mappings between PostgreSQL and AnalyticDB for PostgreSQL. The source PostgreSQL database can be a self-managed PostgreSQL database or an ApsaraDB RDS for PostgreSQL instance.
Note If the value range of the data to be synchronized from the source instance exceeds the range supported by DTS, the accuracy of the data written to the destination instance will decrease.
CategoryData type of PostgreSQLValue rangeData type of AnalyticDB for PostgreSQL
IntegerSMALLINT-32768 to +32767SMALLINT
INTEGER-2147483648 to +2147483647INTEGER
BIGINT-9223372036854775808 to +9223372036854775807BIGINT
DecimalDECIMALUp to 131072 digits before the decimal point. Up to 16383 digits after the decimal point.DECIMAL
NUMERICUp to 131072 digits before the decimal point. Up to 16383 digits after the decimal point.NUMERIC
REAL6 decimal digits of precisionREAL
DOUBLE PRECISION15 decimal digits of precisionDOUBLE PRECISION
MonetaryMONEY-92233720368547758.08 to +92233720368547758.07MONEY
StringCHARACTER VARYING(n) N/ACHARACTER VARYING(n)
CHARACTER(n)N/ACHARACTER(n)
TEXTN/ATEXT
CHARThe default length is 1 byte.CHAR
NAMEThe maximum length is 64 bytes.NAME
Text searchTSQUERYA text queryTEXT
TSVECTORA document in a form optimized for text searchTEXT
BinaryBYTEA1 or 4 bytes plus the actual binary stringBYTEA
Date and timeTIMESTAMP [ (p) ] [ WITHOUT TIME ZONE ]Date and time without time zone. Storage size: 8 bytes.TIMESTAMP [ (p) ] [ WITHOUT TIME ZONE ]
TIMESTAMP [ (p) ] WITH TIME ZONEDate and time with time zone. Storage size: 8 bytes.TIMESTAMP [ (p) ] WITH TIME ZONE
DATEA date. Storage size: 4 bytes.DATE
TIME [ (p) ] [ WITHOUT TIME ZONE ]A time without time zone. Storage size: 8 bytes.TIME [ (p) ] [ WITHOUT TIME ZONE ]
TIME [ (p) ] WITH TIME ZONE A time with time zone. Storage size: 12 bytes.TIME [ (p) ] WITH TIME ZONE
interval [ fields ] [ (p) ]A time interval. Storage size: 16 bytes.interval [ fields ] [ (p) ]
BooleanBOOLEAN1 byteBOOLEAN
EnumeratedCustomization requiredN/AVARCHAR(128)
SpatialPOINTA point on a plane. Storage size: 16 bytes.POINT
LINEAn infinite line. Storage size: 32 bytes.LINE
LSEGA finite line segment. Storage size: 32 bytes.LSEG
BOXA rectangular box. Storage size: 32 bytes.BOX
PATH A path. Storage size: 16 + 16n bytes.PATH
POLYGONA polygon (similar to closed path). Storage size: 40 + 16n bytes.POLYGON
CIRCLEA circle. Storage size: 24 bytes.CIRCLE
Network addressCIDRIPv4 and IPv6 networks. Storage size: 7 or 19 bytes.CIDR
INETIPv4 and IPv6 hosts and networks. Storage size: 7 or 19 bytes.INET
MACADDR MAC addresses. Storage size: 6 bytes.MACADDR
MACADDR8MAC addresses in EUI-64 format. Storage size: 8 bytes.MACADDR8
Bit stringBit (n)N/ABit (n)
BIT VARYING (n)N/ABIT VARYING (n)
UUIDUUIDN/AVARCHAR(64)
XMLXMLN/AXML
JSONJSONN/AJSON
JSONBN/AJSONB

Synchronize data from an SQL Server database

The following table lists the data type mappings between SQL Server and AnalyticDB databases. The source instance can be a self-managed SQL Server database or an ApsaraDB RDS for SQL Server instance. The destination instance can be an AnalyticDB for MySQL cluster or an AnalyticDB for PostgreSQL instance.
Note If the value range of the data to be synchronized from the source instance exceeds the range supported by DTS, the accuracy of the data written to the destination instance will decrease.
CategoryData type of SQL ServerValue rangeData type of AnalyticDB for MySQL Data type of AnalyticDB for PostgreSQL
IntegerBITAn INTEGER data type that can take a value of 1, 0, or NULLBOOLEANBIT(1)
TINYINT0 to 255TINYINTSMALLINT
SMALLINT-32,768 (-2^15) to 32,767 (2^15 - 1)SMALLINTSMALLINT
INT-2,147,483,648 (-2^31) to 2,147,483,647 (2^31 - 1)INTEGERINTEGER
BIGINT-9,223,372,036,854,775,808 (-2^63) to 9,223,372,036,854,775,807 (2^63 - 1)BIGINTBIGINT
DecimalNUMERIC[ (p[ ,s] )]-10^38 + 1 to 10^38 - 1 (1 <= p <= 38)DECIMALDECIMAL
DECIMAL[ (p[ ,s] )]-10^38 + 1 to 10^38 - 1 (1 <= p <= 38)DECIMALDECIMAL
FLOAT-1.79E + 308 to -2.23E - 308, 0, and 2.23E - 308 to 1.79E + 308DOUBLEDOUBLE PRECISION
REAL-3.40E + 38 to -1.18E - 38, 0, and 1.18E - 38 to 3.40E + 38FLOATREAL
MonetaryMONEY-922,337,203,685,477.5808 to 922,337,203,685,477.5807DECIMAL(19, 4)DECIMAL(19, 4)
SMALLMONEY-214,748.3648 to 214,748.3647DECIMAL(10, 4)DECIMAL(10, 4)
Date and timeDATE0001-01-01 to 9999-12-31DATEDATE
DATETIMEDate range: January 1, 1753 to December 31, 9999
Time range: 00:00:00 to 23:59:59.997
DATETIMETIMESTAMP(3) WITHOUT TIME ZONE
DATETIME2[ (fractional seconds precision) ]Date range: January 1,1 CE to December 31, 9999 CE
Time range: 00:00:00 to 23:59:59.9999999
DATETIMETIMESTAMP(7) WITHOUT TIME ZONE
DATETIMEOFFSET [ (fractional seconds precision) ]Date range: January 1, 1 CE to December 31, 9999 CE
Time range: 00:00:00 to 23:59:59.9999999
Time zone offset range: -14:00 to +14:00
TIMESTAMPTIMESTAMP(7) WITH TIME ZONE
SMALLDATETIMEThe time is based on a 24-hour day, with seconds always zero (:00) and without fractional seconds.DATETIMETIMESTAMP WITHOUT TIME ZONE
TIME [ (fractional second scale) ]00:00:00.0000000 to 23:59:59.9999999TIMETIME(7) WITH TIME ZONE
StringBINARY [ ( n ) ]Valid values of n: 1 to 8,000.VARBINARYBYTEA
VARBINARY [ ( n | max) ]Valid values of n: 1 to 8,000. max indicates that the maximum storage size is 2^31 - 1 bytes.VARBINARYBYTEA
CHAR [ ( n ) ]Valid values of n: 1 to 8,000. The storage size is n bytes.VARCHARCHARACTER
VARCHAR [ ( n | max ) ]Valid values of n: 1 to 8,000. max indicates that the maximum storage size is 2^31 - 1 bytes (2 GB).VARCHARCHARACTER
NCHAR [ ( n ) ]n defines the string size in byte-pairs. Valid values of n: 1 to 4,000. The storage size is two times n bytes.VARCHARCHARACTER VARYING
NVARCHAR [ ( n | max ) ]n defines the string size in byte-pairs. Valid values of n: 1 to 1 to 4,000. max indicates that the maximum storage size is 2^30 - 1 characters (2 GB).VARCHARCHARACTER VARYING
NTEXTVariable-length Unicode data with a maximum string length of 1,073,741,823 (2^30 - 1) bytes.VARCHARTEXT
TEXTThe maximum string length is 2,147,483,647 (2^31 - 1) bytes.VARCHARTEXT
IMAGEVariable-length binary data from 0 to 2,147,483,647 (2^31 - 1) bytes. VARBINARYBYTEA
Spatial (geography and geometry)GEOGRAPHYN/AVARCHARNot supported
GEOMETRYN/AVARCHARNot supported
XMLXML ( [ CONTENT | DOCUMENT ] xml_schema_collection )N/AVARCHARXML
OthersUNIQUEIDENTIFIERN/AVARCHARCHARACTER(36)
SQL_VARIANTN/ANot supportedNot supported
HIERARCHYIDN/ANot supportedNot supported
SYSNAMEN/AVARCHARCHARACTER VARYING(128)

Synchronize data from a Db2 for LUW database

The following table lists the data type mappings between a Db2 for LUW database and a MySQL database.
Note If the value range of the data to be synchronized from the source instance exceeds the range supported by DTS, the accuracy of the data written to the destination instance will decrease.
CategoryData type of Db2 for LUWValue rangeData type of MySQL
IntegerSMALLINT-32,768~+32,767SMALLINT
INTEGER-2,147,483,648~+2,147,483,647INT
BIGINT-9,223,372,036,854,775,808~ +9,223,372,036,854,775,807BIGINT
DecimalDECIMAL(precision-integer, scale-integer)p<=38DECIMAL
FLOAT(integer)The value range is 1 to 53. If the integer is between 1 and 24 inclusive, the format is single precision floating-point. If the integer is between 25 and 53 inclusive, the format is double precision floating-point.FLOAT
DECFLOAT(precision-integer)N/ADECIMAL(65,10)
Date and timeDATE0001-01-01~9999-12-31DATE
TIME00:00:00~24:00:00TIME
TIMESTAMP(integer)0001-01-01-00.00.00.000000000000~9999-12-31-24.00.00.000000000000;0<=p<= 12DATETIME
StringCHARACTER(integer)254CHAR | VARCHAR
VARCHAR(integer)32,672VARCHAR
CHARACTER(integer) FOR BIT DATA254BLOB
CLOB2,147,483,647LONGTEXT
GRAPHIC(integer)127CHAR(length*4)
VARGRAPHIC(integer)16,336CHAR(length*4)
DBCLOB(integer)1,073,741,823VARCHAR | LONGTEXT
BLOB2,147,483,647LONGBLOB
OthersXML2,147,483,647VARCHAR | LONGTEXT

Synchronize data from a Db2 for i database

The following table lists the data type mappings between a Db2 for i database and a MySQL database.
Note If the value range of the data to be synchronized from the source instance exceeds the range supported by DTS, the accuracy of the data written to the destination instance will decrease.
CategoryData type of Db2 for iValue rangeData type of MySQL
IntegerSMALLINT-32,768~+32,767SMALLINT
INTEGER-2,147,483,648~+2,147,483,647INT
BIGINT-9,223,372,036,854,775,808~ +9,223,372,036,854,775,807BIGINT
DecimalDECIMAL(precision-integer, scale-integer)p<=63DECIMAL
NUMERICN/ADECIMAL
FLOAT(integer)N/AFLOAT
DECFLOAT(precision-integer)N/ADECIMAL(65,10)
Date and timeDATE0001-01-0~9999-12-31DATE
TIME00:00:00~24:00:00TIME
TIMESTAMP(integer)0001-01-01-00.00.00.000000000000 to 9999-12-31-24.00.00.000000000000 (0 <= p <= 12)DATETIME
StringCHAR(integer)32,765CHAR | VARCHAR
VARCHAR(integer)32,739VARCHAR
CHAR(integer) FOR BIT DATAN/ABLOB
CLOB2,147,483,647LONGTEXT
GRAPHIC(integer)16,382CHAR
VARGRAPHIC(integer)16,369VARCHAR
DBCLOB(integer)1,073,741,823LONGTEXT
BINARY32,765BINARY
VARBIN32,739VARBINARY
BLOB2,147,483,647LONGBLOB
OthersDATALINKN/AVARCHAR | LONGTEXT
ROWID40VARCHAR | LONGTEXT
XML2,147,483,647VARCHAR | LONGTEXT