Skip to contentSkip to navigationSkip to topbar
On this page
Looking for more inspiration?Visit the
(information)
You're in the right place! Segment documentation is now part of Twilio Docs. The content you are used to is still here—just in a new home with a refreshed look.

Azure Synapse Analytics Destination


Azure's Azure Synapse Analytics(link takes you to an external page), previously known as Azure SQL Data Warehouse, is a limitless analytics service that brings together enterprise data warehousing and Big Data analytics.

(information)

View observability metrics with Delivery Overview

Delivery Overview, Segment's built-in observability tool, is now in public beta for storage destinations. For more information, see the Delivery Overview documentation.


Getting started

getting-started page anchor

Complete the following prerequisites in Microsoft Azure before connecting your Azure Synapse Analytics databases to Segment:

  1. Sign up for an Azure subscription(link takes you to an external page).
  2. Provision a Dedicated SQL Pool(link takes you to an external page).

Connect your Azure database to Segment

connect-your-azure-database-to-segment page anchor

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

give-segment-access-to-your-sql-data-warehouse page anchor
  1. Create a server login for Segment to use. This can be accomplished by running the following SQL command on your SQL Server's master database:
CREATE LOGIN Segment WITH PASSWORD = '<strong password>';
  1. Connect to your Azure database.
  2. Segment uses Azure Blob Storage to hold data that is being loaded into Azure Synapse Analytics. In order to facilitate this, a MASTER KEY is 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.

  1. Create a new database user using the server login that you created in a previous step:
CREATE USER Segment FOR LOGIN Segment;
  1. 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;
  1. Assign this new user a resource allocation class(link takes you to an external page):
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.

  1. 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(link takes you to an external page) that allows connections from the Segment IPs:
EXEC sp_set_firewall_rule N'<rule name>', '52.25.130.38', '52.25.130.38';

Connect Azure to Segment

connect-azure-to-segment page anchor
(information)

Unified warehouse credentials in public beta

With unified warehouse credientials you can create warehouse credentials and use them across Segment warehouse products. Segment is actively working on this feature. Some functionality may change before it becomes generally available.

To connect Azure to Segment:

  1. Navigate to your product area in the Segment app.
    • For storage destinations, navigate to Connections > Destinations and select the Storage tab. Click + Add storage destination.
    • For Profiles Sync, navigate to Unify > Profiles Sync.
  2. Select Azure as your warehouse.
  3. Select an existing warehouse credential or create a new warehouse credential by completing the following fields for your Azure instance.
    • Server: Your Azure dedicated SQL pool server.
    • Port: The port used for connecting to your Azure dedicated SQL pool. The default port for Azure dedicated SQL pool is 1433, but your port may be different.
    • Database name: The name of your Azure dedicated SQL pool that Segment uses in order to sync data.
    • Username: The Azure user that Segment uses to run SQL in your warehouse.
    • Password: The password of the user above.
  4. Test your connection.
  5. Click Save.

Making sure Segment has enough resources to load your data

making-sure-segment-has-enough-resources-to-load-your-data page anchor

The default resource allocation class(link takes you to an external page) (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.

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 recommends enabling IP allowlists for added security. All Segment users with workspaces hosted in the US who use allowlists in their warehouses must update those allowlists to include the following ranges:

  • 52.25.130.38/32
  • 34.223.203.0/28

Users with workspaces in the EU must allowlist 3.251.148.96/29.


Segment is not able to connect to Azure Synapse Analytics

segment-is-not-able-to-connect-to-azure-synapse-analytics page anchor

If you encounter this error, create a server-level firewall rule(link takes you to an external page) that allows connections from the Segment IPs.

Incorrect server name - no such host

incorrect-server-name---no-such-host page anchor

When setting up Azure warehouse, you might run into this error:

1
An unexpected error occurred
2
failed to connect to Azure SQL: lookup xxx.database.windows.net.database.windows.net: no such host

If you encounter this error, it is possible that you have included .database.windows.net in your server name. For the Server Name field, you only need to enter the part of the server name prior to .database.windows.net.