nerdexam
SnowflakeSnowflake

SOL-C01 · Question #20

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

The correct answer is B: Option B. Option B correctly creates or replaces the view to aggregate sales data by month and then grants the SELECT privilege on the view to the `ANALYST role, enabling them to query the view. Option A will fail if the view already exists. Option C incorrectly adds row access policy whic

Snowflake Account and Security

Question

A data analyst needs to create a view named that aggregates sales data by month. The base table sales_transactions' contains columns 'transaction_id' , 'transaction_date' , and 'sales_amount' . The analyst wants to ensure that only users with the 'ANALYST' role can query this view. Which of the following SQL statements correctly creates the view and grants the necessary privileges?

Options

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

Explanation

Option B correctly creates or replaces the view to aggregate sales data by month and then grants the SELECT privilege on the view to the `ANALYST role, enabling them to query the view. Option A will fail if the view already exists. Option C incorrectly adds row access policy which is not necessary here. Option D is about Future grants and not correct here. Option E Creates a secure view, while correct is not the most optimal or requested answer to resolve the problem statement.

Topics

#Views#Role-Based Access Control (RBAC)#SQL DDL#Data Aggregation

Community Discussion

No community discussion yet for this question.

Full SOL-C01 PracticeBrowse All SOL-C01 Questions