SQL Server backup files → Parquet
Datatypes conversion mapping when exporting a table from a SQL Server full backup (.bak) using the ArpeMSBackup ADBC driver (--connectiontype backup_mssql) to Parquet format.
Platform availability
backup_mssql is available on Windows x64 and Linux x64 only. It is not supported on Linux ARM64.
Compared with
adbc_mssqlThe mapping is the one of adbc_mssql, with the same values, except for two of its defaults:
time(7),datetime2(7),datetimeoffset(7):backup_mssqlkeeps the 100 ns resolution (nanosecond unit);adbc_mssqlwrites microseconds by default.geography,geometry:backup_mssqlwrites the SQL Server binary serialization (asadbc_mssqlwithadbc.arpemssql.geospatial=varbinary);adbc_mssqlconverts them to WKB with GeoParquet metadata by default.
| Source | SQL Server backup file (backup_mssql) |
| Format | Parquet |
| FastBCP | 1.5.0.0 |
| Test Status | OK (31/31 Nullable) |
Parquet Schema: testdatatypes_nullable
| name | physical_type | converted_type | logical_type |
|---|---|---|---|
| col_bigint | INT64 | — | — |
| col_int | INT32 | — | — |
| col_smallint | INT32 | INT_16 | IntType(bitWidth=16, isSigned=1) |
| col_tinyint | INT32 | UINT_8 | IntType(bitWidth=8, isSigned=0) |
| col_bit | BOOLEAN | — | — |
| col_decimal | FIXED_LEN_BYTE_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) |
| col_numeric | FIXED_LEN_BYTE_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) |
| col_money | FIXED_LEN_BYTE_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) |
| col_smallmoney | FIXED_LEN_BYTE_ARRAY | DECIMAL | DecimalType(scale=4, precision=10) |
| col_float | DOUBLE | — | — |
| col_real | FLOAT | — | — |
| col_date | INT32 | DATE | DateType() |
| col_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=NANOS) |
| col_datetime | INT64 | TIMESTAMP_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) |
| col_datetime2 | INT64 | — | TimestampType(isAdjustedToUTC=0, unit=NANOS) |
| col_datetimeoffset | INT64 | — | TimestampType(isAdjustedToUTC=1, unit=NANOS) |
| col_smalldatetime | INT64 | TIMESTAMP_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) |
| col_char | BYTE_ARRAY | UTF8 | StringType() |
| col_varchar | BYTE_ARRAY | UTF8 | StringType() |
| col_nchar | BYTE_ARRAY | UTF8 | StringType() |
| col_nvarchar | BYTE_ARRAY | UTF8 | StringType() |
| col_text | BYTE_ARRAY | UTF8 | StringType() |
| col_ntext | BYTE_ARRAY | UTF8 | StringType() |
| col_binary | BYTE_ARRAY | — | — |
| col_varbinary | BYTE_ARRAY | — | — |
| col_image | BYTE_ARRAY | — | — |
| col_uniqueidentifier | BYTE_ARRAY | UTF8 | StringType() |
| col_xml | BYTE_ARRAY | UTF8 | StringType() |
| col_geography | BYTE_ARRAY | — | — |
| col_geometry | BYTE_ARRAY | — | — |
| col_sql_variant | BYTE_ARRAY | UTF8 | StringType() |
Notes
datetimeoffsetis exported as a UTC instant (isAdjustedToUTC=1); the original offset is not kept.timeanddatetime2keep their 7 decimal digits (nanosecond unit, the last two digits always zero).uniqueidentifieris written in lowercase (b85ed2b1-24f5-4b71-8d1a-6d1e4e3f0c11), likeadbc_mssql.- Strings are converted to UTF-8 from the column's collation code page (
char,varchar,text) or from UTF-16 (nchar,nvarchar,ntext); UTF-8 collations (SQL Server 2019+) are read as they are. xmlis decoded from the binary XML stored in the backup to text.geography,geometryandhierarchyid(CLR types) are exported as their binary serialization.sql_variantis exported as text (CAST(value AS nvarchar); ISO 8601 for dates,0x…for binary values).