'Creating masking Policy in Snowflake
I am trying to create masking policy. Everything looks fine but when I selecting the data from customer table. I am getting the error. -- Validating policies
USE ROLE ANALYST_FULL;
SELECT * FROM CUSTOMERS;
SQL compilation error:
Object 'CUSTOMERS' does not exist or not authorized.
When I switched to ANALYST_FULL role I do not see the same database which I used and table which I created.
Solution 1:[1]
check if you have the right privilege for role on the table with:
show grants on role ANALYST_FULL;
if not then you can grant the role access to select the table with:
GRANT SELECT ON TABLE <Database>.<schema>.CUSTOMERS TO ROLE ANALYST_FULL;
or all tables in a database. note this is for existing tables and not future tables:
GRANT SELECT ON ALL TABLES IN SCHEMA <Database>.<schema> TO ROLE ANALYST_FULL;
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | T Olaleye |
