Skip to content

Commit 0892da7

Browse files
Merge pull request #303413 from Lucky-Wang16/0728-Update_MariaDB_MySQL_data_types
Update MariaDB and MySQL data type mapping
2 parents 1d7ebf9 + cb8dcfc commit 0892da7

File tree

2 files changed

+102
-90
lines changed

2 files changed

+102
-90
lines changed

articles/data-factory/connector-mariadb.md

Lines changed: 51 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: jianleishen
66
ms.subservice: data-movement
77
ms.custom: synapse
88
ms.topic: conceptual
9-
ms.date: 04/14/2025
9+
ms.date: 07/28/2025
1010
ms.author: jianleishen
1111
---
1212

@@ -249,47 +249,47 @@ When copying data from MariaDB, the following mappings are used from MariaDB dat
249249

250250
| MariaDB data type | Interim service data type (for version 2.0) | Interim service data type (for version 1.0) |
251251
|:--- |:--- |:--- |
252-
| `bigint` |`Int64` |`Int64` |
253-
| `bigint unsigned` |`Decimal` |`Decimal` |
254-
| `bit(1)` |`UInt64` |`Boolean` |
255-
| `bit(M), M>1`|`UInt64`|`Byte[]`|
256-
| `blob` |`Byte[]` |`Byte[]` |
257-
| `bool` |`Boolean` <br/>(If TreatTinyAsBoolean=false, it is mapped as `SByte`. TreatTinyAsBoolean is true by default ) |`Int16` |
258-
| `char` |`String` |`String` |
259-
| `date` |`Datetime` |`Datetime` |
260-
| `datetime` |`Datetime` |`Datetime` |
261-
| `decimal` |`Decimal` |`Decimal, String` |
262-
| `double` |`Double` |`Double` |
263-
| `double precision` |`Double` |`Double` |
264-
| `enum` |`String` |`String` |
265-
| `float` |`Single` |`Single` |
266-
| `int` |`Int32` |`Int32` |
267-
| `int unsigned` |`Int64`|`Int64`|
268-
| `integer` |`Int32` |`Int32` |
269-
| `integer unsigned` |`Int64` |`Int64` |
270-
| `JSON` |`String` |-|
271-
| `long varbinary` |`Byte[]` |`Byte[]` |
272-
| `long varchar` |`String` |`String` |
273-
| `longblob` |`Byte[]` |`Byte[]` |
274-
| `longtext` |`String` |`String` |
275-
| `mediumblob` |`Byte[]` |`Byte[]` |
276-
| `mediumint` |`Int32` |`Int32` |
277-
| `mediumint unsigned` |`Int64` |`Int64` |
278-
| `mediumtext` |`String` |`String` |
279-
| `numeric` |`Decimal` |`Decimal` |
280-
| `real` |`Double` |`Double` |
281-
| `set` |`String` |`String` |
282-
| `smallint` |`Int16` |`Int16` |
283-
| `smallint unsigned` |`Int32` |`Int32` |
284-
| `text` |`String` |`String` |
285-
| `time` |`TimeSpan` |`TimeSpan` |
286-
| `timestamp` |`Datetime` |`Datetime` |
287-
| `tinyblob` |`Byte[]` |`Byte[]` |
288-
| `tinyint` |`SByte` |`Int16` |
289-
| `tinyint unsigned` |`Int16` |`Int16` |
290-
| `tinytext` |`String` |`String` |
291-
| `varchar` |`String` |`String` |
292-
| `year` |`Int` |`Int` |
252+
| BIGINT | Int64 | Int64 |
253+
| BIGINT UNSIGNED | UInt64 | Decimal |
254+
| BIT(1) | UInt64 | Boolean |
255+
| BIT(M), M>1 | UInt64 | Byte[] |
256+
| BLOB |Byte[] |Byte[] |
257+
| BOOL |Boolean <br/>(If TreatTinyAsBoolean=false, it is mapped as SByte. TreatTinyAsBoolean is true by default) | Int16 |
258+
| CHAR | String | String |
259+
| DATE | Datetime | Datetime |
260+
| DATETIME | Datetime | Datetime |
261+
| DECIMAL | Decimal | Decimal, String |
262+
| DOUBLE | Double | Double |
263+
| DOUBLE PRECISION | Double | Double |
264+
| ENUM | String | String |
265+
| FLOAT | Single | Single |
266+
| INT | Int32 | Int32 |
267+
| INT UNSIGNED | Int64 | Int64 |
268+
| INTEGER | Int32 | Int32 |
269+
| INTEGER UNSIGNED | UInt32 | Int64 |
270+
| JSON |String |Byte[]|
271+
| LONG VARBINARY | Byte[] | Byte[] |
272+
| LONG VARCHAR | String | String |
273+
| LONGBLOB |Byte[] |Byte[] |
274+
| LONGTEXT |String | String |
275+
| MEDIUMBLOB |Byte[] | Byte[] |
276+
| MEDIUMINT |Int32 | Int32 |
277+
| MEDIUMINT UNSIGNED |UInt32 |Int64 |
278+
| MEDIUMTEXT |String |String |
279+
| NUMERIC |Decimal |Decimal |
280+
| REAL |Double |Double |
281+
| SET |String |String |
282+
| SMALLINT |Int16 |Int16 |
283+
| SMALLINT UNSIGNED | UInt16 |Int32 |
284+
| TEXT |String |String |
285+
| TIME |TimeSpan |TimeSpan |
286+
| TIMESTAMP |Datetime |Datetime |
287+
| TINYBLOB |Byte[] |Byte[] |
288+
| TINYINT |SByte | Int16 |
289+
| TINYINT unsigned |Int16 | Int16 |
290+
| TINYTEXT | String | String |
291+
| VARCHAR | String | String |
292+
| YEAR | Int | Int |
293293

