A user needs to create a materialized view in the schema MYDB.MYSCHEMA.
Which statements will provide this access?
A user needs to create a materialized view in the schema MYDB.MYSCHEMA.
Which statements will provide this access?
To provide access to create a materialized view in the schema MYDB.MYSCHEMA, it is necessary to grant the role the appropriate privilege on the schema and then assign this role to the user. This is correctly done by granting the CREATE MATERIALIZED VIEW privilege on the schema to the specified role, and then granting this role to the user. The correct statement is 'GRANT ROLE MYROLE TO USER USER1;' followed by 'CREATE MATERIALIZED VIEW ON SCHEMA MYDB.MYSCHEMA TO ROLE MYROLE;'.
A is the correct answer https://docs.snowflake.com/en/sql-reference/sql/grant-privilege.html#examples
in all commands it is missing the keyword GRANT before "CREATE MATERIALIZED VIEW" The answer A is correct but the answer D is correct too because the keyword ROLE is optional: https://docs.snowflake.com/en/sql-reference/sql/grant-privilege.html TO [ ROLE ] <role_name> [ WITH GRANT OPTION ] So the question must allow for multiple answers.
I forgot to put at the beginning of the sentence: "Premising that"
A & D - both correct B & C - fail (only role can be granted to a user) GRANT CREATE MATERIALIZED VIEW ON SCHEMA mydb.myschema TO ROLE myrole; GRANT CREATE MATERIALIZED VIEW ON SCHEMA mydb.myschema TO USER user1; GRANT CREATE MATERIALIZED VIEW ON SCHEMA mydb.myschema TO user1; GRANT CREATE MATERIALIZED VIEW ON SCHEMA mydb.myschema TO myrole;
A and D are correct
A is correct
grant create materialized view on schema <schema_name> to role <role_name>;
A is correct