An analyst gets a permission error calling AI_COMPLETE in SQL. What does Snowflake require for AI functions?
- Exam domain
- Gen AI in Snowflake: access and governance
- Difficulty
- Medium
- In this mock
- 5 questions on this domainPractise this domain
Why B is the answer
The USE AI FUNCTIONS privilege and the CORTEX_USER or AI_FUNCTIONS_USER database role
Snowflake's AI functions page says callers need the account-level USE AI FUNCTIONS privilege and one of the CORTEX_USER or AI_FUNCTIONS_USER database roles.
Remember: Privilege plus a Cortex database role.
In detail
- Privilege plus database role.
- No need for ACCOUNTADMIN.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. The ACCOUNTADMIN role for every call, because AI functions are account-level featuresWrong
Granting ACCOUNTADMIN for this breaks least privilege and is not required.
B. The USE AI FUNCTIONS privilege and the CORTEX_USER or AI_FUNCTIONS_USER database roleRight
Privilege plus a Cortex database role.
C. A Snowpark Container Services compute poolWrong
AI functions do not need a compute pool.
D. Only a running warehouseWrong
A warehouse alone does not grant access.
Use case
An illustrative scenario, not a real incident.
Illustrative: an admin grants AI_FUNCTIONS_USER to the analytics role instead of handing out admin rights.
See it in different ways
mindmap
root(("Access"))
n1["Privilege"]
n2["USE AI FUNCTIONS"]
n3["Database role"]
n4["CORTEX_USER"]
n5["AI_FUNCTIONS_USER"]How to read this chart
- The centre is "Access".
- "Privilege" covers "USE AI FUNCTIONS".
- "Database role" covers "CORTEX_USER", "AI_FUNCTIONS_USER".
flowchart LR S0["Grant USE AI FUNCTIONS"] --> S1["Grant the database role"] --> S2["Test with AI_COMPLETE"]
How to read this chart
- Read it in order: Grant USE AI FUNCTIONS, then Grant the database role, then Test with AI_COMPLETE.