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/snowflake/index.md
+10-24Lines changed: 10 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ redirect_from:
9
9
10
10
## Getting Started
11
11
12
-
There are six steps to get started using Snowflake with Segment. Make sure that you are running the commands in each step while logged in as an `ACCOUNTADMIN`, or an account that has `MANAGE GRANTS`. While we are using predefined user (`SEGMENT_USER`), role (`SEGMENT`), warehouse (`SEGMENT_WAREHOUSE`) and database (`SEGMENT_EVENTS`) names, you can use any names you like.
12
+
There are six steps to get started using Snowflake with Segment. Make sure that you are running the commands in each step while logged in as an `ACCOUNTADMIN`, or an account that has `MANAGE GRANTS`. While Segment uses predefined user (`SEGMENT_USER`), role (`SEGMENT`), warehouse (`SEGMENT_WAREHOUSE`) and database (`SEGMENT_EVENTS`) names, you can use any names you like.
13
13
14
14
1. Create Virtual Warehouse
15
15
2. Create Database
@@ -20,9 +20,7 @@ There are six steps to get started using Snowflake with Segment. Make sure that
20
20
21
21
### Create Virtual Warehouse
22
22
23
-
The Segment Snowflake destination requires a Snowflake [virtual warehouse](https://docs.snowflake.net/manuals/user-guide/warehouses.html) to load data in to. To avoid conflicts with other regular operations in your cluster, we recommend creating a new warehouse just for Segment loads, but this is not mandatory. An X-Small warehouse works for most customers when starting.
24
-
25
-

23
+
The Segment Snowflake destination requires a Snowflake [virtual warehouse](https://docs.snowflake.net/manuals/user-guide/warehouses.html){:target="_blank"} to load data in to. To avoid conflicts with other regular operations in your cluster, Segment recommends that you create a new warehouse just for Segment loads, but this is not mandatory. An X-Small warehouse works for most customers when starting.
26
24
27
25
```sql
28
26
CREATE WAREHOUSE "SEGMENT_WAREHOUSE"
@@ -38,8 +36,6 @@ Make sure `AUTO_SUSPEND` is set to ~10 minutes in the UI (or 600 if using SQL) a
38
36
39
37
The Segment Snowflake destination creates its own schemas and tables, so it's recommended to create a new database for this purpose to avoid name conflicts with existing data.
You need to run these commands rather than creating a role with the "Create Role" dialog in the UI.
50
46
51
-
This role will be attached to Segment's user and it gives just enough permissions for loading data in your database. We recommend not reusing this role for other operations.
47
+
This role will be attached to Segment's user and it gives just enough permissions for loading data in your database. Segment recommends that you not reuse this role for other operations.
52
48
53
49
1. Click on to Worksheets;
54
50
2. Select SEGMENT_EVENTS under database objects
@@ -74,12 +70,6 @@ GRANT CREATE SCHEMA ON DATABASE "SEGMENT_EVENTS" TO ROLE "SEGMENT";
74
70
75
71
Finally, you need to create the user that will be connected to Segment. Be sure to use a strong, unique password.
76
72
77
-

78
-
79
-

80
-
81
-

82
-
83
73
```sql
84
74
CREATEUSER "SEGMENT_USER"
85
75
MUST_CHANGE_PASSWORD = FALSE
@@ -92,12 +82,11 @@ GRANT ROLE "SEGMENT" TO USER "SEGMENT_USER";
92
82
93
83
Before you continue, test and validate the new user and credentials. When you can run the following commands successfully, you can connect Snowflake to Segment.
94
84
95
-
We use[snowsql](https://docs.snowflake.net/manuals/user-guide/snowsql.html) to run these verification steps.
85
+
Segment uses[snowsql](https://docs.snowflake.net/manuals/user-guide/snowsql.html){:target="_blank"} to run these verification steps.
3. Once the installation is complete, run the following command, replacing "account" and "user" with your Snowflake Account and username:
102
91
103
92
```
@@ -159,12 +148,10 @@ After creating a Snowflake warehouse, the next step is to connect Segment.
159
148
3. Add your credentials as follows:
160
149
- User - The user name (as created above).
161
150
- Password - The password for the user.
162
-
- Account - The account id of your cluster, not the url (e.g. url: `my-business.snowflakecomputing.com`, account-id: `my-business`. **Note:** If you are using Snowflake on AWS, the account id includes the region, for example your url might look like: `my-business.us-east-1.snowflakecomputing.com/` and your accound-id would be: `my-business.us-east-1`)
151
+
- Account - The account id of your cluster, not the url (for example, url: `my-business.snowflakecomputing.com`, account-id: `my-business`. **Note:** If you are using Snowflake on AWS, the account id includes the region, for example your url might look like: `my-business.us-east-1.snowflakecomputing.com/` and your accound-id would be: `my-business.us-east-1`)
163
152
- Database - The database name (as created above).
164
153
- Warehouse - The warehouse name (as created above).
165
154
166
-

167
-
168
155
## Security
169
156
170
157
### Whitelisting IPs
@@ -181,15 +168,14 @@ At this time, the Segment Snowflake destination is not compatible with Snowflake
181
168
182
169
Set `AUTO_SUSPEND` to ~10 minutes in the UI (or 600 if using SQL) to avoid credit consumption by the Segment syncing process.
183
170
184
-

185
171
186
172
### Auto Resume
187
173
188
-
If you enable the `AUTO_SUSPEND` feature, we recommend that you also enable `AUTO-RESUME`. This will ensure that your Snowflake warehouse automatically resumes when Segment loads data. Otherwise, Segment will not be able to load data unless you [manually resume your Snowflake warehouse](https://docs.snowflake.net/manuals/user-guide/warehouses-considerations.html#automating-warehouse-resumption).
174
+
If you enable the `AUTO_SUSPEND` feature, Segment recommends that you also enable `AUTO-RESUME`. This will ensure that your Snowflake warehouse automatically resumes when Segment loads data. Otherwise, Segment will not be able to load data unless you [manually resume your Snowflake warehouse](https://docs.snowflake.net/manuals/user-guide/warehouses-considerations.html#automating-warehouse-resumption){:target="_blank"}.
189
175
190
176
### Unique Warehouse, Database, and Role
191
177
192
-
We strongly recommend creating a unique Warehouse, Database and Role for the Segment Snowflake connection to your Snowflake instance.
178
+
Segment recommends creating a unique Warehouse, Database and Role for the Segment Snowflake connection to your Snowflake instance.
193
179
194
180
## Troubleshooting
195
181
@@ -220,7 +206,7 @@ Most customers have the best luck starting with a X-Small instance.
220
206
A `rollback` is issued at the end of each session to make sure there's no "in-flight" processes hanging out that could block other processes later.
221
207
222
208
### Does Segment use transactions for loading data?
223
-
We don't open transactions explicitly because that would lock resources. However, if autocommit is enabled, each statement functions as it's own transaction, and a silent commit is issued after each.
209
+
Segment doesn't open transactions explicitly because that would lock resources. However, if autocommit is enabled, each statement functions as it's own transaction, and a silent commit is issued after each.
224
210
225
211
### What privileges do I need to grant?
226
212
You shouldn't need to grant any additional privileges. However, you may need to confirm that the USAGE privilege on those schemas is granted to the same role granted to the user connecting to Snowflake through data bricks.
0 commit comments