{
  "id": 5226677,
  "title": "How to run generative AI on SQL tables with Snowflake Cortex",
  "url": "https://urgent.news/2026/09/03/how-to-run-generative-ai-on-sql-tables-with-snowflake-cortex",
  "topic": "ai",
  "section": "AI",
  "published": "2026-09-03T02:21:09.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/laura_cristinachicovisd/how-to-run-generative-ai-on-sql-tables-with-snowflake-cortex-5gh6"
  },
  "original_language": "en",
  "account": "To run generative AI on SQL tables with Snowflake Cortex, start by setting up a Snowflake account in a region where Cortex is available, and a warehouse. Grant access to the AI functions through a database role called SNOWFLAKE.CORTEX_USER. Use the AI_COMPLETE function to generate text based on a model name and prompt. Limit the number of AI calls to a few rows initially to manage costs, and remove the limit when the prompt is finalized. Utilize task-specific functions like AI_CLASSIFY for classification, AI_FILTER for filtering, and AI_AGG for aggregation to write shorter SQL queries. Monitor costs by viewing the Account Usage schema and aggregate AI function usage. Be aware of preview status for some functions and model availability, and consider materializing results for downstream tables to avoid non-determinism.",
  "summary": "The question that decides whether Cortex belongs in your stack is not what it can do. It is what it costs once the table has millions of rows instead of five. That question exists because the model call is an ordinary SQL function. It sits inside a SELECT , composes with WHERE , JOIN and GROUP BY , and runs once per row. So this walkthrough goes in that order. Access first, then the functions on…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}