Course contents

SnowPro Core COF-C03 Study GuidePart 7: AI featuresGovernance, Cost & Exam Focus

Governance, Cost & Exam Focus

Governing and Paying for AI

Cost first, because it's where AI surprises people. AI functions bill AI credits per token, Search and Analyst add their own meters (previous page), and Part 2's monitoring rule applies with teeth: resource monitors can't see any of it. Budgets can, and at IsmaFrost the AI spend has its own budget with a forecast alert, because one enthusiastic notebook re-summarizing a document table nightly is a four-figure surprise by month end. Two views answer "who spent what": CORTEX_AI_FUNCTIONS_USAGE_HISTORY, with each call's function, model, query and warehouse, plus the user for data after February 16, 2026 (its credits exclude the warehouse), and METERING_DAILY_HISTORY filtered to the AI_SERVICES service type for the account rollup. The older CORTEX_FUNCTIONS_USAGE_HISTORY view is no longer updated.

Access takes two grants. A role needs the USE AI FUNCTIONS privilege (account-wide, or per function) and a database role: SNOWFLAKE.CORTEX_USER, or the narrower AI_FUNCTIONS_USER. USE AI FUNCTIONS and CORTEX_USER both ship granted to PUBLIC, meaning everyone can call an LLM on anything they can read until someone decides otherwise. Youness, as ACCOUNTADMIN, revokes both from PUBLIC and grants them to the roles with an approved use case, the same packaging move Part 3 taught, applied to Snowflake's own database. Revoking CORTEX_USER also reaches the services: Cortex Analyst needs CORTEX_USER or CORTEX_ANALYST_USER, and Cortex Code needs CORTEX_USER or CORTEX_AGENT_USER, so grant those narrower roles where they're needed. A Cortex Search service needs only USAGE on it, and the ML functions need their own CREATE privilege on the schema, such as CREATE SNOWFLAKE.ML.ANOMALY_DETECTION.

-- Youness's AI governance policy, run as ACCOUNTADMIN
REVOKE USE AI FUNCTIONS ON ACCOUNT FROM ROLE PUBLIC;
REVOKE DATABASE ROLE SNOWFLAKE.CORTEX_USER FROM ROLE PUBLIC;
GRANT USE AI FUNCTIONS ON ACCOUNT TO ROLE data_engineer;
GRANT DATABASE ROLE SNOWFLAKE.CORTEX_USER TO ROLE data_engineer;
GRANT DATABASE ROLE SNOWFLAKE.CORTEX_ANALYST_USER TO ROLE analyst;   -- Analyst only
Governing AI. Left, access: the database role SNOWFLAKE.CORTEX_USER, together with the USE AI FUNCTIONS privilege, lets a role call AI functions; both are granted to PUBLIC by default, so Youness revokes them from PUBLIC and grants them to approved roles only. SNOWFLAKE.AI_FUNCTIONS_USER is a narrower alternative. Right, spend: AI token charges are AI services spend. A budget can track them and alert; a resource monitor tracks warehouse credits only and never sees them.ACCESS: WHO MAY CALL AISPEND: WHO SEES AI CHARGESDATABASE ROLESNOWFLAKE.CORTEX_USERor the narrower AI_FUNCTIONS_USERROLEPUBLICeveryone, by defaultROLEDATA_ENGINEERapproved roleAlso needed: USE AI FUNCTIONS,on PUBLIC by default tooAI SERVICES SPENDAI token chargesAI functions, Search, AnalystBudgettracks it, alertsResource monitorwarehouse credits only✓✗never sees AI token chargesREVOKEGRANTtracked

ACCESS: WHO MAY CALL AI

DATABASE ROLESNOWFLAKE.CORTEX_USERor the narrower AI_FUNCTIONS_USER

REVOKE

ROLEPUBLICeveryone, by default

GRANT

ROLEDATA_ENGINEERapproved role

Also needed: USE AI FUNCTIONS, on PUBLIC by default too

SPEND: WHO SEES AI CHARGES

AI SERVICES SPENDAI token chargesAI functions, Search, Analyst

tracked

✓Budgettracks it, alerts

✗Resource monitorwarehouse credits only

never sees AI token charges

Figure 7.6 Two governance levers: who may call AI (revoke USE AI FUNCTIONS and CORTEX_USER from PUBLIC, grant them to approved roles) and who watches the spend (a budget, never a resource monitor).

Model availability varies by region, and cross-region inference fills the gap: a call for a model your region doesn't host runs in a region that does. The account parameter CORTEX_ENABLED_CROSS_REGION is usually on already: ANY_REGION for organizations created after March 9, 2026, and a same-cloud geography such as AWS_US or AZURE_EU for most other commercial accounts. The prompt is processed in the other region but not stored there, there's no egress charge, and the credits count in your own region. Regulated accounts set it to DISABLED, which keeps processing in the home region; only ACCOUNTADMIN can change it. That's also the honest general posture for this part: the feature list moves faster than any guide, so the durable knowledge is the sorting (name the job and the tool follows), the billing category (budget-visible, monitor-invisible), and the two grants that gate it: USE AI FUNCTIONS and a Cortex database role.

Exam Focus · Part 7

Match each job to one AI tool, know how it bills, and who may call it.

Know these cold

TopicRemember
BillingAI credits per token: input and output for text, input only for AI_EMBED. Budgets see them; resource monitors don't. Warehouse: Medium at most
AccessUSE AI FUNCTIONS plus CORTEX_USER (or the narrower AI_FUNCTIONS_USER). USE AI FUNCTIONS and CORTEX_USER are on PUBLIC by default
Task-specific vs AI_COMPLETEAI_SENTIMENT, AI_TRANSLATE: no model argument. AI_COMPLETE and AI_EMBED: you name the model
Function shapesMost are scalar, one result per row. AI_FILTER returns TRUE or FALSE. AI_AGG and AI_SUMMARIZE_AGG return one string per group
Cortex SearchFinds passages in documents: the retrieval half of RAG. Runs with owner's rights. Pays a warehouse for refreshes, embedding tokens, serving per GB-month
Cortex AnalystBusiness questions over tables via a semantic view (YAML files are legacy). Returns SQL that runs under the caller's role; billed per successful message. CORTEX_USER or CORTEX_ANALYST_USER
Cortex CodeThe Snowsight assistant (also called CoCo) that replaced the deprecated Copilot. Can run SQL, but only with the active role's privileges
Fields from documentsAI_EXTRACT with a responseFormat. Document AI's !PREDICT was retired in March 2026. Full text: AI_PARSE_DOCUMENT (OCR or LAYOUT)
ML functionsFORECAST, ANOMALY_DETECTION, classification. Train and run on your warehouse; Snowpark-optimized for big training
Who spent whatCORTEX_AI_FUNCTIONS_USAGE_HISTORY: each call's function, model and user
Where models runInside Snowflake's security boundary, OpenAI and Anthropic ones too

Traps

  • Myth Cortex Search hides rows the searcher can't read.Fact It runs with owner's rights. USAGE on it exposes everything indexed.
  • Myth Cortex Analyst's SQL bypasses the caller's privileges.Fact It runs under the caller's role.
  • Myth Prompts never leave your account's region.Fact Cross-region inference is on by default for most accounts. Prompts may run elsewhere, never stored there. DISABLED keeps them home.
Before you turn the page
  • Name the tool for "chat over our documents", "revenue questions" and "totals from invoices".
  • Say which AI costs a resource monitor catches, and what does.
  • Name the two grants needed to call AI functions, and who holds them by default.