flinksql-mysql数据类型

MySQL type Flink SQL type NOTE
TINYINT TINYINT  
SMALLINT SMALLINT  
TINYINT UNSIGNED
INT INT  
MEDIUMINT
SMALLINT UNSIGNED
BIGINT BIGINT  
INT UNSIGNED
BIGINT UNSIGNED DECIMAL(20, 0)  
REAL FLOAT  
FLOAT
DOUBLE DOUBLE  
NUMERIC(p, s) DECIMAL(p, s)  
DECIMAL(p, s)
where p <= 38
NUMERIC(p, s) STRING The precision for DECIMAL data type is up to 65 in MySQL, but the precision for DECIMAL is limited to 38 in Flink. So if you define a decimal column whose precision is greater than 38, you should map it to STRING to avoid precision loss.
DECIMAL(p, s)
where 38 < p <= 65
BOOLEAN BOOLEAN  
TINYINT(1)
BIT(1)
DATE DATE  
TIME [(p)] TIME [(p)]  
TIMESTAMP [(p)] TIMESTAMP [(p)]  
DATETIME [(p)]
CHAR(n) CHAR(n)  
VARCHAR(n) VARCHAR(n)  
BIT(n) BINARY(⌈n/8⌉)  
BINARY(n) BINARY(n)  
VARBINARY(N) VARBINARY(N)  
TINYTEXT STRING  
TEXT
MEDIUMTEXT
LONGTEXT
TINYBLOB BYTES Currently, for BLOB data type in MySQL, only the blob whose length isn't greater than 2,147,483,647(2 ** 31 - 1) is supported.
BLOB
MEDIUMBLOB
LONGBLOB
YEAR INT  
ENUM STRING  
JSON STRING The JSON data type will be converted into STRING with JSON format in Flink.
SET ARRAY As the SET data type in MySQL is a string object that can have zero or more values, it should always be mapped to an array of string
GEOMETRY STRING The spatial data types in MySQL will be converted into STRING with a fixed Json format. Please see MySQL Spatial Data Types Mapping section for more detailed information.
POINT
LINESTRING
POLYGON
MULTIPOINT
MULTILINESTRING
MULTIPOLYGON
GEOMETRYCOLLECTION

你可能感兴趣的:(flink,mysql,大数据)