0


flinksql-mysql数据类型

MySQL typeFlink SQL typeNOTETINYINTTINYINTSMALLINTSMALLINTTINYINT UNSIGNEDINTINTMEDIUMINTSMALLINT UNSIGNEDBIGINTBIGINTINT UNSIGNEDBIGINT UNSIGNEDDECIMAL(20, 0)REALFLOATFLOATDOUBLEDOUBLENUMERIC(p, s)DECIMAL(p, s)DECIMAL(p, s)where p <= 38NUMERIC(p, s)STRINGThe 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 <= 65BOOLEANBOOLEANTINYINT(1)BIT(1)DATEDATETIME [(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)TINYTEXTSTRINGTEXTMEDIUMTEXTLONGTEXTTINYBLOBBYTESCurrently, for BLOB data type in MySQL, only the blob whose length isn't greater than 2,147,483,647(2 ** 31 - 1) is supported.BLOBMEDIUMBLOBLONGBLOBYEARINTENUMSTRINGJSONSTRINGThe JSON data type will be converted into STRING with JSON format in Flink.SETARRAY<STRING>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 stringGEOMETRYSTRINGThe 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.POINTLINESTRINGPOLYGONMULTIPOINTMULTILINESTRINGMULTIPOLYGONGEOMETRYCOLLECTION

标签: flink mysql 大数据

本文转载自: https://blog.csdn.net/liuzhiquan_1025/article/details/127783807
版权归原作者 skeletons321 所有, 如有侵权,请联系我们删除。

“flinksql-mysql数据类型”的评论:

还没有评论