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/reverse-etl/reverse-etl-source-setup-guides/snowflake-setup.md
+20-4Lines changed: 20 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,13 @@ redirect_from:
7
7
8
8
Set up Snowflake as your Reverse ETL source.
9
9
10
-
At a high level, when you set up Snowflake for Reverse ETL, the configured user/role needs read permissions for any resources (databases, schemas, tables) the query needs to access. Segment keeps track of changes to your query results with a managed schema (`__SEGMENT_REVERSE_ETL`), which requires the configured user to allow write permissions for that schema.
10
+
At a high level, when you set up Snowflake for Reverse ETL, the configured user/role needs read permissions for any resources (databases, schemas, tables) the query needs to access. Segment keeps track of changes to your query results with a managed schema (`__SEGMENT_REVERSE_ETL`), which requires the configured user to allow write permissions for that schema.
11
+
12
+
> success ""
13
+
> Segment now supports key-pair authentication for Snowflake Reverse ETL sources.
11
14
12
15
## Set up guide
13
-
Follow the instructions below to set up the Segment Snowflake connector. Segment recommends you use the `ACCOUNTADMIN` role to execute all the commands below.
16
+
Follow the instructions below to set up the Segment Snowflake connector. Segment recommends you use the `ACCOUNTADMIN` role to execute all the commands below, and that you create a user that authenticates with a key pair.
14
17
15
18
1. Log in to your Snowflake account.
16
19
2. Navigate to *Worksheets*.
@@ -47,10 +50,23 @@ Follow the instructions below to set up the Segment Snowflake connector. Segment
47
50
GRANT USAGE ON DATABASE segment_reverse_etl TO ROLE segment_reverse_etl;
48
51
GRANT CREATE SCHEMA ON DATABASE segment_reverse_etl TO ROLE segment_reverse_etl;
49
52
```
50
-
6. Enter and run the code below to create the username and password combination that will be used to execute queries. Make sure to enter your password where it says `my_strong_password`.
53
+
6. Enter and run one of the following code snippets below to create the user Segment will use to run queries. Segment recommends creating a user that authenticates using a key pair.
54
+
55
+
To create a user that authenticates with a key pair, [create a key pair](https://docs.snowflake.com/en/user-guide/key-pair-auth){:target="_blank”} and then execute the following SQL commands:
56
+
```sql
57
+
-- create user (key-pair authentication)
58
+
CREATEUSERsegment_reverse_etl_user
59
+
DEFAULT_ROLE = segment_reverse_etl
60
+
RSA_PUBLIC_KEY ='MIIBIjANBgkqh...'
61
+
RSA_PUBLIC_KEY_FP ='enter the passphrase you created';
62
+
63
+
-- role access
64
+
GRANT ROLE segment_reverse_etl TO USER segment_reverse_etl_user;
65
+
```
51
66
67
+
To create a user that authenticates with a password, execute the following SQL commands:
Copy file name to clipboardExpand all lines: src/connections/storage/catalog/snowflake/index.md
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -118,7 +118,7 @@ Now, create a new user by executing the following SQL command, replacing the pub
118
118
119
119
```sql
120
120
CREATEUSERSEGMENT_USER
121
-
DEFAULT_ROLE ="SEGMENT"
121
+
DEFAULT_ROLE = SEGMENT
122
122
RSA_PUBLIC_KEY ='MIIBIjANBgkqh...'
123
123
RSA_PUBLIC_KEY_FP ='enter the passphrase you created';
124
124
GRANT ROLE "SEGMENT" TO USER "SEGMENT_USER";
@@ -221,6 +221,9 @@ After configuring your Snowflake resources, connect them to Segment.
221
221
If you selected Key pair as your authentication method:
222
222
-**Private key**: Upload your private key (stored in .p8 format) that you created in [Step 4: Create a user for Segment](#step-4-create-user-for-segment)
223
223
-**Passphrase**_(Optional)_ : If you created an encrypted key, enter the passphrase you created in [Step 4: Create a user for Segment](#step-4-create-user-for-segment)
224
+
225
+
> info "Segment supports uploading one key at a time"
226
+
> Although you can create up to two keys in Snowflake, Segment only supports authenticating with one key at a time. To change the key that is in Segment, return to your Snowflake destination's settings and upload a new key in the **Private Key** field.
224
227
225
228
If you selected Password as your authentication method:
226
229
-**Password**: The password that you set in [Step 4: Create a user for Segment](#step-4-create-user-for-segment)
@@ -243,6 +246,8 @@ At this time, the Segment Snowflake destination is not compatible with Snowflake
243
246
244
247
Segment recommends that you authenticate with your Snowflake warehouse using key-pair authentication. Key-pair authentication uses PKCS#8 private keys, which are typically exchanged in the PEM base64-encoded format.
245
248
249
+
Although you can create up to two keys in Snowflake, Segment only supports authenticating with one key at a time. To change the key that is in Segment, return to your Snowflake destination's settings and upload a new key in the **Private Key** field.
250
+
246
251
### Auto Suspend and Auto Resume
247
252
248
253
Set `AUTO_SUSPEND` to ~10 minutes in the UI (or 600 if using SQL) to minimize the credit consumption of Segment's syncing process.
0 commit comments