MySQL connector reference

Important

The MySQL connector is in Public Preview. Contact your Azure Databricks account team to request access.

Find reference material for the MySQL connector in Lakeflow Connect, including data type mappings and DDL operation handling.

Data type mappings

Azure Databricks automatically transforms MySQL data types into Delta-compatible data types. The following table shows how MySQL types map to Delta types:

MySQL type Delta type
TINYINT SMALLINT
TINYINT UNSIGNED SMALLINT
SMALLINT SMALLINT
SMALLINT UNSIGNED INTEGER
MEDIUMINT INT
MEDIUMINT UNSIGNED INT
INT INT
INT UNSIGNED LONG
BIGINT BIGINT
BIGINT UNSIGNED DECIMAL(20,0)
DECIMAL/NUMERIC(p,s) If precision and scale is less than or equal to 38 DECIMAL(p,s)
DECIMAL/NUMERIC If precision and scale is greater than 38 STRING
DOUBLE DOUBLE
FLOAT FLOAT
BIT(N) BINARY
BIT(1) BOOLEAN
BOOL SMALLINT
DATE DATE
DATETIME STRING
TIME STRING
TIMESTAMP TIMESTAMP
YEAR STRING
BINARY BINARY
CHAR STRING
BLOB BINARY
LONGBLOB BINARY
LONGTEXT STRING
MEDIUMBLOB BINARY
MEDIUMTEXT STRING
TINYBLOB BINARY
TINYTEXT STRING
VARBINARY BINARY
VARCHAR STRING
JSON STRING
ENUM STRING
SET STRING
TEXT STRING
GEOMETRY NOT SUPPORTED
GEOMETRYCOLLECTION NOT SUPPORTED
LINESTRING NOT SUPPORTED
MULTILINESTRING NOT SUPPORTED
MULTIPOINT NOT SUPPORTED
MULTIPOLYGON NOT SUPPORTED

Slowly changing dimensions (SCD)

The MySQL connector supports both SCD Type 1 and SCD Type 2:

  • SCD Type 1: Only the latest version of each row is maintained. Updates overwrite previous values.
  • SCD Type 2: All versions of each row are maintained with start and end timestamps.

For more information, see Enable history tracking (SCD type 2).