ARA-R01 practice question 7 of 10

A user named USER_01 needs access to create a materialized view on a schema EDW. STG_SCHEM

Full set: 162 questions

Domain Implementing and Deploying a Solution

Answer options
A: How can this access be provided? Correct answer
B: GRANT CREATE MATERIALIZED VIEW ON SCHEMA EDW.STG_SCHEMA TO USER USER_01;
C: GRANT CREATE MATERIALIZED VIEW ON DATABASE EDW TO USER USERJD1;
D: GRANT ROLE NEW_ROLE TO USER USER_01; GRANT CREATE MATERIALIZED VIEW ON SCHEMA ECW.STG_SCHEKA TO NEW_ROLE;
E: GRANT ROLE NEW_ROLE TO USER_01; GRANT CREATE MATERIALIZED VIEW ON EDW.STG_SCHEMA TO NEW_ROLE;
Correct Answer:
A. How can this access be provided?
Explanation

The CREATE MATERIALIZED VIEW privilege is a schema-level privilege. The correct syntax to grant this permission directly to a user for a specific schema is GRANT CREATE MATERIALIZED VIEW ON SCHEMA TO USER . Option A follows this syntax precisely, granting the required privilege on the EDW.STGSCHEMA to USER01. While using roles is a best practice, this direct grant is a valid and correct way to provide the specified access.

Why Incorrect

B. This grants the privilege on the entire database EDW, which is overly permissive, and contains a typo in the username (USERJD1).
C. This option contains multiple typos in the object name (ECW.STGSCHEKA instead of EDW.STGSCHEMA), making the command invalid for the intended schema.
D. The second GRANT statement is syntactically incorrect. It is missing the object type keyword SCHEMA before the object name EDW.STGSCHEMA.

References

1. Snowflake Documentation: Access control privileges - Schema Privileges. This document lists CREATE MATERIALIZED VIEW as a privilege that can be granted on a schema.

Reference: Snowflake Inc. (2023). Access control privileges. Snowflake Documentation. Retrieved from https://docs.snowflake.com/en/user-guide/security-access-control-privileges#schema-privileges

2. Snowflake Documentation: GRANT . This page details the syntax for granting privileges on various database objects. The correct syntax for a schema is GRANT ON SCHEMA TO ....

Reference: Snowflake Inc. (2023). GRANT . Snowflake Documentation. Retrieved from https://docs.snowflake.com/en/sql-reference/sql/grant-privilege (See section: "Syntax" and "Examples").

Scroll to Top