> 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="https://3015558743-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFEElAdsRIl9DzfMhbRlB%2Fuploads%2FgytvoDDpcLbaeqZ9aL6K%2Fimg_sf_ml_classification.png?alt=media&amp;token=52bb4862-0624-4977-ba9a-fa0c708a7dcd" 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="https://3015558743-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFEElAdsRIl9DzfMhbRlB%2Fuploads%2FzXtB1QMXN3ky168xmwdh%2Fimg_sf_ml_forecasting.png?alt=media&amp;token=cdbfe03b-9da1-43f9-8112-2f53faeb111a" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
