Data Type Mapping for Migration from MySQL to DWS
|
MySQL Data Type |
DWS Data Type |
Mapping Supported or Not |
|---|---|---|
|
BIT[(M)] |
BIT |
Yes |
|
TINYINT[(M)] |
SMALLINT |
Yes |
|
TINYINT[(M)] [UNSIGNED] |
SMALLINT |
Yes |
|
SMALLINT[(M)] |
SMALLINT |
Yes |
|
SMALLINT[(M)] [UNSIGNED] |
INTEGER |
Yes |
|
MEDIUMINT[(M)] |
INTEGER |
Yes |
|
MEDIUMINT[(M)][UNSIGNED] |
INTEGER |
Yes |
|
INT[(M)] |
INTEGER |
Yes |
|
INT[(M)] [UNSIGNED] |
BIGINT |
Yes |
|
BIGINT[(M)] |
BIGINT |
Yes |
|
BIGINT[(M)] [UNSIGNED] |
NUMERIC |
Yes |
|
DECIMAL[(M[,D])] |
SMALLINT / INTEGER / BIGINT / NUMERIC Use a data type that meets the precision and scale requirements. |
Yes |
|
FLOAT(p) |
FLOAT4 |
Yes |
|
DOUBLE[(M,D)] |
FLOAT8 |
Yes |
|
DATE |
DATE |
Yes |
|
DATETIME[(fsp)] |
TIMESTAMP |
Yes |
|
TIMESTAMP[(fsp)] |
TIMESTAMP WITH TIME ZONE |
Yes |
|
TIME[(fsp)] |
TIME |
Yes |
|
YEAR[(4)] |
SMALLINT |
Yes |
|
CHAR[(M)] |
CHAR |
Yes |
|
VARCHAR(M) |
CHARACTER VARYING() Expand the character set of the source database column by corresponding times in the destination database. |
Yes |
|
BINARY[(M)] |
BYTEA |
Yes |
|
VARBINARY(M) |
BYTEA |
Yes |
|
TINYBLOB |
BLOB |
Yes |
|
TINYTEXT |
TEXT |
Yes |
|
BLOB |
BLOB |
Yes |
|
TEXT |
TEXT |
Yes |
|
MEDIUMBLOB |
BLOB |
Yes |
|
MEDIUMTEXT |
TEXT |
Yes |
|
LONGBLOB |
BLOB |
Yes |
|
LONGTEXT |
TEXT |
Yes |
|
ENUM |
VARCHAR |
Yes |
|
SET |
VARCHAR |
Yes |
|
JSON |
JSONB |
Yes |
- DATE values supported by MySQL range from '1000-01-01' to '9999-12-31'.
DATETIME values supported by MySQL range from '1000-01-01 00:00:00' to '9999-12-31 23:59:59'.
TIMESTAMP values supported by MySQL range from '1970-01-01 00:00:01' UTC to '2038-01-19 03:14:07' UTC.
For details, see the official MySQL documentation.
- TIME values supported by MySQL range from '-838:59:59' to '838:59:59'. For details, see the official MySQL documentation. For DWS, the minimum value of the TIME type is 00:00:00, and the maximum value is 24:00:00. If the TIME value in MySQL is less than 00:00:00 or greater than 24:00:00, the synchronization task will fail.
- YEAR value ranges supported by MySQL are 1901 to 2155 and 0000. For details, see official MySQL documentation. DWS does not have the YEAR type, so the YEAR type of MySQL will be converted to the SMALLINT type.
- If the DATE value in MySQL is '0000', the synchronization task will fail.
- If the data type of a column is INT and the column contains the AUTO_INCREMENT attribute, the data type of the column will be converted to SERIAL during synchronization.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot