nerdexam
Snowflake

ADA-C01 · Question #77

When adding secure views to a share in Snowflake, which function is needed to authorize users from another account to access rows in a base table?

The correct answer is C. CURRENT_USER. According to the Working with Secure Views documentation, secure views are designed to limit access to sensitive data that should not be exposed to all users of the underlying table(s). When sharing secure views with another account, the view definition must include a function…

Data Sharing and Collaboration

Question

When adding secure views to a share in Snowflake, which function is needed to authorize users from another account to access rows in a base table?

Options

  • ACURRENT_ROLE
  • BCURRENT ACCOUNT
  • CCURRENT_USER
  • DCURRENT_CLIENT

How the community answered

(29 responses)
  • A
    3% (1)
  • B
    7% (2)
  • C
    76% (22)
  • D
    14% (4)

Explanation

According to the Working with Secure Views documentation, secure views are designed to limit access to sensitive data that should not be exposed to all users of the underlying table(s). When sharing secure views with another account, the view definition must include a function that returns the identity of the user who is querying the view, such as CURRENT_USER, CURRENT_ROLE, or CURRENT_ACCOUNT. These functions can be used to filter the rows in the base table based on the user's identity. For example, a secure view can use the CURRENT_USER function to compare the user name with a column in the base table that contains the authorized user names. Only the rows that match the user name will be returned by the view. The CURRENT_CLIENT function is not suitable for this purpose, because it returns the IP address of the client that is connected to Snowflake, which is not related to the user's identity.

Topics

#secure views#CURRENT_USER#cross-account access#row-level security

Community Discussion

No community discussion yet for this question.

Full ADA-C01 Practice