You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/connections/storage/catalog/azuresqldw/index.md
+51-41Lines changed: 51 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,76 +5,86 @@ redirect_from:
5
5
- '/connections/warehouses/catalog/azuresqldw/'
6
6
---
7
7
8
-
Azure's [Azure Synapse Analytics](https://azure.microsoft.com/en-us/services/synapse-analytics/), previously known as Azure SQL Data Warehouse, is a limitless analytics service that brings together enterprise data warehousing and Big Data analytics.
8
+
Azure's [Azure Synapse Analytics](https://azure.microsoft.com/en-us/services/synapse-analytics/){:target="_blank"}, previously known as Azure SQL Data Warehouse, is a limitless analytics service that brings together enterprise data warehousing and Big Data analytics.
9
9
10
10
## Getting Started
11
11
12
-
There are four main steps to get started with Segment:
12
+
Complete the following prerequisites in Microsoft Azure before connecting your Azure Synapse Analytics databases to Segment:
13
13
14
-
1. Have an [Azure subscription](https://azure.microsoft.com/en-us/free/)
15
-
2. Provision [SQL Data Warehouse (Dedicated SQL Pool)](https://docs.microsoft.com/en-us/azure/sql-data-warehouse/create-data-warehouse-portal)
16
-
3. Give Segment access to your SQL Data Warehouse
17
-
4. Configure the Destination in Segment
14
+
1. Sign up for an [Azure subscription](https://azure.microsoft.com/en-us/free/){:target="_blank"}.
15
+
2. Provision a [Dedicated SQL Pool](https://docs.microsoft.com/en-us/azure/sql-data-warehouse/create-data-warehouse-portal){:target="_blank"}.
18
16
19
-
Follow the links above to follow Azure's documentation on setting up these prerequisites. Following that, the guide below should take you through the rest.
17
+
## Connect your Azure database to Segment
20
18
21
-
### Give Segment access to your SQL Data Warehouse
22
-
23
-
First, 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.
24
-
25
-
```sql
26
-
CREATE LOGIN Segment WITH PASSWORD ='<strong password>';
27
-
```
28
-
29
-
Once this is done, no more action is needed for the `master` database. Next, connect to your Azure database in order to do some further configuration.
30
-
31
-
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.
19
+
To connect your Azure database to Segment, [give Segment access to your SQL Data Warehouse](#give-segment-access-to-your-sql-data-warehouse) and [configure an Azure Synapse Analytics destination](#configure-an-azure-synapse-analytics-destination-in-segment).
32
20
33
-
```sql
34
-
CREATE MASTER KEY;
35
-
```
36
-
37
-
**NOTE:** If you are using your Azure Synapse Analytics for things besides Segment, it is possible this is already done. Either way, running the command another time will not hurt anything.
21
+
### Give Segment access to your SQL Data Warehouse
38
22
39
-
Next, create a new database user using the server login that was created previously:
23
+
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:
24
+
```sql
25
+
CREATE LOGIN Segment WITH PASSWORD ='<strong password>';
26
+
```
40
27
41
-
```sql
42
-
CREATEUSERSegment FOR LOGIN Segment;
43
-
```
28
+
2. Connect to your Azure database.
44
29
45
-
This new user will need permissions to load data, and manage the resources it needs. Run the following command to accomplish this:
30
+
3. 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:
31
+
```sql
32
+
CREATE MASTER KEY;
33
+
```
34
+
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.
46
35
47
-
```sql
48
-
GRANT CONTROL TO Segment;
49
-
```
36
+
4. Create a new database user using the server login that you created in a previous step:
37
+
```sql
38
+
CREATEUSERSegment FOR LOGIN Segment;
39
+
```
50
40
51
-
Lastly, assign this new user a [resource allocation class](https://docs.microsoft.com/en-us/azure/sql-data-warehouse/resource-classes-for-workload-management). The default (`smallrc`) likely will not give Segment enough memory to perform bulk loads, so we recommend starting with `largerc`. The larger "Dynamic Resource Classes" give more memory, while allowing fewer concurrent queries, which is a better fit for Segment's loading strategy:
41
+
5. Run the following command to give your new user the permissions to load data and manage the resources in your database:
42
+
```sql
43
+
GRANT CONTROL TO Segment;
44
+
```
52
45
53
-
```sql
54
-
EXEC sp_addrolemember 'largerc', 'Segment';
55
-
```
46
+
6. Assign this new user a [resource allocation class](https://docs.microsoft.com/en-us/azure/sql-data-warehouse/resource-classes-for-workload-management){:target="_blank"}:
47
+
```sql
48
+
EXEC sp_addrolemember 'largerc', 'Segment';
49
+
```
50
+
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.
56
51
57
-
By default, Azure Synapse Analytics cannot be connected to from the public internet. In order for Segment to connect, a [server-level firewall rule](https://docs.microsoft.com/en-us/azure/sql-data-warehouse/create-data-warehouse-portal#create-a-server-level-firewall-rule) that allows connections from the [Segment IPs](/docs/connections/storage/warehouses/faq/#which-ips-should-i-whitelist) is needed.
52
+
7. 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](https://docs.microsoft.com/en-us/azure/sql-data-warehouse/create-data-warehouse-portal#create-a-server-level-firewall-rule){:target="_blank"} that allows connections from the [Segment IPs](/docs/connections/storage/warehouses/faq/#which-ips-should-i-allowlist):
### Configure an Azure SQL Data Warehouse Destination in Segment
57
+
### Configure an Azure Synapse Analytics Destination in Segment
60
58
61
-
In order to set up the necessary destination in Segment, you'll need the following pieces of information:
59
+
In order to set up the Azure Synapse Analytics destination in Segment, you'll need the following pieces of information:
62
60
63
61
-**Server Name:** the name of the SQL Server resource that houses your SQL Data Warehouse
64
62
-**Database:** the name of the SQL Data Warehouse database resource
65
63
-**Username:** the name of the user you created above
66
64
-**Password:** the password of the user you created above
67
65
68
-
All of these fields are required in order for Segment to load data into your SQL Data Warehouse. The username and password can be obtained during steps of the previous section, while the server and database names can be found in the Azure Portal.
66
+
To add a Azure Synapse Analytics destination in the Segment app:
67
+
1. Log in to Segment and select the **Connections** tab. Click **Add Destination**.
68
+
2. Select the **Storage Destinations** tab and click the **Azure SQL Data Warehouse** destination.
69
+
3. Select the source(s) you want to sync with the Azure SQL Data Warehouse destination, and click **Next**.
70
+
4. 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 `.database.windows.net`.
71
+
5. Click **Connect**.
72
+
73
+
> warning "Initial sync timeline"
74
+
> The first sync after you configure your Azure Synapse destination with Segment can take up to 24 hours to complete.
69
75
70
76
## Best Practices
71
77
72
78
### Making sure Segment has enough resources to load your data
73
79
74
-
The default [resource allocation class](https://docs.microsoft.com/en-us/azure/sql-data-warehouse/resource-classes-for-workload-management) (ie: `smallrc`) likely will not give Segment enough memory to perform bulk loads, so we recommend using a larger class (eg: `largerc`). Larger classes allocate more memory, but limit the number of concurrent queries, which is a better fit for Segment's loading strategy.
80
+
The default [resource allocation class](https://docs.microsoft.com/en-us/azure/sql-data-warehouse/resource-classes-for-workload-management){:target="_blank"} (`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.
81
+
82
+
### Using Selective Sync
83
+
84
+
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](/docs/connections/storage/warehouses/warehouse-syncs/#warehouse-selective-sync) documentation.
75
85
76
86
## Troubleshooting
77
87
78
88
### Segment is not able to connect to Azure Synapse Analytics
79
89
80
-
Make sure a [server-level firewall rule](https://docs.microsoft.com/en-us/azure/sql-data-warehouse/create-data-warehouse-portal#create-a-server-level-firewall-rule) that allows connections from the [Segment IPs](/docs/connections/storage/warehouses/faq/#which-ips-should-i-whitelist) is configured.
90
+
If you encounter this error, create a [server-level firewall rule](https://docs.microsoft.com/en-us/azure/sql-data-warehouse/create-data-warehouse-portal#create-a-server-level-firewall-rule){:target="_blank"} that allows connections from the [Segment IPs](/docs/connections/storage/warehouses/faq/#which-ips-should-i-allowlist).
0 commit comments