Microsoft SQL Server is a relational database management system that allows you to query across relational, non-relational, structured and unstructured data with the language and platform of your choice.

This guide serves as a reference for version 1 of Stitch’s Microsoft SQL Server destination.


Details and features

Stitch features

High-level details about Stitch’s implementation of Microsoft SQL Server, such as supported connection methods, availability on Stitch plans, etc.

Release status

Beta

Stitch plan availability

All Stitch plans

Stitch supported regions
  • North America (AWS us-east-1)
  • Europe (AWS eu-central-1)

Operating regions determine the location of the resources Stitch uses to process your data. Learn more.

Supported versions
  • Azure SQL Server
  • SQL Server 2019
  • SQL Server 2017
  • SQL Server 2016
  • SQL Server 2014
  • SQL Server 2012

Note: SSL can only be used with versions of Microsoft SQL Server that support TSL 1.2. Check which versions support it in Microsoft’s documentation.

Connect API availability Supported

This version of the Microsoft SQL Server destination can be created and managed using Stitch’s Connect API. Learn more.

SSH connections Supported

Stitch supports using SSH tunnels to connect to Microsoft SQL Server destinations.

SSL connections Supported

Stitch will attempt to use SSL to connect by default. No additional configuration is needed.

VPN connections Unsupported

Virtual Private Network (VPN) connections may be implemented as part of a Premium plan. Contact Stitch Sales for more info.

Static IP addresses Supported

This version of the Microsoft SQL Server destination has static IP addresses that can be whitelisted.

Default loading behavior

Upsert
Note: Append-Only loading will be used if all conditions for Upsert are not met. Learn more.

Nested structure support

Supported
Nested data structures (JSON arrays and objects) will be loaded intact into a NVARCHAR(MAX) column. Learn more.

Destination details

Details about the destination, including object names, table and column limits, reserved keywords, etc.

Note: Exceeding the limits noted below will result in loading errors or rejected data.

Maximum record size

20MB

Table name length

113 characters

Column name length

128 characters

Maximum columns per table

1,024

Maximum table size

None

Maximum tables per database

Limited by total number of objects in a database. The sum of objects cannot exceed 2,147,483,647.

Case sensitivity

Insensitive

Reserved keywords

Refer to the Reserved keywords documentation.


Replication

Replication process overview

A Stitch replication job consists of three stages:

Step 1: Data extraction

Stitch requests and extracts data from a data source. Refer to the System overview guide for a more detailed explanation of the Extraction phase.

Step 2: Preparation

During this phase, the extracted data is buffered in Stitch’s durable, highly available internal data pipeline and readied for loading. Refer to the System overview guide for a more detailed explanation of the Preparation phase.

Step 3: Loading

Stitch loads the data into Microsoft SQL Server.

Loading behavior

By default, Stitch will use Upsert loading when loading data into Microsoft SQL Server.

If the conditions for Upsert loading aren’t met, data will be loaded using Append-Only loading.

Refer to the Understanding loading behavior guide for more info and examples.

Primary Keys

If Primary Keys are specified, Stitch creates a table in which Primary Key columns have a NOT NULL constraint. Errors occur when:

  • Primary Key data types differ between records
  • Primary Key names differ between records
  • The number of Primary Keys differs between records

Incompatible sources

No compatibility issues have been discovered between Microsoft SQL Server and Stitch's integration offerings.

See all destination and integration incompatibilities.


Transformations

System tables and columns

Stitch will create the following tables in each integration’s dataset:

Additionally, Stitch will insert system columns (prepended with _sdc) into each table.

Data typing

Stitch converts data types only where needed to ensure the data is accepted by Microsoft SQL Server. In the table below are the data types Stitch supports for Microsoft SQL Server destinations, and the Stitch types they map to.

  • Stitch type: The Stitch data type the source type was mapped to. During the Extraction and Preparing phases, Stitch identifies the data type in the source and then maps it to a common Stitch data type.
  • Destination type: The destination-compatible data type the Stitch type maps to. This is the data type Stitch will use to store data in Microsoft SQL Server.
  • Notes: Details about the data type and/or its allowed values in the destination, if available. If a range is available, values that exceed the noted range will be rejected by Microsoft SQL Server.
Stitch type Destination type Notes
BIGINT BIGINT
  • Range : -2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807)

BOOLEAN BIT
  • Description: Values are stored as 1 (true), 0 (false), or NULL.

DATE DATETIMEOFFSET
  • Description: Stored in UTC as DATETIMEOFFSET(3)

  • Range : Date: 0001-01-01 through 9999-12-31; Time: 00:00:00 through 23:59:59.999

DOUBLE FLOAT
  • Description: Stored as FLOAT(53)

FLOAT FLOAT
  • Description: Stored as FLOAT(53)

INTEGER INT
  • Range : -2^31 (-2,147,483,648) to 2^31-1 (2,147,483,647)

JSON NVARCHAR
  • Description: Stored as NVARCHAR(MAX)

NUMBER DECIMAL
  • Description: Stored as DECIMAL(38,6)

  • Range : -99999999999999999999999999999999.999999 to 99999999999999999999999999999999.999999

STRING NVARCHAR
  • Description: Stored as NVARCHAR(450) or widened to NVARCHAR(MAX) for larger strings

  • Range : Maximum width is 4,000 bytes NVARCHAR(n) and 2 GB for NVARCHAR(MAX)

JSON structures

When Stitch replicates source data containing objects or arrays, Stitch will load the data intact into a column with the type NVARCHAR(MAX). This is a Microsoft SQL Server data type that can contain semi-structured data like JSON arrays and objects.

You can then use Microsoft SQL Server’s functions for semi-structured data to parse the data. Refer to Microsoft SQL Server’s documentation for more info.

Column names

Column names in Microsoft SQL Server:

Stitch will perform the following transformations to ensure column names adhere to the rules imposed by Microsoft SQL Server:

Transformation Source column Destination column
Remove leading characters which are not a-z, A-Z, 0-9 or _ !customerid customerid
Trim leading and trailing spaces customerid customerid
Replace characters which are not a-z, A-Z, 0-9, _, @, $ or # with an underscore customer-id customer_id
Convert to lowercase CustomerID customerid
Quote reserved words order "order"

Table and schema names

Table and schema names in Microsoft SQL Server:

Stitch will perform the following transformations to ensure table and schema names adhere to the rules imposed by Microsoft SQL Server:

Transformation Source name Destination name
Remove leading characters which are not a-z, A-Z or _. 0-customers customers
Trim leading and trailing spaces customers customers
Replace characters which are not a-z, A-Z, 0-9, _, @, $ or # with an underscore. customers! customers
Convert to lowercase Customers customers
Quote reserved words order "order"

Timezones

Microsoft SQL Server will store the value as DATETIMEOFFSET(3).


Compare destinations

Not sure if Microsoft SQL Server is the destination for you? Check out the Choosing a Stitch Destination guide to compare each of Stitch’s destination offerings.


Questions? Feedback?

Did this article help? If you have questions or feedback, feel free to submit a pull request with your suggestions, open an issue on GitHub, or reach out to us.