All three big data platforms now let you call a large language model from a SQL query. The model reads a column, row by row, and returns a label, a yes or no, a score or extracted fields. This week all three added something: Snowflake made its AI Function Studio generally available, BigQuery added Gemini 4 models, and Databricks shipped an asynchronous API for big batches. Here is how they compare in November 2026.
The functions side by side
| Task | Snowflake | BigQuery | Databricks |
|---|---|---|---|
| Pick a category | AI_CLASSIFY | AI.CLASSIFY | ai_classify |
| Yes or no, for filtering | AI_FILTER | AI.IF | ai_classify with two labels |
| Score or rate | AI_SENTIMENT for sentiment | AI.SCORE | ai_analyze_sentiment for sentiment |
| Pull out fields | AI_EXTRACT | AI.GENERATE with an output schema | ai_extract |
| Free text, any prompt | AI_COMPLETE | AI.GENERATE | ai_query |
| Read documents | AI_PARSE_DOCUMENT | Through AI.GENERATE on files | ai_parse_document |
| Summarise many rows | AI_AGG | AI.GENERATE over aggregated text | ai_summarize per row |
The same task three ways: label support tickets
A table tickets with a text column body. We want one category per ticket.
SELECT
ticket_id,
AI_CLASSIFY(body, ['billing', 'bug', 'feature request', 'other']):labels[0]::STRING
AS category
FROM tickets;AI_CLASSIFY returns an object whose labels field is an array, so we take the first element. Add {'output_mode': 'multi'} as a third argument to allow several labels, and task_description or few-shot examples in the same object to improve accuracy.
SELECT
ticket_id,
AI.CLASSIFY(
body,
categories => ['billing', 'bug', 'feature request', 'other']
) AS category
FROM mydataset.tickets;Returns a plain STRING. Without connection_id it runs with your own Google credentials, and without endpoint BigQuery chooses the model for the best cost and quality. Add output_mode => 'multi' for several labels.
SELECT
ticket_id,
ai_classify(
body,
'["billing", "bug", "feature request", "other"]',
MAP('version', '2.1', 'enableConfidenceScores', 'true')
) AS result
FROM tickets;Returns a VARIANT with response, metadata and error_message. In version 2.1 each item of response has a value key, and you can ask for confidence scores and short reasons (enableRationales). Labels can be a JSON object with descriptions, up to 500 of them.
Filtering rows with a question
A yes/no function in the WHERE clause is the most useful AI feature most analysts never try. It answers questions like "which reviews mention delivery?" without keyword lists.
SELECT ticket_id, body
FROM tickets
WHERE AI_FILTER(CONCAT('Is this ticket asking for a refund? ', body));SELECT ticket_id, body
FROM mydataset.tickets
WHERE AI.IF(CONCAT('Is this ticket asking for a refund? ', body));SELECT ticket_id, body
FROM tickets
WHERE ai_classify(body, '["refund request", "other"]',
MAP('version', '2.1')):response[0].value::STRING = 'refund request';Databricks has no dedicated yes/no function, so a two-label classification does the job.
What each platform does best
Snowflake
Tuning on your data- AI Function Studio (GA this week) builds, tests and tunes a function from a plain-English description
- AI Function Optimization compares prompts and models on your data, with quality and cost
- AI_AGG summarises across many rows in one call
- Return types are objects you need to unpack
Best when you will run the same AI task every day and want it tuned once.
BigQuery
Least setup- Picks a model automatically when you name none, with a choice between lower cost and higher quality
- AI.CLASSIFY returns a simple string
- Gemini 4 Carbon and Hydrogen available since this week
- Model choice is mostly Google's models
Best for analysts who want results fast with no configuration.
Databricks
Most control- Confidence scores and reasons in ai_classify 2.1
- ai_query calls any model served on the platform, including Claude, GPT and open models
- Asynchronous API runs up to 50,000 requests from a file (beta)
- More options to learn
Best for data engineers building large, repeatable AI pipelines.
Keeping the bill under control
- 1
Test on a sample
Run the function on 200 rows, check them by hand and measure accuracy before touching the full table.
- 2
Use the smallest model that passes
Classification and filtering rarely need a frontier model. On BigQuery, leave the model choice to the platform first.
- 3
Store the results
Write labels to a table once. A dashboard that calls an AI function on every refresh pays every time.
- 4
Only process new rows
Label incrementally with a WHERE on the load date or a MERGE, never the whole history again.
- 5
Watch the platform's AI usage view
Each platform reports AI spending separately from compute; set a budget alert.
When to leave SQL
If you need many closed questions per item, probabilities you can set thresholds on, or images and video in the same call, a dedicated API can be cheaper. Google's new Gemini Decisions API answers up to 1,000 yes/no, choice or score questions per call for $0.10 per million input tokens. The trade-off: the data leaves your warehouse, so check your governance rules first.
Check your understanding
1/3Which BigQuery function filters rows with a yes/no question?
AI.IF returns true or false, so it fits in a WHERE clause.
2/3What does Snowflake's AI_CLASSIFY return?
Take labels[0] for a single label, or keep the array for multi-label results.
3/3What is the best way to keep AI function costs low in dashboards?
Every call costs tokens; compute labels once and reuse them.
You got 0 out of 3.
More: Snowflake's November update, BigQuery's November update and Databricks Genie One's November updates.
Sources: Snowflake documentation for AI_CLASSIFY and Cortex AI Functions; BigQuery documentation for AI.CLASSIFY and the generative AI overview; Databricks documentation for ai_classify and AI Functions; Snowflake, BigQuery and Databricks release notes (9 to 16 November 2026). Function options and pricing change often, so check each platform's documentation before a large run.
