SQL Server

SQL Server's Change Data Capture (CDC) through capture tables enables reliable, low impact change capture for data integration. Supermetal builds on this foundation to deliver efficient data extraction and replication with minimal source database overhead.

This guide covers features and configuration steps required to connect SQL Server with Supermetal, focusing on CDC setup and permissions.


Features

FeatureNotes
Initial Data Sync

Change Data Capture

CDC Processing Modes

Configurable CDC Processing

Catalog Support


Prerequisites

Before you begin, ensure you have:

  • SQL Server Requirements:

    • Version: SQL Server 2016 or higher
    • Supported Editions:
      • Standard SQL Server (Enterprise, Standard, Personal, Azure SQL Managed Instance)
      • Azure SQL Database
      • Amazon RDS for SQL Server

    Unsupported SQL Server Editions

    CDC is not supported on Azure Synapse, Azure SQL Edge, or Azure Synapse Serverless.

  • Setup Requirements:

    • Database Permissions: Varies by replication type (see Setup for role-specific instructions)
    • Network Connectivity: Ensure Supermetal can reach your SQL Server (default port: 1433)

Setup

Supermetal supports two replication types for SQL Server sources:

  • Snapshot: One-time or periodic full table snapshots.
  • Capture Table Replication: Real-time change data capture (CDC) with initial snapshot.


Data Types Mapping

SQL Server Type(s)Apache Arrow DataTypeNotes
TINYINTUInt8
SMALLINTInt16
INTInt32
BIGINTInt64
SMALLMONEYDecimal128(10, 4)Fixed precision with 4 decimal places.
MONEYDecimal128(19, 4)Fixed precision with 4 decimal places.
DECIMAL(p,s)Decimal128(p, s) / Decimal256(p, s)Uses SQL Server precision and scale directly. Decimal256 for precision > 38.
NUMERIC(p,s)Decimal128(p, s) / Decimal256(p, s)Same as DECIMAL. Default precision is 18.
REALFloat64
FLOATFloat64
SQL Server Type(s)Apache Arrow DataTypeNotes
BITBoolean
SQL Server Type(s)Apache Arrow DataTypeNotes
DATEDate32Days since UNIX epoch.
TIMETime64(ns)Nanoseconds since midnight.
SMALLDATETIMETimestamp(s)Second-level precision, minute-level accuracy (rounds to nearest minute).
DATETIMETimestamp(ms)Millisecond precision, 3.33ms accuracy.
DATETIME2(0)Timestamp(s)Second precision.
DATETIME2(1-3)Timestamp(ms)Millisecond precision (1-3 fractional digits).
DATETIME2(4-6)Timestamp(μs)Microsecond precision (4-6 fractional digits).
DATETIME2(7)Utf8Mapped to string to preserve full range (years 1-9999).
DATETIMEOFFSET(0)Timestamp(s, "UTC")Second precision, normalized to UTC.
DATETIMEOFFSET(1-3)Timestamp(ms, "UTC")Millisecond precision (1-3 fractional digits), normalized to UTC.
DATETIMEOFFSET(4-6)Timestamp(μs, "UTC")Microsecond precision (4-6 fractional digits), normalized to UTC.
DATETIMEOFFSET(7)Utf8Mapped to string to preserve full range (years 0001-9999).
SQL Server Type(s)Apache Arrow DataTypeNotes
CHAR, VARCHARUtf8
NCHAR, NVARCHARUtf8Unicode character strings.
TEXTUtf8Legacy large text type (deprecated). Use VARCHAR(MAX) instead.
NTEXTUtf8Legacy large Unicode text type (deprecated). Use NVARCHAR(MAX) instead.
UNIQUEIDENTIFIERUtf8UUID/GUID represented as a string.
SQL Server Type(s)Apache Arrow DataTypeNotes
BINARY, VARBINARYBinary
ROWVERSIONBinaryAutomatically incremented binary identifier. See rowversion.
IMAGEBinaryLegacy large binary type (deprecated). Use VARBINARY(MAX) instead.
SQL Server Type(s)Apache Arrow DataType
XMLUtf8
GEOGRAPHYUnsupported
GEOMETRYUnsupported
HIERARCHYIDUnsupported

Last updated on

On this page