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: docs/setup/snowflake-setup.md
+22-8Lines changed: 22 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -129,28 +129,42 @@ alter account set session policy policies.public.account_session_policy;
129
129
### Developing against production data
130
130
131
131
Our Snowflake architecture allows for reasonably safe `SELECT`ing from the production `RAW` database while developing models.
132
-
While this could be expensive for large tables,
133
-
it also allows for faster and more reliable model development.
132
+
While this could be expensive for large tables, it also allows for faster and more reliable model development.
134
133
135
-
To develop against production `RAW` data, first you need someone with the `USERADMIN` role to grant rights to the `TRANSFORMER_DEV` role
136
-
(this need only be done once, and can be revoked later):
134
+
To develop against production data, first you need someone with the `USERADMIN` role to grant rights to the `TRANSFORMER_DEV` role (this need only be done once, and can be revoked later). These grants enable access to real data for development and facilitate cloning and deferral for large-table projects:
137
135
138
136
```sql
139
137
USE ROLE USERADMIN;
140
138
GRANT ROLE RAW_PRD_READ TO ROLE TRANSFORMER_DEV;
139
+
GRANT ROLE TRANSFORM_PRD_READ TO ROLE TRANSFORMER_DEV;
140
+
GRANT ROLE ANALYTICS_PRD_READ TO ROLE TRANSFORMER_DEV;
141
141
```
142
142
143
-
!!! note
144
-
This grant is not managed via terraformin order to keep the configurations of
145
-
different environments as logically separate as possible. We may revisit this
146
-
decision should the manual grant cause problems.
143
+
**Note**
144
+
These grants are not managed via Terraformin order to keep the configurations of
145
+
different environments as logically separate as possible. We may revisit this
146
+
decision should the manual grants cause problems.
147
147
148
148
You can then run dbt locally and specify the `RAW` database manually:
149
149
150
150
```bash
151
151
DBT_RAW_DB=RAW_PRD dbt run
152
152
```
153
153
154
+
### Streamlit dashboard development
155
+
156
+
All production Streamlit dashboards and their marts should reside in the `ANALYTICS_ENGCA_PRD` database.
157
+
If a dashboard needs access to objects from earlier layers, they should be exposed via explicitly created mart tables in this database.
158
+
159
+
To support Streamlit development, the `REPORTER_DEV` role may need read access to the production marts:
160
+
161
+
```sql
162
+
USE ROLE USERADMIN;
163
+
GRANT ROLE ANALYTICS_PRD_READ TO ROLE REPORTER_DEV;
164
+
```
165
+
166
+
Additionally, the cross-environment grant of the `${module.raw.name}_${var.environment}_STREAMLIT` role to the `REPORTER_DEV` role is managed manually via SQL, outside of Terraform.
0 commit comments