294294
## Lookup activity properties
295295

@@ -311,10 +311,16 @@ The table below shows the data type mapping differences between MariaDB version
311311

312312
|MariaDB data type |Interim service data type (using version 2.0) |Interim service data type (using version 1.0)|
313313
|:---|:---|:---|
314-
|bit(1)| UInt64|Boolean|
315-
|bit(M), M>1|UInt64|Byte[]|
316-
|bool|Boolean|Int16|
314+
|BIGINT UNSIGNED|UInt64|Decimal|
315+
|BIT(1)| UInt64|Boolean|
316+
|BIT(M), M>1|UInt64|Byte[]|
317+
|BOOL|Boolean|Int16|
318+
|DECIMAL | Decimal | Decimal, String |
319+
|INTEGER UNSIGNED |UInt32|Int64|
317320
|JSON|String|Byte[]|
321+
|MEDIUMINT UNSIGNED |UInt32|Int64|
322+
|SMALLINT UNSIGNED |UInt16|Int32|
323+
|TINYINT |SByte| Int16|
318324

319325
## Related content
320326

articles/data-factory/connector-mysql.md

Lines changed: 51 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: jianleishen
66
ms.subservice: data-movement
77
ms.custom: synapse
88
ms.topic: conceptual
9-
ms.date: 04/14/2025
9+
ms.date: 07/28/2025
1010
ms.author: jianleishen
1111
---
1212

@@ -277,47 +277,47 @@ When copying data from MySQL, the following mappings are used from MySQL data ty
277277

