Automate Building Snowflake Cortex ML Functions in Coalesce

Now almost anyone can put the predictive power of AI to work for their business

Table of Contents

    Until now, artificial intelligence has chiefly been the domain of data scientists and other technology experts. But the release of Snowflake Cortex, announced at Snowday 2023, promises to democratize AI and machine learning (ML) for a new age. Within Snowflake Cortex, Snowflake Cortex ML Functions allow SQL users and data analysts to build more accurate forecasts, identify outliers for their time-series data, and more.

    Why is this important? These functions change the dynamic of data scientists being the only ones to access AI and ML. By abstracting away the complexities of ML and automating much of the manual coding and data wrangling that data scientists have historically had to do, Snowflake Cortex ML Functions make it easy for data analysts to generate high-quality insights, faster. We shared exactly how this promises to bring huge benefits to businesses in a recent technical tutorial, Building Snowflake Cortex ML Functions, which was co-hosted by Snowflake.

    While concepts such as AutoML have been around for some time, what makes Snowflake Cortex so promising is the fact that these functions bring ML both to Snowflake’s broad base of SQL users and to their data—precisely where that data already lives. That means no more data movement, along with guaranteed security and governance just like the rest of Snowflake’s platform. This allows SQL users and analysts, people who are often most familiar with their data and the business’s analytical problems, to harness ML. For example, they could plug these functions into a data pipeline to generate forecasts or detect outliers in their data, and help their business make better decisions.

     

    A faster, more accurate way to predict product demand

    Similar to how Snowflake enables organizations to democratize machine learning use cases with Snowflake Cortex, Coalesce automates SQL generation to transform data and develop data pipelines in a governed way with our graphical user interface (GUI) and built-in data patterns (nodes) that represent common database objects that are run and materialized on Snowflake.

    One of these data patterns is Coalesce’s ML forecasting node, which enables Snowflake users to prepare their data and take advantage of Snowflake Cortex in a few simple drag-and-drop steps, no coding required. (More on this later.)

    A real-world example of how Snowflake customers are interacting with Snowflake Cortex today is the story of SpartanNash, a grocery retailer in the Midwest. Originally, the company used a process built entirely on Excel to predict inventory demand for the coming week so it could generate inventory orders. This legacy process was extremely resource intensive, taking one full-time employee an entire week to complete.

    Thanks to the accessibility provided by Snowflake Cortex, SpartanNash was able to harness the power of AI by training a model and generating predictions using Snowflake’s ML forecasting function, saving the team hours of effort. Now this process runs every week on an automated schedule, takes just five minutes, and generates more accurate predictions than before (by several percentage points).

    What’s great about this use case is that all of SpartanNash’s data already lives in Snowflake, so it was a pretty easy switch once these functions became readily available in Snowflake.

    “Given our experience, we’re exploring more ways to use Snowflake Cortex functions throughout SpartanNash,” said Jeff Magnuson, Team Lead for Business Intelligence at SpartanNash.

     

    Have SQL, will forecast

    To illustrate how simple this is, take a look at the short block of SQL code below, which is all that’s needed to train a model and use it to make forecasts about your business:

    Snowflake Cortex also provides several conveniences, such as showing evaluation metrics so you can help explain to your team how accurate your model might be, as well as feature importance so you can show which features Snowflake provided under the hood—or that you’ve included in your model—that have helped it become a better predictive model.

    Here’s a quick snapshot of what the output looks like:

    Snowflake Cortex shows you all of the timestamps for the periods you want to predict, the actual forecast, and even an upper and lower bound around the prediction interval to help you understand just how confident the model is in its predictions. Simple but powerful!

     

    Watch the demo

    Want to see how easy it is to start operationalizing ML in your data pipelines?

    In the tutorial below, Doug Barrett, Principal Solutions Architect at Coalesce, explains how data teams can use Snowflake Cortex and Coalesce together to detect patterns in data with ML functions in order to generate automated predictions and intelligent insights. Tune in and learn how to:

    • Use Snowflake Cortex for a variety of ML-enabled use cases, from time-series forecasting to anomaly detection and root cause analysis
    • Train ML models on time-series data in Coalesce with a few simple steps
    • Use Coalesce to take advantage of Snowflake’s growing ML capabilities—without having to write a single line of SQL thanks to Coalesce’s graphical user interface (GUI)

     

    Watch tutorial

    Try it for yourself

    To learn more, check out the Snowflake Cortex ML functions documentation page. And to give what you learned in the tutorial a try, contact us to ask for a demo.

    Explore next-gen data transformations for yourself

    Get Hours of Development Work Done In Minutes