nerdexam
SnowflakeSnowflake

SOL-C01 · Question #156

SOL-C01 Question #156: Real Exam Question with Answer & Explanation

The correct answer is A: Option A. Option A correctly creates the view with the required filtering and grants 'SELECT privilege to the 'PRODUCT VIEWER role. Option B includes 'WITH GRANT OPTION' which allows the to grant SELECT privileges to other roles, which is not a requirement here. Option C includes granting

Snowflake Account and Security

Question

You have a Snowflake table named 'products' with columns 'product id', 'product_name', and 'price'. You need to create a view called 'expensive_products' that only shows products with a price greater than $100. However, you also want to ensure that only users with the 'PRODUCT VIEWER' role can access this view. What SQL statements are required to achieve this?

Options

  • AOption A
  • BOption B
  • COption C
  • DOption D
  • EOption E

Explanation

Option A correctly creates the view with the required filtering and grants 'SELECT privilege to the 'PRODUCT VIEWER role. Option B includes 'WITH GRANT OPTION' which allows the to grant SELECT privileges to other roles, which is not a requirement here. Option C includes granting USAGE on Database, this might be required in your enviroment, so its not wrong, but not directly answering the question, so not ideal. Option D incorrectly uses 'ALTER VIEW expensive_products SET SECURE;' a Secure View, this is used to prevent the view definition from being visible. Option E grants 'ALL' privileges, this is not required, only `SELECT privilege is

Topics

#Views#Access Control#RBAC#SQL DDL/DCL

Community Discussion

No community discussion yet for this question.

Full SOL-C01 PracticeBrowse All SOL-C01 Questions