278278
| MySQL data type | Interim service data type (for version 2.0)| Interim service data type (for version 1.0) |
279279
|:--- |:--- |:--- |
280-
| `bigint` |`Int64` |`Int64` |
281-
| `bigint unsigned` |`Decimal` |`Decimal` |
282-
| `bit(1)` |`UInt64` |`Boolean` |
283-
| `bit(M), M>1`|`UInt64`|`Byte[]`|
284-
| `blob` |`Byte[]` |`Byte[]` |
285-
| `bool` |`Boolean` <br/>(If TreatTinyAsBoolean=false, it is mapped as `SByte`. TreatTinyAsBoolean is true by default ) |`Int16` |
286-
| `char` |`String` |`String` |
287-
| `date` |`Datetime` |`Datetime` |
288-
| `datetime` |`Datetime` |`Datetime` |
289-
| `decimal` |`Decimal` |`Decimal, String` |
290-
| `double` |`Double` |`Double` |
291-
| `double precision` |`Double` |`Double` |
292-
| `enum` |`String` |`String` |
293-
| `float` |`Single` |`Single` |
294-
| `int` |`Int32` |`Int32` |
295-
| `int unsigned` |`Int64`|`Int64`|
296-
| `integer` |`Int32` |`Int32` |
297-
| `integer unsigned` |`Int64` |`Int64` |
298-
| `JSON` |`String` |-|
299-
| `long varbinary` |`Byte[]` |`Byte[]` |
300-
| `long varchar` |`String` |`String` |
301-
| `longblob` |`Byte[]` |`Byte[]` |
302-
| `longtext` |`String` |`String` |
303-
| `mediumblob` |`Byte[]` |`Byte[]` |
304-
| `mediumint` |`Int32` |`Int32` |
305-
| `mediumint unsigned` |`Int64` |`Int64` |
306-
| `mediumtext` |`String` |`String` |
307-
| `numeric` |`Decimal` |`Decimal` |
308-
| `real` |`Double` |`Double` |
309-
| `set` |`String` |`String` |
310-
| `smallint` |`Int16` |`Int16` |
311-
| `smallint unsigned` |`Int32` |`Int32` |
312-
| `text` |`String` |`String` |
313-
| `time` |`TimeSpan` |`TimeSpan` |
314-
| `timestamp` |`Datetime` |`Datetime` |
315-
| `tinyblob` |`Byte[]` |`Byte[]` |
316-
| `tinyint` |`SByte` <br/> (`tinyint(1)` is mapped to `Boolean`) |`Int16` |
317-
| `tinyint unsigned` |`Int16` |`Int16` |
318-
| `tinytext` |`String` |`String` |
319-
| `varchar` |`String` |`String` |
320-
| `year` |`Int` |`Int` |
280+
| BIGINT | Int64 | Int64 |
281+
| BIGINT UNSIGNED | UInt64 | Decimal |
282+
| BIT(1) | UInt64 | Boolean |
283+
| BIT(M), M>1 | UInt64 | Byte[] |
284+
| BLOB |Byte[] |Byte[] |
285+
| BOOL |Boolean <br/>(If TreatTinyAsBoolean=false, it is mapped as SByte. TreatTinyAsBoolean is true by default) | Int16 |
286+
| CHAR | String | String |
287+
| DATE | Datetime | Datetime |
288+
| DATETIME | Datetime | Datetime |
289+
| DECIMAL | Decimal | Decimal, String |
290+
| DOUBLE | Double | Double |
291+
| DOUBLE PRECISION | Double | Double |
292+
| ENUM | String | String |
293+
| FLOAT | Single | Single |
294+
| INT | Int32 | Int32 |
295+
| INT UNSIGNED | Int64 | Int64 |
296+
| INTEGER | Int32 | Int32 |
297+
| INTEGER UNSIGNED | UInt32 | Int64 |
298+
| JSON |String |Byte[]|
299+
| LONG VARBINARY | Byte[] | Byte[] |
300+
| LONG VARCHAR | String | String |
301+
| LONGBLOB |Byte[] |Byte[] |
302+
| LONGTEXT |String | String |
303+
| MEDIUMBLOB |Byte[] | Byte[] |
304+
| MEDIUMINT |Int32 | Int32 |
305+
| MEDIUMINT UNSIGNED |UInt32 |Int64 |
306+
| MEDIUMTEXT |String |String |
307+
| NUMERIC |Decimal |Decimal |
308+
| REAL |Double |Double |
309+
| SET |String |String |
310+
| SMALLINT |Int16 |Int16 |
311+
| SMALLINT UNSIGNED | UInt16 |Int32 |
312+
| TEXT |String |String |
313+
| TIME |TimeSpan |TimeSpan |
314+
| TIMESTAMP |Datetime |Datetime |
315+
| TINYBLOB |Byte[] |Byte[] |
316+
| TINYINT |SByte | Int16 |
317+
| TINYINT unsigned |Int16 | Int16 |
318+
| TINYTEXT | String | String |
319+
| VARCHAR | String | String |
320+
| YEAR | Int | Int |
321321

322322
## Lookup activity properties
323323

@@ -351,10 +351,16 @@ The table below shows the data type mapping differences between MySQL using vers
351351

352352
|MySQL data type |Interim service data type (using version 2.0) |Interim service data type (using version 1.0)|
353353
|:---|:---|:---|
354-
|bit(1)| UInt64|Boolean|
355-
|bit(M), M>1|UInt64|Byte[]|
356-
|bool|Boolean|Int16|
354+
|BIGINT UNSIGNED|UInt64|Decimal|
355+
|BIT(1)| UInt64|Boolean|
356+
|BIT(M), M>1|UInt64|Byte[]|
357+
|BOOL|Boolean|Int16|
358+
|DECIMAL | Decimal | Decimal, String |
359+
|INTEGER UNSIGNED |UInt32|Int64|
357360
|JSON|String|Byte[]|
361+
|MEDIUMINT UNSIGNED |UInt32|Int64|
362+
|SMALLINT UNSIGNED |UInt16|Int32|
363+
|TINYINT |SByte| Int16|
358364

359365
## Related content
360366

0 commit comments

Comments
 (0)