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 |
Operating regions determine the location of the resources Stitch uses to process your data. Learn more. |
Supported versions |
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 |
Nested structure support |
Supported
|
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 |
|
BOOLEAN | BIT |
|
DATE | DATETIMEOFFSET |
|
DOUBLE | FLOAT |
|
FLOAT | FLOAT |
|
INTEGER | INT |
|
JSON | NVARCHAR |
|
NUMBER | DECIMAL |
|
STRING | NVARCHAR |
|
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.
Related | Troubleshooting |
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.