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/unify/linked-profiles/setup-guides/snowflake-setup.md
+23-8Lines changed: 23 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ Be sure to log in with a user that has read and write permissions so that Segmen
11
11
12
12
## Getting started
13
13
14
-
To begin Snowflake setup:
14
+
To get started:
15
15
16
16
1. Log in to your Snowflake account.
17
17
2. Navigate to *Worksheets*.
@@ -39,19 +39,19 @@ Enter and run the code below to create specific roles for Linked Events. All Sno
39
39
40
40
```sql
41
41
-- create role
42
-
CREATE ROLE segment_entities;
42
+
GRANT USAGE ON SCHEMA <schema-name-1> TO ROLE segment_entities;
43
43
44
44
-- warehouse access
45
45
GRANT USAGE ON WAREHOUSE segment_entities TO ROLE segment_entities;
46
46
47
47
-- database access
48
-
GRANT USAGE ON DATABASE segment_entities TO ROLE segment_entities;
49
-
GRANT CREATE SCHEMA ON DATABASE segment_entities TO ROLE segment_entities;
48
+
GRANT USAGE ON DATABASE <your_database> TO ROLE segment_entities;
49
+
GRANT CREATE SCHEMA ON DATABASE <your_database> TO ROLE segment_entities;
50
50
```
51
51
52
52
## Create a new user
53
53
54
-
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`.
54
+
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>`.
55
55
56
56
```sql
57
57
-- create user
@@ -71,7 +71,7 @@ To use Linked Events, you'll need to grant access to `segment_entities_user` for
71
71
These tables need to live in the same database as the one used for storing sync deltas. You can give as broad or narrow of access as you require. If you give broad access to multiple schemas, you can sort through the schemas in the Segment UI to select the appropriate tables to create models from.
72
72
73
73
> success ""
74
-
> Visit Snowflake's docs to learn more about [Snowflake schema priveleges](https://docs.snowflake.com/en/user-guide/security-access-control-privileges#schema-privileges) and [Snowflake table priveleges](https://docs.snowflake.com/en/user-guide/security-access-control-privileges#table-privileges).
74
+
> Visit Snowflake's docs to learn more about [schema priveleges](https://docs.snowflake.com/en/user-guide/security-access-control-privileges#schema-privileges){:target="_blank"} and [table priveleges](https://docs.snowflake.com/en/user-guide/security-access-control-privileges#table-privileges){:target="_blank"}.
75
75
76
76
### Schema access
77
77
@@ -89,11 +89,11 @@ Choose from the following commands to open up table level access to Segment base
89
89
90
90
```sql
91
91
-- query data from all tables in a database
92
-
GRANTSELECTON ALL TABLES IN DATABASE segment_entities TO ROLE
92
+
GRANTSELECTON ALL TABLES IN DATABASE <your_database> TO ROLE
93
93
segment_entities;
94
94
95
95
-- query data from future tables in a database
96
-
GRANTSELECTON FUTURE TABLES IN DATABASE segment_entities TO ROLE segment_entities;
96
+
GRANTSELECTON FUTURE TABLES IN DATABASE <your_database> TO ROLE segment_entities;
97
97
98
98
-- query data from all tables in a schema
99
99
GRANTSELECTON ALL TABLES IN SCHEMA <schema-name> TO ROLE
@@ -107,6 +107,8 @@ segment_entities;
107
107
GRANTSELECTON TABLE <schema-name>.<table_name> TO ROLE segment_entities;
108
108
```
109
109
110
+
### RETL table permissions
111
+
110
112
If you've used RETL in your database, and added a new user, you'll need to add the following table permissions described in [Snowflake's docs](https://docs.snowflake.com/en/user-guide/security-access-control-privileges#table-privileges).
111
113
112
114
```sql
@@ -116,3 +118,16 @@ GRANT CREATE TABLE ON SCHEMA __segment_reverse_etl TO ROLE segment_entities;
116
118
117
119
GRANTSELECT, INSERT, UPDATE, DELETEON ALL TABLES IN SCHEMA __segment_reverse_etl TO ROLE segment_entities;
118
120
```
121
+
122
+
### Confirm table permissions
123
+
124
+
To confirm table permissions, run the following command:
0 commit comments