New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Snowflake ADA-C01 Exam - Topic 6 Question 14 Discussion

Actual exam question for Snowflake's ADA-C01 exam
Question #: 14
Topic #: 6
[All ADA-C01 Questions]

Which masking policy will mask a column whenever it is queried through a view owned by a role named MASKED_VIEW_ROLE?

Show Suggested Answer Hide Answer
Suggested Answer: A

A masking policy is a SQL expression that transforms the data in a column based on the role that queries the column1. The is_role_in_session function returns true if the specified role is in the current session2. Therefore, the masking policy in option A will mask the column data with asterisks whenever it is queried through a view owned by the MASKED_VIEW_ROLE3. The other options use different functions that do not check the ownership of the view, but rather the current role, the invoker role, or the available roles in the session45. These functions may not return the desired result if the role that owns the view is different from the role that queries the view.


Contribute your Thoughts:

0/2000 characters
Margart
3 months ago
C looks interesting, but I don't think it captures the role properly.
upvoted 0 times
...
Kayleigh
3 months ago
Not sure about B, seems a bit complicated for just checking a role.
upvoted 0 times
...
Caitlin
3 months ago
Wait, can someone explain why A isn't correct?
upvoted 0 times
...
Ruthann
4 months ago
I agree, D makes the most sense for masking based on the current role.
upvoted 0 times
...
Vanna
4 months ago
I think option D is the right one. It checks the current role directly.
upvoted 0 times
...
Latonia
4 months ago
I have a vague recollection of array_contains being used in some context, but I can't remember if it applies here. Is that option B?
upvoted 0 times
...
Dick
4 months ago
I'm a bit confused about the difference between current_role() and invoker_role(). I thought they were interchangeable, but maybe not?
upvoted 0 times
...
Annamae
4 months ago
I remember practicing a question similar to this, and I feel like option D might be the right choice since it uses current_role().
upvoted 0 times
...
Princess
5 months ago
I think option A sounds familiar, but I'm not entirely sure if it correctly checks for the role in the session.
upvoted 0 times
...
Talia
5 months ago
Okay, I think I've got it now. Option D is the correct answer because it checks the current role against the `MASKED_VIEW_ROLE` and returns the masked value if the roles match. The extra asterisks are just part of the masking string, not part of the syntax. I feel confident in this choice.
upvoted 0 times
...
Colby
5 months ago
I'm a bit confused by the syntax here. Do we need to use single quotes or double quotes for the role name? And what's the deal with the extra asterisks in the return values? I'll need to review some examples to make sure I understand the proper way to construct this masking policy.
upvoted 0 times
...
Aretha
5 months ago
Ah, I see the key is to check which role the view is owned by, not the current user's role. Option B looks like it's using the `array_contains()` function to check if the `MASKED_VIEW_ROLE` is in the list of available roles, which seems like the right approach.
upvoted 0 times
...
Quiana
5 months ago
Hmm, I'm a little unsure about the difference between `is_role_in_session()` and `current_role()`. I'll need to double-check the documentation to make sure I understand which one is the correct function to use in this case.
upvoted 0 times
...
Chantay
5 months ago
This looks like a straightforward SQL question about masking policies. I think I've got a good handle on this concept, so I'll carefully read through the options and select the one that best matches the description.
upvoted 0 times
...
Alayna
5 months ago
This question is a bit confusing. I'll need to think it through carefully.
upvoted 0 times
...
Venita
5 months ago
I'm feeling pretty confident about this one. The exhibit gives me a good visual to work with, and I've seen similar scenarios in my studies. I'll make sure to read through the options carefully, but I think I've got a solid strategy.
upvoted 0 times
...
Krystal
5 months ago
I think option D came up in practice questions, where we had to consider additional training. But wouldn't that come after addressing the workload?
upvoted 0 times
...

Save Cancel