Skip to content

Commit 1f7ed4d

Browse files
authored
snowflake permissions troubleshooting guide (#35651)
1 parent 7dd5621 commit 1f7ed4d

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

  • content/en/data_observability/quality_monitoring/data_warehouses

content/en/data_observability/quality_monitoring/data_warehouses/snowflake.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,38 @@ After you save, Datadog begins syncing your information schema and query history
185185

186186
After the initial sync completes, create a [Data Observability monitor][5] to start alerting on freshness, row count, column-level metrics, and custom SQL metrics.
187187

188+
## Troubleshoot permissions
189+
190+
If Datadog is unable to see expected databases, schemas, or tables in your Snowflake account, follow these steps to verify that the Datadog role has the correct access.
191+
192+
<div class="alert alert-info">The Snowflake console enables secondary roles by default, which can make it appear that a role has more access than it actually does. Step 2 below helps ensure you are testing with only the Datadog role's permissions.</div>
193+
194+
1. Set the role and user to the same ones provisioned for Datadog:
195+
```sql
196+
USE ROLE DATADOG_ROLE;
197+
```
198+
199+
2. Disable secondary roles so that only the Datadog role's grants are active:
200+
```sql
201+
USE SECONDARY ROLES NONE;
202+
```
203+
204+
3. Check that the correct role is set and no secondary roles are in use:
205+
```sql
206+
SELECT CURRENT_ROLE(), CURRENT_SECONDARY_ROLES();
207+
```
208+
209+
4. List the databases the Datadog role can access:
210+
```sql
211+
SELECT database_name FROM snowflake.information_schema.databases;
212+
```
213+
214+
5. Check access to specific schemas or tables:
215+
```sql
216+
SHOW SCHEMAS IN DATABASE "<DATABASE_NAME>";
217+
SHOW TABLES IN SCHEMA "<DATABASE_NAME>"."<SCHEMA_NAME>";
218+
```
219+
188220
## Further reading
189221

190222
{{< partial name="whats-next/whats-next.html" >}}

0 commit comments

Comments
 (0)