---
title: "Studio: Snowflake ETL Task"
description: "Configure a Snowflake ETL task in RavenDB Studio to export documents to Snowflake data warehouse via Parquet staging files."
url: "https://docs.ravendb.net/7.2/studio/database/tasks/ongoing-tasks/snowflake-etl-task"
version: "7.2"
---

# Studio: Snowflake ETL Task

> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

## Studio: Snowflake ETL Task

> **Note**
>
> - A Snowflake task is an [ETL](https://docs.ravendb.net/7.2/server/ongoing-tasks/etl/basics.md) process that -  
>   **Extracts** selected data from RavenDB documents,  
>   **Transforms** the data to SQL format,  
>   and **Loads** the transformed data to a Showflake warehouse.
>
> - This page explains how to create a Snowflake ETL task using Studio.  
>   Learn more [here](https://docs.ravendb.net/7.2/server/ongoing-tasks/etl/snowflake.md).
>
> - In this page:
>   - [Add a Database Task](#add-a-database-task)
>   - [Define a Snowflake ETL Task](#define-a-snowflake-etl-task)
>   - [Add or Edit Transformation Script](#add-or-edit-transformation-script)

## Add a Database Task

![Ongoing Tasks View](https://docs.ravendb.net/assets/images/ongoing-tasks-abda48c50a5a3352cfce54ecdd7f06ed.png)

1. **Ongoing Tasks**  
   Click to open the ongoing tasks view.
2. **Add a Database Task**  
   Click to create a new ongoing task.  
   ![Define ETL Task](https://docs.ravendb.net/assets/images/snowflake_task-selection-f41c1083aead9de7f1f02ba4972266d9.png)

- **Snowflake ETL**  
  Click to define a Snowflake ETL task.

## Define a Snowflake ETL Task

![Define a Snowflake ETL Task](https://docs.ravendb.net/assets/images/snowflake_etl-define-task-1c5e1b5394f3381d81a21344c251c71d.png)

1. **Task Name** (Optional)
   - Enter a name for your task
   - If no name is provided, the server will create a name based on the defined connection string,  
     e.g. *ETL to conStr*

2. **Task State**  
   Select the task state:  
   Enabled - The task runs in the background, transforming and sending documents as defined in this view.  
   Disabled - No documents are transformed and sent.

3. **Set responsible node** (Optional)

- Select a node from the [Database Group](https://docs.ravendb.net/7.2/studio/database/settings/manage-database-group.md) to be responsible for this task.
- If no node is selected, the cluster will assign a responsible node (see [Members Duties](https://docs.ravendb.net/7.2/studio/database/settings/manage-database-group.md#database-group-topology---members-duties)).

4. **Connection String**  
   The connection string defines the location of the destination warehouse.
   - `A.` **Create a new Snowflake connection string**  
     Toggle to choose whether to create a new connection string or use an existing string.  
     If you choose to use an existing string, you will be given a list of existing strings to select from.  
     ![Select an existing connection string](https://docs.ravendb.net/assets/images/snowflake-existing-connection_string-5007f69c10185b744145cdddaa268129.png)
   - `B.`**New connection string Name**  
     If you choose to create a new connection string, enter a name for it here.
   - `C.`**New connection string**  
     If you choose to create a new connection string, enter the string here.  
     It is a single string that includes all the options required to connect the Snowflake warehouse.
   - `D.`**Advanced**  
     Click for advanced configuration options.
     - **Command Timeout**  
       Specify the number of seconds after which an SQL command will timeout.  
       ![Command Timeout](https://raw.githubusercontent.com/ravendb/docs/main/docs/studio/database/tasks/ongoing-tasks/assets/snowflake_etl-command-timeout.png)
   - `E.`**Test Connection**  
     Click after defining the connection string, to test the connection to the destination database.

5. **Snowflake Tables**  
   Specify all the SQL tables on the destination database, that the ETL process is to transfer data to.

   > **Note**
   >
   > Please note that adding tables to this list does **not** mean that the ETL process would create them.  
   > Prior to running the ETL task, you must create these tables on the destination database.

   - `A.` **Add Table**  
     Click to add a new table raw.
   - `B.`**Table Name**  
     Enter the table's name.
   - `C.`**Document ID Column Name**  
     For each table, specify which column would hold the IDs of the documents that data is extracted from.  
     RavenDB will fill this column with source document IDs, and use these IDs to handle updates and deletes.
   - `D.`**Insert Only**  
     Enable this option if the target database is *append-only*, to boost performance by inserting the data
     without running a set of DELETE statements first.
   - `E.`Confirm to add the new table, or Cancel to remove this raw.

6. **Add Transformation Script**  
   Click to add a transformation script.  
   An ETL task can apply multiple transformation scripts.  
   Each script is defined per collection. Once defined, it **cannot** be empty.

## Add or Edit Transformation Script

![Add or Edit Transform Script](https://docs.ravendb.net/assets/images/transformation-script-1d3c91ed0da49477b6797dff5fb250fa.png)

1. **Script Name**  
   Enter a name for the script (Optional).  
   A default name will be generated if no name is entered, e.g. Script\_1

2. **Script**  
   Edit the transformation script.
   - Define a **document object** whose contents will be extracted from
     RavenDB documents and sent to the destination database.  
     E.g., `var orderData` in the above example.
   - Make sure that one of the properties of the document object
     is given the value `id(this)`. This property will contain the
     RavenDB document ID.
   - Use the `loadTo<TableName>` method to pass the document object
     to the destination table.

3. **Syntax**  
   Click for a transformation script Syntax Sample.

4. **Collections**
   - **Select (or enter) a collection**  
     Type or select the names of the collections your script is using.
   - **Collections Selected**  
     A list of collections that were already selected.

5. **Apply script to documents from beginning of time (Reset)**
   - When this option is **enabled**:  
     The script will be executed over **all existing documents in the
     specified collections** the first time the task runs.
   - When this option is **disabled**:  
     The script will be executed **only over new and modified documents**.

6. **Add/Update**  
   Click to add a new script or update the task with changes made in an existing script.

7. **Cancel**  
   Click to cancel your changes.

8. **Test Script**  
   Click to **test** the transformation script.
