> For the complete documentation index, see [llms.txt](https://academy.carto.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://academy.carto.com/creating-workflows/workflow-templates/snowflake-ml.md).

# Snowflake ML

{% hint style="success" %}
For these templates, you will need to install the [**SnowflakeML**](https://docs.carto.com/carto-user-manual/workflows/components/snowflake-ml) extension package.
{% endhint %}

## Create a classification model

| Snowflake            |
| -------------------- |
| :white\_check\_mark: |

This example shows how to create a pipeline to train a classification model using [Snowflake ML](https://docs.snowflake.com/en/user-guide/ml-functions/classification), evaluate the model and use it for prediction. In particular, we will create a classification model to estimate customer churn for a telecom company in California.

This example workflow will help you see how telco companies can detect high-risk customers, uncover the reasons behind customer departures, and develop targeted strategies to boost retention and satisfaction by training a classification model.

[**Download this example**](https://storage.googleapis.com/carto-workflows-examples/files/sf_ml_classification.sql)

<figure><img src="/files/71jxvS4wqvDJfGUOgOxM" alt=""><figcaption></figcaption></figure>

## Create a forecasting model

| Snowflake            |
| -------------------- |
| :white\_check\_mark: |

This template shows how to create a forecast model using [Snowflake ML](https://docs.snowflake.com/en/user-guide/ml-functions/classification) through the [extension package](https://docs.carto.com/carto-user-manual/workflows/components/snowflake-ml) for Workflows. There are three main stages involved:

* **Training a model**, using some input data and adjusting to the desired parameters,
* **Evaluating and understanding** the model and its performance,
* **Forecasting** and saving the results.

[**Download this example**](https://storage.googleapis.com/carto-workflows-examples/files/sf_ml_forecasting.sql)

<figure><img src="/files/6RKb5mtDosrmShYl4I9v" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://academy.carto.com/creating-workflows/workflow-templates/snowflake-ml.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
