Snowflake Cortex and ML Features
1. Snowflake Cortex and ML Features
In this video we're looking at Snowflake Cortex: Snowflake's built-in AI layer.2. Snowflake Cortex Overview
You'll see how to run language tasks like parsing documents, classifying text, and summarizing content, all without leaving SQL. And we will look at how Snowflake ML extends that into predictive modeling.3. The problem with unstructured data
Snowy Peak's ski patrol teams submit shift reports as PDFs at the end of every shift. The app collects user reviews in three languages. Customer feedback arrives as free-form text that needs sorting into categories before anyone can act on it. All of this data lands in Snowflake - but you can't write a SELECT against a PDF. You can't automatically classify free-form text with standard SQL. That gap is what Cortex is designed to close.4. What is Snowflake Cortex?
Cortex gives you access to large language models from several providers, including Anthropic's Claude, Meta's (Llama), Mistral, OpenAI including GPT family where available, Google Gemini where available, and Snowflake Arctic, all hosted and managed inside Snowflake. There is no external API key to configure in the basic pattern, and your data does not leave the platform for those calls. You invoke Cortex functions the same way you would any other SQL functions. That is the key design: AI where your data already lives.5. Parsing Documents
Parsing is how you get from “file on a stage” to “values SQL can use.” A PDF (or image-backed document) is not a table: you first parse it with `SNOWFLAKE.CORTEX.PARSE_DOCUMENT` or the newer `AI_PARSE_DOCUMENT` where your account supports it. The function returns structured output (often a `VARIANT`) so you can extract text with the same `:` and `::` patterns you used for JSON earlier in the course, then pass that text into other Cortex or SQL functions. `PARSE_DOCUMENT` is a typical first step for anything that starts as a file.6. Cortex SQL Functions: Classify and Translate
Now we'll cover some other commonly used cortex AI SQL functions. The full list of functions is always growing, so make sure you keep up with the Snowflake docs to see what's available. Now back to the functions. Once you have text, a range of SQL functions can act on it. CLASSIFY_TEXT takes a string and an array of category labels and returns the best match — pass it a patrol report and a list of severity levels, it comes back with a label. TRANSLATE takes text and two language codes: pass in a French review, get back English.7. Cortex SQL Functions: Complete and Summarize
COMPLETE is the most open-ended: give it a model name and a prompt and it generates a response — useful wherever the task doesn't fit a predefined pattern. And lastly SUMMARIZE condenses a body of text into a shorter version.8. Cortex Search and Cortex Analyst
Let's go over Cortex's other AI features. Cortex Search runs semantic similarity queries over document text — so instead of matching on exact keywords, it finds content that means something similar. For Snowy Peak, that could mean surfacing all incident reports related to visibility conditions, even if they don't use that exact phrase. Cortex Analyst goes further: it translates plain-English questions into SQL, so a product manager can ask which resorts had the most incidents last winter without writing a line of code.9. Snowflake ML Lifecycle
Snowflake ML adds predictive workloads on the same data and governance you already use. A forecast is not a one-line `SELECT` in the way ad hoc reporting is: you first define a model, then you call the model's `!FORECAST` method. That keeps training separate from scoring, similar to other ML services. As an example you use `CREATE OR REPLACE SNOWFLAKE.ML.FORECAST with your model name, then `CALL my_model!FORECAST and specify the forecasting period. Always match the current syntax in documentation for your account. To learn more, the official ML functions overview in the Snowflake documentation lists forecasting, anomaly detection, and related functions with the latest syntax.10. Let's practice!
Let's put your knowledge to the test!Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.