Data Type Mapping
Values flow source native type → DataZen → target GetColumnTypeSQL. Azure SQL Database uses the SQL Server script builder (same mappings). Databricks and Oracle are not included in these tables. Self-mapping is also via DataZen, so a round-trip does not recreate the original native type.
Target cells are the type DataZen emits when creating or sinking a table, based on the DataZen type
produced by the source driver. Sizes such as nvarchar(n) use the source column length when
the driver reports it; max/LOB types use the engine’s unbounded mapping.
1. SQL Server as source
Azure SQL Database is identical. Native types listed from the LIVE covering table plus other types GetColumnTypeSQL accepts from DataZen.
| SQL Server type | DataZen | SQL Server (via DataZen) | Fabric Warehouse | Snowflake | MySQL | Postgres |
|---|---|---|---|---|---|---|
| bigint | Int64 | bigint | bigint | NUMBER(38, 0) | bigint | BIGINT |
| binary(n) | Byte[] | varbinary(n) | varbinary(n) | BINARY(67,108,864) 1 | varbinary(n) / blob 1 | BYTEA 1 |
| bit | Boolean | bit | bit | BOOLEAN | tinyint 2 | BOOLEAN |
| char(n) | String | nvarchar(n) | varchar(2n) 3 | VARCHAR(134217728) 4 | VARCHAR(n) / TEXT | TEXT 5 |
| date | DateTime | datetime2 | datetime2(6) 6 | TIMESTAMP(3) | datetime | TIMESTAMP |
| datetime | DateTime | datetime2 | datetime2(6) 6 | TIMESTAMP(3) | datetime | TIMESTAMP |
| datetime2 | DateTime | datetime2 | datetime2(6) 6 | TIMESTAMP(3) | datetime | TIMESTAMP |
| datetimeoffset | DateTimeOffset | datetimeoffset | datetime2(6) 7 | TIMESTAMP_TZ(3) | datetime(6) 7 | TIMESTAMPTZ |
| decimal(p,s) | Decimal | decimal(p,s) | decimal(p,s) | DECIMAL(p,s) | decimal(p,s) | decimal(p,s) |
| float | Double | float | float | REAL | double | FLOAT |
| image | Byte[] | varbinary(max) | varbinary(max) | BINARY(67108864) 1 | blob 1 | BYTEA 1 |
| int | Int32 | int | int | NUMBER(38, 0) | int | INTEGER |
| money | Decimal | decimal(19,4) 8 | decimal(19,4) 8 | DECIMAL(19,4) 8 | decimal(19,4) 8 | decimal(19,4) 8 |
| nchar(n) | String | nvarchar(n) | varchar(2n) 3 | VARCHAR(134217728) 4 | VARCHAR(n) / TEXT | TEXT 5 |
| ntext | String | nvarchar(max) | varchar(max) | VARCHAR(134217728) 4 | TEXT / LONGTEXT | TEXT |
| numeric(p,s) | Decimal | decimal(p,s) | decimal(p,s) | DECIMAL(p,s) | decimal(p,s) | decimal(p,s) |
| nvarchar(n) | String | nvarchar(n) | varchar(2n) 3 | VARCHAR(134217728) 4 | VARCHAR(n) / TEXT | TEXT |
| nvarchar(max) | String | nvarchar(max) | varchar(max) 3 | VARCHAR(134217728) 4 | TEXT / LONGTEXT | TEXT |
| real | Single | float | real | REAL | double | REAL |
| rowversion / timestamp | Byte[] | varbinary(n) 9 | varbinary(n) 9 | BINARY(67108864) 19 | varbinary(n) / blob 9 | BYTEA 9 |
| smalldatetime | DateTime | datetime2 | datetime2(6) 6 | TIMESTAMP(3) | datetime | TIMESTAMP |
| smallint | Int16 | smallint | smallint | NUMBER(38, 0) | smallint | SMALLINT |
| smallmoney | Decimal | decimal(p,s) | decimal(p,s) | DECIMAL(p,s) | decimal(p,s) | decimal(p,s) |
| text | String | nvarchar(max) | varchar(max) | VARCHAR(134217728) 4 | TEXT / LONGTEXT | TEXT |
| time | TimeSpan | time(7) | time(6) 6 | TIME(9) 10 | time(6) | INTERVAL 10 |
| tinyint | Byte | tinyint | smallint 11 | NUMBER(3, 0) | smallint 11 | SMALLINT |
| uniqueidentifier | Guid | uniqueidentifier | uniqueidentifier | VARCHAR | varchar(36) | TEXT |
| varbinary(n) | Byte[] | varbinary(n) | varbinary(n) | BINARY(67108864) 1 | varbinary(n) / blob | BYTEA 1 |
| varbinary(max) | Byte[] | varbinary(max) | varbinary(max) | BINARY(67108864) 1 | blob | BYTEA |
| varchar(n) | String | nvarchar(n) | varchar(2n) 3 | VARCHAR(134217728) 4 | VARCHAR(n) / TEXT | TEXT |
| varchar(max) | String | nvarchar(max) | varchar(max) | VARCHAR(134217728) 4 | TEXT / LONGTEXT | TEXT |
| xml | String | nvarchar(max) | varchar(max) | VARCHAR(134217728) 4 | TEXT / LONGTEXT | TEXT |
- Binary MERGE/SINK literals: Snowflake wraps Base64 as
TO_BINARY(..., 'BASE64')(NULL must not pass a format argument). Postgres usesdecode(..., 'base64'). MySQL/Fabric emit quoted or X'hex' style literals depending on the builder. - MySQL has no BOOLEAN persist type here;
boolmaps totinyint(0/1). - Fabric does not persist NVARCHAR. Character count is doubled into VARCHAR (UTF-8).
varchar(max)is 16 MB per cell. - Snowflake VARCHAR ignores source length and uses the 128 MB maximum. Unquoted identifiers fold to UPPER CASE.
- Postgres maps all strings to TEXT (PostgreSQL guidance: no performance benefit to VARCHAR(n)).
- Fabric
datetime2andtimeare limited to 6 fractional digits (not 7). - Offset is dropped on Fabric (
CAST(... AS DATETIME2(6))) and MySQL (UTC clock intoDATETIME(6)). - SQL Server MONEY arrives as Decimal with precision 19 / scale 255; builders coerce scale to 4.
- ROWVERSION/TIMESTAMP is not recreated as rowversion on any target; it becomes a byte array. SQL Server omits it from INSERT (engine-generated).
- Time-of-day TimeSpan maps to TIME on SQL Server/Fabric/MySQL/Snowflake. Postgres maps TimeSpan to INTERVAL. Values ≥ 24 hours are not valid TIME.
- DataZen
byteis 0..255. Fabric has no TINYINT; MySQL signed TINYINT is −128..127, so DataZen uses SMALLINT.
2. Azure Fabric Warehouse as source
Persisted Warehouse types only. tinyint, nvarchar, datetime, datetimeoffset, money, xml, and image are not native Fabric types.
| Fabric type | DataZen | SQL Server | Fabric (via DataZen) | Snowflake | MySQL | Postgres |
|---|---|---|---|---|---|---|
| bigint | Int64 | bigint | bigint | NUMBER(38, 0) | bigint | BIGINT |
| binary(n) / varbinary(n) | Byte[] | varbinary(n) | varbinary(n) | BINARY(67108864) 1 | varbinary(n) / blob | BYTEA |
| varbinary(max) | Byte[] | varbinary(max) | varbinary(max) 2 | BINARY(67108864) 1 | blob | BYTEA |
| bit | Boolean | bit | bit | BOOLEAN | tinyint | BOOLEAN |
| char(n) | String | nvarchar(n) | char(2n) / varchar | VARCHAR(134217728) | VARCHAR(n) / TEXT | TEXT |
| date | DateTime | datetime2 | datetime2(6) | TIMESTAMP(3) | datetime | TIMESTAMP |
| datetime2(6) | DateTime | datetime2 | datetime2(6) 3 | TIMESTAMP(3) | datetime | TIMESTAMP |
| decimal(p,s) | Decimal | decimal(p,s) | decimal(p,s) | DECIMAL(p,s) | decimal(p,s) | decimal(p,s) |
| float | Double | float | float | REAL | double | FLOAT |
| int | Int32 | int | int | NUMBER(38, 0) | int | INTEGER |
| real | Single | float | real | REAL | double | REAL |
| smallint | Int16 | smallint | smallint | NUMBER(38, 0) | smallint | SMALLINT |
| time(6) | TimeSpan | time(7) | time(6) 3 | TIME(9) | time(6) | INTERVAL |
| uniqueidentifier | Guid | uniqueidentifier | uniqueidentifier | VARCHAR | varchar(36) | TEXT |
| varchar(n) | String | nvarchar(n) | varchar(2n) | VARCHAR(134217728) | VARCHAR(n) / TEXT | TEXT |
| varchar(max) | String | nvarchar(max) | varchar(max) 2 | VARCHAR(134217728) | TEXT / LONGTEXT | TEXT |
- Same binary literal rules as the SQL Server table (Base64 / decode / blob).
- Warehouse VARCHAR(MAX) / VARBINARY(MAX) cap is 16 MB per cell.
- Fractional seconds max is 6. Writing DateTimeOffset into Fabric always drops the offset.
3. Snowflake as source
Unquoted identifiers are stored UPPER CASE. NUMBER variants all travel as integer/decimal DataZen types; TIMESTAMP_LTZ/TZ become DateTimeOffset.
| Snowflake type | DataZen | SQL Server | Fabric | Snowflake (via DataZen) | MySQL | Postgres |
|---|---|---|---|---|---|---|
| BINARY | Byte[] | varbinary(n/max) | varbinary(n/max) | BINARY(67108864) 1 | blob / varbinary | BYTEA |
| BOOLEAN | Boolean | bit | bit | BOOLEAN | tinyint | BOOLEAN |
| CHAR(n) | String | nvarchar(n) | varchar(2n) | VARCHAR(134217728) 2 | VARCHAR(n) / TEXT | TEXT |
| DATE | DateTime | datetime2 | datetime2(6) | TIMESTAMP(3) | datetime | TIMESTAMP |
| DECIMAL(p,s) | Decimal | decimal(p,s) | decimal(p,s) | DECIMAL(p,s) | decimal(p,s) | decimal(p,s) |
| FLOAT | Double | float | float | REAL | double | FLOAT |
| NUMBER (integer) | Int32 / Int64 / Decimal | int / bigint / decimal | int / bigint / decimal | NUMBER(38, 0) or NUMBER(20, 0) | int / bigint | INTEGER / BIGINT / NUMERIC |
| REAL | Double / Single | float | float / real | REAL | double | FLOAT / REAL |
| TIME | TimeSpan / DateTime | time(7) | time(6) | TIME(9) 3 | time(6) | INTERVAL / TIME |
| TIMESTAMP / TIMESTAMP_NTZ | DateTime | datetime2 | datetime2(6) | TIMESTAMP(3) | datetime | TIMESTAMP |
| TIMESTAMP_LTZ | DateTimeOffset | datetimeoffset | datetime2(6) 4 | TIMESTAMP_TZ(3) 4 | datetime(6) 4 | TIMESTAMPTZ |
| TIMESTAMP_TZ | DateTimeOffset | datetimeoffset | datetime2(6) 4 | TIMESTAMP_TZ(3) | datetime(6) 4 | TIMESTAMPTZ |
| VARIANT | String | nvarchar(max) | varchar(max) | VARCHAR(134217728) 5 | TEXT / LONGTEXT | TEXT |
| VARCHAR | String | nvarchar(n/max) | varchar(n/max) | VARCHAR(134217728) 2 | VARCHAR / TEXT | TEXT |
- SINK MERGE must quote binary as Base64 inside
TO_BINARY.TO_BINARY(NULL, 'BASE64')is invalid; NULL is emitted bare. - Length is not preserved. Table/column names must be UPPER CASE or quoted; temp
@pipelinedata()objects need"@pipelinedata()". - TimeSpan is TIME(9), not TIMESTAMP. A clock string such as
'00:00:01'is invalid as TIMESTAMP. - DateTimeOffset is formatted invariantly with offset (
yyyy-MM-dd HH:mm:ss.fff zzz) and CAST to TIMESTAMP_TZ. Fabric/MySQL drop the zone. - VARIANT is not a DataZen type DataZen recreates; it is stored as text after the connector materializes it.
4. MySQL as source
Connector mappings from MySQLScriptBuilder comments. JSON is read as string. BIT(n>1) is typically Int64, not Boolean.
| MySQL type | DataZen | SQL Server | Fabric | Snowflake | MySQL (via DataZen) | Postgres |
|---|---|---|---|---|---|---|
| bigint | Int64 | bigint | bigint | NUMBER(38, 0) | bigint | BIGINT |
| binary / varbinary | Byte[] | varbinary(n) | varbinary(n) | BINARY(67108864) | varbinary(n) / blob | BYTEA |
| bit(1) | Boolean | bit | bit | BOOLEAN | tinyint | BOOLEAN |
| bit(n) n>1 | Int64 | bigint | bigint | NUMBER(38, 0) | bigint | BIGINT |
| blob / tinyblob / mediumblob / longblob | Byte[] | varbinary(max) | varbinary(max) | BINARY(67108864) 1 | blob | BYTEA |
| char / varchar / text family | String | nvarchar(n/max) | varchar(n/max) | VARCHAR(134217728) | VARCHAR / TEXT / LONGTEXT 2 | TEXT |
| date | DateTime | datetime2 | datetime2(6) | TIMESTAMP(3) | datetime | TIMESTAMP |
| datetime | DateTime | datetime2 | datetime2(6) | TIMESTAMP(3) | datetime | TIMESTAMP |
| decimal / numeric | Decimal | decimal(p,s) | decimal(p,s) | DECIMAL(p,s) | decimal(p,s) | decimal(p,s) |
| double | Double | float | float | REAL | double | FLOAT |
| enum / set | String | nvarchar(n) | varchar(n) | VARCHAR(134217728) | VARCHAR(n) 3 | TEXT |
| float | Single | float | real | REAL | double | REAL |
| int / integer | Int32 | int | int | NUMBER(38, 0) | int | INTEGER |
| json | String | nvarchar(max) | varchar(max) | VARCHAR(134217728) | TEXT / LONGTEXT 4 | TEXT |
| mediumint | Int32 | int | int | NUMBER(38, 0) | int | INTEGER |
| smallint | Int16 | smallint | smallint | NUMBER(38, 0) | smallint | SMALLINT |
| time | TimeSpan | time(7) | time(6) | TIME(9) | time(6) | INTERVAL |
| timestamp | DateTime | datetime2 | datetime2(6) | TIMESTAMP(3) | datetime | TIMESTAMP |
| tinyint (signed) | SByte | smallint | smallint | NUMBER(3, 0) | tinyint | SMALLINT |
| tinyint unsigned | Byte | tinyint | smallint | NUMBER(3, 0) | smallint | SMALLINT |
| year | Int16 | smallint | smallint | NUMBER(38, 0) | smallint 5 | SMALLINT |
- MySQL CAST AS LONGBLOB is not valid in seed/SELECT; blobs travel as Byte[] and are Base64-quoted for Snowflake.
- String length: n < 2000 → VARCHAR(n); 2000..65535 → TEXT; larger or unknown → TEXT/LONGTEXT.
- ENUM/SET are not recreated as ENUM/SET; they become ordinary strings.
- The MySQL builder notes JSON as a source type, but GetColumnTypeSQL does not emit JSON — round-trip is TEXT.
- YEAR is not recreated as YEAR.
5. PostgreSQL as source
Npgsql types. BIT(n) is BitArray (normalized to a 0/1 string for XML/SINK). INTERVAL is TimeSpan.
| Postgres type | DataZen | SQL Server | Fabric | Snowflake | MySQL | Postgres (via DataZen) |
|---|---|---|---|---|---|---|
| bigint | Int64 | bigint | bigint | NUMBER(38, 0) | bigint | BIGINT |
| bit(n) | BitArray | nvarchar / not native 1 | varchar 1 | VARCHAR 1 | VARCHAR / TEXT 1 | TEXT 1 |
| boolean | Boolean | bit | bit | BOOLEAN | tinyint | BOOLEAN |
| bytea | Byte[] | varbinary(n/max) | varbinary(n/max) | BINARY(67108864) | blob | BYTEA 2 |
| char / varchar / text | String | nvarchar(n/max) | varchar(n/max) | VARCHAR(134217728) | VARCHAR / TEXT | TEXT |
| date | DateTime | datetime2 | datetime2(6) | TIMESTAMP(3) | datetime | TIMESTAMP |
| double precision | Double | float | float | REAL | double | FLOAT |
| integer | Int32 | int | int | NUMBER(38, 0) | int | INTEGER |
| interval | TimeSpan | time(7) 3 | time(6) 3 | TIME(9) 3 | time(6) 3 | INTERVAL |
| json / jsonb | String | nvarchar(max) | varchar(max) | VARCHAR(134217728) | TEXT | TEXT 4 |
| money | Decimal | decimal(p,s) | decimal(p,s) | DECIMAL(p,s) | decimal(p,s) | decimal(p,s) |
| numeric(p,s) | Decimal | decimal(p,s) | decimal(p,s) | DECIMAL(p,s) | decimal(p,s) | decimal(p,s) |
| real | Single | float | real | REAL | double | REAL |
| smallint | Int16 | smallint | smallint | NUMBER(38, 0) | smallint | SMALLINT |
| time | TimeSpan | time(7) | time(6) | TIME(9) | time(6) | INTERVAL |
| timetz | DateTimeOffset / TimeSpan | datetimeoffset / time(7) | datetime2(6) / time(6) | TIMESTAMP_TZ(3) / TIME(9) | datetime(6) / time(6) | TIMESTAMPTZ / INTERVAL |
| timestamp | DateTime | datetime2 | datetime2(6) | TIMESTAMP(3) | datetime | TIMESTAMP |
| timestamptz | DateTimeOffset | datetimeoffset | datetime2(6) | TIMESTAMP_TZ(3) | datetime(6) | TIMESTAMPTZ |
| uuid | Guid | uniqueidentifier | uniqueidentifier | VARCHAR | varchar(36) | TEXT 5 |
| xml | String | nvarchar(max) | varchar(max) | VARCHAR(134217728) | TEXT | TEXT |
| xmin | UInt32 / String | bigint / nvarchar | bigint / varchar | NUMBER / VARCHAR | bigint / VARCHAR | NUMERIC / TEXT 6 |
- BIT is kept native on the Postgres source table. BitArray is not XML-serializable; PostgresOperations normalizes cells to a 0/1 string, and SINK wraps as
CAST('…' AS TEXT). GetColumnTypeSQL does not emit BIT. - Byte[] SINK uses
decode('…', 'base64'). - INTERVAL → TimeSpan → TIME on non-Postgres targets; day-long intervals will not fit TIME.
- JSON/JSONB round-trip as TEXT, not json/jsonb.
- UUID round-trip as TEXT, not uuid.
- xmin is a system column (used in HWM/order tests). It is not created by GetColumnTypeSQL; include it only in SELECT lists.
