nerdexam
Snowflake

SOL-C01 · Question #81

You have created a new database named 'DEV DB' and want to grant the "SELECT' privilege on all tables within this database to the 'ANALYST' role. You want to ensure that any new tables created in 'DEV

The correct answer is C. GRANT SELECT ON FUTURE TABLES IN DATABASE DEV DB TO ROLE ANALYST;. Option C uses Snowflake's FUTURE GRANTS syntax correctly - ON FUTURE TABLES IN DATABASE tells Snowflake to automatically apply the SELECT privilege to any table created in DEV DB going forward, satisfying both requirements (current and future coverage when combined with a separat

Snowflake Account and Security

Question

You have created a new database named 'DEV DB' and want to grant the "SELECT' privilege on all tables within this database to the 'ANALYST' role. You want to ensure that any new tables created in 'DEV DB' in the future automatically grant 'SELECT' to the 'ANALYST' role. Which of the following approaches achieves this?

Options

  • AGRANT SELECT ON ALL TABLES IN DATABASE DEV DB TO ROLE ANALYST;
  • BGRANT FUTURE GRANTS SELECT ON DATABASE DEV DB TO ROLE ANALYST;
  • CGRANT SELECT ON FUTURE TABLES IN DATABASE DEV DB TO ROLE ANALYST;
  • DGRANT SELECT ON DATABASE DEV DB TO ROLE ANALYST; ALTER DATABASE DEV DB
  • EALTER DATABASE DEV DB SET GRANTED PRIVILEGES = 'SELECT' TO ROLE ANALYST;

How the community answered

(23 responses)
  • A
    9% (2)
  • B
    13% (3)
  • C
    74% (17)
  • D
    4% (1)

Explanation

Option C uses Snowflake's FUTURE GRANTS syntax correctly - ON FUTURE TABLES IN DATABASE tells Snowflake to automatically apply the SELECT privilege to any table created in DEV DB going forward, satisfying both requirements (current and future coverage when combined with a separate ALL TABLES grant).

Why the others fail:

  • A grants SELECT on all currently existing tables only - new tables created later will not inherit it, so it's a one-time snapshot, not a forward-looking policy.
  • B uses invented syntax (FUTURE GRANTS SELECT) that does not exist in Snowflake; the correct keyword order is ON FUTURE TABLES.
  • D attempts to grant SELECT at the database object level, which does not cascade down to tables, and the statement is incomplete/invalid.
  • E is entirely fabricated syntax - Snowflake has no SET GRANTED PRIVILEGES clause on ALTER DATABASE.

Memory tip: Think of the word "FUTURE" as a time arrow pointing forward - ON FUTURE TABLES means "every table born after this moment." Pair it with ON ALL TABLES if you also need existing tables covered, since FUTURE alone only applies to what hasn't been created yet.

Topics

#FUTURE GRANTS#Database Privileges#Role-Based Access#Privilege Syntax

Community Discussion

No community discussion yet for this question.

Full SOL-C01 Practice