Supported data types
The following table shows the supported MySQL source data types and their default mapping to Data Movement gateway data types.
When replicating data to a MySQL-based target, the source and target data types are the same, apart from the exceptions described in Homogeneous replication.
For information on how to view the data type that is mapped in the target, see the section for the target connector you are using.
MySQL data types | Data Movement gateway data types |
---|---|
INT |
INT4 |
BIGINT |
INT8 |
MEDIUMINT |
INT4 |
TINYINT |
INT1 |
SMALLINT | INT2 |
UNSIGNED TINYINT | UINT1 |
UNSIGNED SMALLINT | UINT2 |
UNSIGNED MEDIUMINT | UINT4 |
UNSIGNED INT | UINT4 |
UNSIGNED BIGINT | UINT8 |
DECIMAL (10) |
NUMERIC (10,0) |
BINARY |
BYTES (1) |
BIT |
BOOLEAN |
BIT (64) |
BYTES (8) |
BLOB |
BYTES (65535) |
LONGBLOB |
BLOB |
MEDIUMBLOB |
BLOB |
TINYBLOB |
BYTES (255) |
DATE |
DATE |
DATETIME Information note
DATETIME without a parenthetical value is replicated without milliseconds, whereas DATETIME with a value of 1-5 - e.g. DATETIME(5) - is replicated with milliseconds. Information note
When landing a DATETIME column, the time remains the same on the target (i.e. it is not converted to UTC). |
DATETIME |
TIME |
STRING |
TIMESTAMP Information note
When landing a TIMESTAMP column, the time is converted to UTC on the target. |
DATETIME |
YEAR |
INT2 |
DOUBLE |
REAL8 |
FLOAT If the FLOAT values are not in the range specified below, use a transformation to map FLOAT to STRING. For an explanation of how to do this, see Creating rules to transform datasets. Supported FLOAT range: - 1.79E+308 to -2.23E-308, 0 and 2.23E-308 to 1.79E+308 |
REAL (DOUBLE) |
*VARCHAR (45) |
WSTRING (45) |
*VARCHAR (2000) |
WSTRING (2000) |
*VARCHAR (4000) |
WSTRING (4000) |
VARBINARY (4000) |
BYTES (4000) |
VARBINARY (2000) |
BYTES (2000) |
*CHAR |
WSTRING |
*TEXT |
WSTRING (65535) |
*LONGTEXT |
NCLOB |
*MEDIUMTEXT |
NCLOB |
*TINYTEXT |
WSTRING (255) |
GEOMETRY |
BLOB |
POINT |
BLOB |
LINESTRING |
BLOB |
POLYGON |
BLOB |
MULTIPOINT |
BLOB |
MULTILINESTRING |
BLOB |
MULTIPOLYGON |
BLOB |
GEOMETRYCOLLECTION |
BLOB |
ENUM |
WSTRING (Length) Where "Length" is the longest value in the ENUM. |
SET |
WSTRING (Length) Where "Length" is the total of all values in the SET, including commas. |
JSON |
CLOB |
If the DATETIME and TIMESTAMP data types are specified with a “zero” value (i.e. 0000-00-00), you need to make sure that the target database in the landing task supports "zero" values for the DATETIME and TIMESTAMP data types. If they are not supported, you can use a transformation to specify a supported value (e.g. 1970.) Otherwise, they will be recorded as null on the target.