Validating Data from SQL Server¶
This page covers SQL Server-specific setup for Data validation. For workflow field definitions, see Data validation configuration reference.
Prerequisites¶
- ODBC driver on Worker hosts (same guidance as Migrating Data from SQL Server).
Connectivity¶
Reuse [connections.source.sqlserver] Worker TOML from data migration:
Validation behavior¶
- Datetime precision: SQL Server datetime types can carry sub-microsecond precision (a seventh fractional digit). Validation readback truncates that digit, which can surface as L2/L3 differences on high-precision columns.
- Fixed-width character types: L3 normalization applies
TRIMtoNCHARcolumns when comparing to SnowflakeVARCHARtargets. - UNIQUEIDENTIFIER: Compared as an uppercase string representation in L3.
- Limited L3 coverage:
TEXT,NTEXT,XML, andSQL_VARIANThave no L3 normalization.GEOGRAPHYandGEOMETRYare validated at the schema level only.
Set source_platform: sqlserver in the validation workflow YAML. For partitioning, L3 alignment, and tolerance settings that apply to all platforms, see Data validation configuration reference.
Example workflow excerpt:
Data type mappings¶
| SQL Server type | Snowflake target type | Supported for validation | Notes |
|---|---|---|---|
| BIT, integers, DECIMAL, MONEY, FLOAT, REAL | NUMBER / FLOAT | Yes | |
| DATE, TIME, DATETIME types | DATE / TIME / TIMESTAMP | Yes | Sub-microsecond precision (7th digit) is truncated |
| CHAR, VARCHAR, NCHAR, NVARCHAR | VARCHAR | Yes | |
| BINARY, VARBINARY, UNIQUEIDENTIFIER | BINARY / VARCHAR | Yes | UUID compared as an uppercase string |
| TEXT, NTEXT | VARCHAR | No | Row comparison not supported |
| XML, SQL_VARIANT | VARIANT | No | Schema-level comparison only |
| GEOGRAPHY, GEOMETRY | GEOGRAPHY | No | Schema-level comparison only |
Platform-specific suggestions¶
- Review L2/L3 results on
DATETIME,DATETIME2, andDATETIMEOFFSETcolumns when sub-microsecond precision matters in the source. - For
NCHARcolumns, expect possible whitespace-related L2 drift; L3 appliesTRIMnormalization. - Plan validation depth by type: rely on L1 for
XMLandSQL_VARIANT; treatGEOGRAPHY/GEOMETRYas schema-level only until WKT normalization is available. - Anti-locking: Hints are off by default. On busy source tables, set
queryModifiers.objectModifierto" WITH (NOLOCK)"to avoid blocking on source locks, at the cost of dirty reads that can cause falseMISMATCHresults. See Anti-locking and query modifiers.