SnowPro Specialty: AI Governance & Security free question 7 / 10 · Domain 4: Governance, Data Protection, and Observability
A masking policy on the ssn column returns the last four digits with a prefix when IS_AGENT_ACTIVATED is TRUE, and the full value otherwise. A user whose role may see raw values runs the same SELECT once in a worksheet and once through a Cortex Agent. What does the user see?
- The full value in the worksheet and a value with the last four digits in the agent run
- The masked value in the worksheet and the full value in the agent run for the same role
- The full value in the worksheet and the same full value in the agent run alike
- An error in the agent run because the policy cannot read the context of an agent
Show the answer and explanation
Answer: A
Why this is correct
The IS_AGENT_ACTIVATED page gives a masking policy that returns the last four digits of an SSN with a prefix when SYS_CONTEXT reports that an agent is active, and returns the value otherwise. It then states that when an agent-initiated query accesses the column, only the last four digits are visible, and that direct user queries see the full value. The same user and the same role therefore see different results depending on whether an agent is active in the execution context.
Why the other options are wrong
"The full value in the worksheet and the same full value in the agent run alike" … The page says that when an agent-initiated query accesses the column, the last four digits are visible, so the agent run differs from the worksheet run.
"The masked value in the worksheet and the full value in the agent run for the same role" … The two runs are reversed. The page says direct user queries see the full value and agent-initiated queries see the masked one.
"An error in the agent run because the policy cannot read the context of an agent" … The page writes the agent check into the body of the masking policy, so the policy reads the agent context without an error.
Same role, different context
When an agent-initiated query accesses the ssn column, only the last four digits are visible. Direct user queries see the full value.