Azure Synapse Analytics Destination
Azure’s Azure Synapse Analytics, previously known as Azure SQL Data Warehouse, is a limitless analytics service that brings together enterprise data warehousing and Big Data analytics.
Complete the following prerequisites in Microsoft Azure before connecting your Azure Synapse Analytics databases to Segment:
- Sign up for an Azure subscription.
- Provision a Dedicated SQL Pool.
Connect your Azure database to Segment
To connect your Azure database to Segment, give Segment access to your SQL Data Warehouse and configure an Azure Synapse Analytics destination.
Give Segment access to your SQL Data Warehouse
- Create a server login for Segment to use. This can be accomplished by running the following SQL command on your SQL Server’s
CREATE LOGIN Segment WITH PASSWORD = '<strong password>';
Connect to your Azure database.
- Segment uses Azure Blob Storage to hold data that is being loaded into Azure Synapse Analytics. In order to facilitate this, a
MASTER KEYis needed in order for credentials that Segment saves to the database to be encrypted. To create a master key, run the following command:
CREATE MASTER KEY;
If you are using your Azure Synapse Analytics instance for more than just a Segment integration, it is possible you already have a master key. Running the command more than once will not create a new master key.
- Create a new database user using the server login that you created in a previous step:
CREATE USER Segment FOR LOGIN Segment;
- Run the following command to give your new user the permissions to load data and manage the resources in your database:
GRANT CONTROL TO Segment;
- Assign this new user a resource allocation class:
EXEC sp_addrolemember 'largerc', 'Segment';
The default resource allocation class (
smallrc) may not give Segment enough memory to perform bulk loads, so Segment recommends starting with
largerc. The larger Dynamic Resource Classes give more memory and allow fewer concurrent queries, which is a better fit for Segment’s loading strategy.
- By default, you cannot connect to Azure Synapse Analytics from the public internet. In order for Segment to connect to your instances, create a server-level firewall rule that allows connections from the Segment IPs:
EXEC sp_set_firewall_rule N'<rule name>', '184.108.40.206', '220.127.116.11';
Configure an Azure Synapse Analytics Destination in Segment
In order to set up the Azure Synapse Analytics destination in Segment, you’ll need the following pieces of information:
- Server Name: the name of the SQL Server resource that houses your SQL Data Warehouse
- Database: the name of the SQL Data Warehouse database resource
- Username: the name of the user you created above
- Password: the password of the user you created above
To add a Azure Synapse Analytics destination in the Segment app:
- Log in to Segment and select the Connections tab. Click Add Destination.
- Select the Storage Destinations tab and click the Azure SQL Data Warehouse destination.
- Select the source(s) you want to sync with the Azure SQL Data Warehouse destination, and click Next.
- Provide a name for your destination, and then enter data into each of the fields in the “Enter your Credentials” section. For the Server Name field, enter only the part of the server name prior to
- Click Connect.
Initial sync timeline
The first sync after you configure your Azure Synapse destination with Segment can take up to 24 hours to complete.
Making sure Segment has enough resources to load your data
The default resource allocation class (
smallrc) may not give Segment enough memory to perform bulk loads, so Segment recommends using a larger class (
largerc). Larger classes allocate more memory and limit the number of concurrent queries, which is a better fit for Segment’s loading strategy.
Using Selective Sync
Users with a Business Tier plan can enable Selective Sync for their Azure Synapse Analytics destination. With Selective Sync, you can customize which collections and properties from a source are sent to each warehouse, which leads to faster, more relevant syncs. To learn more about Selective Sync, review the Warehouse Syncs documentation.
Segment is not able to connect to Azure Synapse Analytics
If you encounter this error, create a server-level firewall rule that allows connections from the Segment IPs.
This page was last modified: 23 May 2022
Questions? Problems? Need more info? Contact Segment Support for assistance!