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
MEDIUMTEXTTEXT
LONGTEXTTEXTSupported by default up to 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 by default up to 8 MB.
LONGBLOBBINARYSupported by default up to 8 MB.
JSONVARIANTSupported by default up to 16 MB.

Note

For types with default size limits (8 MB / 16 MB) in this table, it is possible to raise these limits. For details, see Oversized values.

Note

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