Mapping Between MySQL and Doris Field Types
DataArts Migration converts the source field type to the destination field type based on the default rule, and creates tables and synchronizes data in real time.
Field Type Mapping Rules
The following table lists the field types supported by a job that migrates data from MySQL to Doris.
Type |
MySQL Data Type |
Doris Data Type |
Description |
---|---|---|---|
String |
CHAR(M) |
CHAR(3M) |
- |
VARCHAR(M) |
VARCHAR(3M) |
- |
|
Value |
BOOLEAN |
BOOL |
- |
TINYINT |
SMALLINT |
By default, TINYINT(1) is converted to BOOLEAN. If you want to keep it as TINYINT(1), add the following attribute to the MySQL data connection in Management Center: tinyInt1isBit is false. |
|
TINYINT UNSIGNED |
SMALLINT |
- |
|
SMALLINT |
SMALLINT |
- |
|
SMALLINT UNSIGNED |
INTEGER |
- |
|
MEDIUMINT |
INTEGER |
- |
|
MEDIUMINT UNSIGNED |
INTEGER |
- |
|
INT |
INTEGER |
- |
|
INT UNSIGNED |
BIGINT |
- |
|
BIGINT |
BIGINT |
- |
|
BIGINT UNSIGNED |
LARGEINT |
- |
|
REAL |
DOUBLE |
- |
|
DECIMAL(M,D) |
DECIMAL(M,D) |
1. If the Doris version is earlier than 1.2.1, when M is greater than 27, the data type is converted to TEXT. When D is greater than 9, the data type is converted to TEXT. 2. If the Doris version is 1.2.1 or later, when M is greater than 38, the data type is converted to TEXT. |
|
NUMERIC(M,D) |
NUMERIC(M,D) |
- |
|
FLOAT(M,D) |
FLOAT |
- |
|
DOUBLE(M,D) |
DOUBLE |
- |
|
DOUBLE PRECISION |
DOUBLE |
- |
|
Bit |
BIT(M) |
BOOL |
- |
Date and time |
DATE |
DATE |
- |
TIME |
TEXT |
- |
|
DATETIME |
DATETIME |
- |
|
TIMESTAMP |
DATETIME |
- |
|
YEAR(M) |
TEXT |
- |
|
Multimedia (binary) |
BINARY(M) |
TEXT |
- |
VARBINARY(M) |
TEXT |
- |
|
TEXT |
TEXT |
- |
|
TINYTEXT |
TEXT |
- |
|
MEDIUMTEXT |
TEXT |
- |
|
LONGTEXT |
TEXT |
- |
|
BLOB |
TEXT |
- |
|
TINYBLOB |
TEXT |
- |
|
MEDIUMBLOB |
TEXT |
- |
|
LONGBLOB |
TEXT |
- |
|
Special type |
SET |
TEXT |
- |
JSON |
JSON |
- |
|
ENUM |
TEXT |
- |
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