Openflow Connector for MySQL: Data mapping

Note

This connector is subject to the Snowflake Connector Terms.

This topic describes MySQL data types are mapped to Snowflake data types.

MySQL to Snowflake data type mapping

The following table shows how MySQL data types are mapped to Snowflake data types when replicating data.

MySQL typeSnowflake typeNotes
DECIMAL / NUMERICNUMBERThe maximum number of digits in DECIMAL format for MySQL is 65. For Snowflake, the maximum is 38. Precision is lost when exceeded.
INT / INTEGERINT
TINYINT / BOOLINT
SMALLINTINT
MEDIUMINTINT
BIGINTINT
YEARINT
FLOATFLOAT
DOUBLEFLOAT
VARCHARTEXT
CHARTEXTTrailing spaces aren’t preserved.
TINYTEXTTEXT
TEXTTEXT
MEDIUMTEXTTEXTSupported up to the maximum entry size in Snowflake (16 MB).
LONGTEXTTEXTSupported up to the maximum entry size in Snowflake (16 MB).
ENUMTEXTStored as a string value. For example, for ENUM('one', 'two') the possible values are 'one' and 'two'.
SETTEXTStored as a comma-separated string in column declaration order. For example, for SET('one', 'two') the possible values are '', 'one', 'two', and 'one,two'.
BITTEXTRepresented as a hexadecimal string. For example: '83060c183060c183'.
DATEDATE
DATETIMETIMESTAMP_NTZ
TIMESTAMPTIMESTAMP_TZValues are stored in UTC.
TIMETIME
BINARYBINARY
VARBINARYBINARY
TINYBLOBBINARY
BLOBBINARY
MEDIUMBLOBBINARYSupported up to the maximum entry size in Snowflake (16 MB).
LONGBLOBBINARYSupported up to the maximum entry size in Snowflake (16 MB).
JSONVARIANTSupported up to the maximum entry size in Snowflake (16 MB).

Note

Any MySQL data types not listed in this table are mapped to TEXT by default.