SnowPro Specialty: AI Governance & Security free question 8 / 10 · Domain 4: Governance, Data Protection, and Observability
An auditor wants the queries in QUERY_HISTORY that an agent directly invoked, and none of the queries that people ran themselves. Which filter does the documentation support?
- Keep the rows in which the warehouse_name column holds the warehouse of the agent
- Keep the rows in which the role_name column holds the role that an agent activates
- Keep the rows in which the query_tag column holds the name of the agent
- Keep the rows in which the agent_type column is not NULL
Show the answer and explanation
Answer: D
Why this is correct
In the Columns table of the QUERY_HISTORY view, agent_type is the type of agent that directly invoked the query. The column is NULL if the query was not invoked by an agent. Keeping the rows in which it is not NULL therefore gives the agent-invoked queries and leaves out the queries that people ran themselves.
Why the other options are wrong
"Keep the rows in which the query_tag column holds the name of the agent" … The page gives the agent_type column for the type of agent that invoked the query. It does not describe the query tag as the place for an agent name.
"Keep the rows in which the role_name column holds the role that an agent activates" … Roles do not mark agent queries. The agent_type column holds the type of the agent and is NULL for queries that no agent invoked.
"Keep the rows in which the warehouse_name column holds the warehouse of the agent" … The page marks agent queries with agent_type. A warehouse is a compute resource and does not identify who invoked the query.
A NULL has a meaning
The agent_type column doubles as the filter. A value means an agent invoked the query directly, and NULL means no agent did.