> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prophecy.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect to Snowflake

> Learn how to connect with Snowflake

Learn how to set up and use a Snowflake connection in Prophecy. With a Snowflake connection, you can read from and write to tables in your Snowflake account using Source and Target gems, browse data in the Environment browser, and process Snowflake data within Prophecy pipelines.

Snowflake can also be configured as a fßabric SQL warehouse, where it executes pipeline transformations. This page describes how to configure a Snowflake connection for accessing data. To learn about using Snowflake as a compute engine, see [Create a Snowflake fabric](/data-analysis/environment/fabrics/create-fabrics/snowflake).

## Prerequisites

When you create a Snowflake connection in Prophecy, all data operations—such as reading or writing—are executed using the Snowflake credentials you provide. Ensure that your Snowflake user has the following permissions:

* `SELECT`, `INSERT`, `UPDATE`, and `DELETE` on the tables used in your Prophecy pipelines.
* `OWNERSHIP` on the table, if Prophecy needs to alter or replace it.

When writing data through a Snowflake connection, Prophecy uploads Parquet files to a stage before loading them into Snowflake tables. This requires:

* `CREATE FILE FORMAT` in the target schema.
* `USAGE` on any file formats used for reading/writing Parquet files.
* Write access to your user stage

## Connection type

### Connection type

Snowflake can be used in two ways within Prophecy.

| Connection type               | Description                                                                                                                                                                                                                |
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **SQL Warehouse connection**  | Snowflake acts as the compute engine for a fabric and executes pipeline SQL transformations. To learn more about SQL Warehouse connections, visit [Prophecy fabrics](/data-analysis/environment/fabrics/prophecy-fabrics). |
| **Ingress/Egress connection** | Snowflake is used only as a data source or target. Pipelines read from or write to Snowflake tables while transformations run in another warehouse.                                                                        |

## Feature support

The table below outlines whether the connection supports certain Prophecy features.

| Feature                            | SQL Warehouse | Ingress/Egress |
| ---------------------------------- | ------------- | -------------- |
| Run SQL queries                    | Yes           | No             |
| Read data with Source gem          | Yes           | Yes            |
| Write data with Target gem         | Yes           | Yes            |
| Browse data in Environment browser | Yes           | Yes            |
| Index tables in Knowledge Graph    | No            | No             |

## Connection parameters

To create a connection with Snowflake, enter the following parameters:

| Parameter             | Description                                                                                                                                     |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| Connection Name       | Name to identify your connection                                                                                                                |
| Account               | URL of your Snowflake account<br />Example: `https://<orgname>-<account_name>.snowflakecomputing.com`                                           |
| Database              | Default database for reading and writing data                                                                                                   |
| Schema                | Default schema for reading and writing data                                                                                                     |
| Warehouse             | Name of the Snowflake virtual warehouse used to execute queries for this connection.                                                            |
| Role                  | Snowflake [role](https://docs.snowflake.com/en/user-guide/security-access-control-overview) of the user to connect<br />Example: `ACCOUNTADMIN` |
| Authentication method | Enter your Snowflake username and use a [secret](/data-analysis/environment/secrets/secrets) to enter your password.                            |

## Data type mapping

When Snowflake data is processed in pipelines running on other SQL warehouses (such as Databricks or BigQuery), Prophecy converts Snowflake-specific data types to compatible types. This table shows how [Snowflake data types](https://docs.snowflake.com/en/sql-reference/intro-summary-data-types) are transformed for Databricks and BigQuery.

| Snowflake      | Databricks                      | BigQuery                        |
| -------------- | ------------------------------- | ------------------------------- |
| NUMBER         | BIGINT<br />Alias: Bigint       | INT64<br />Alias: Integer       |
| INTEGER        | BIGINT<br />Alias: Bigint       | INT64<br />Alias: Integer       |
| BIGINT         | BIGINT<br />Alias: Bigint       | INT64<br />Alias: Integer       |
| SMALLINT       | BIGINT<br />Alias: Bigint       | INT64<br />Alias: Integer       |
| TINYINT        | BIGINT<br />Alias: Bigint       | INT64<br />Alias: Integer       |
| FLOAT          | DOUBLE<br />Alias: Double       | FLOAT64<br />Alias: Float       |
| DOUBLE         | DOUBLE<br />Alias: Double       | FLOAT64<br />Alias: Float       |
| REAL           | DOUBLE<br />Alias: Double       | FLOAT64<br />Alias: Float       |
| DECIMAL        | DOUBLE<br />Alias: Double       | FLOAT64<br />Alias: Float       |
| NUMERIC        | DOUBLE<br />Alias: Double       | FLOAT64<br />Alias: Float       |
| BOOLEAN        | BOOLEAN<br />Alias: Boolean     | BOOL<br />Alias: Boolean        |
| VARCHAR        | STRING<br />Alias: String       | STRING<br />Alias: String       |
| CHAR           | STRING<br />Alias: String       | STRING<br />Alias: String       |
| STRING         | STRING<br />Alias: String       | STRING<br />Alias: String       |
| TEXT           | STRING<br />Alias: String       | STRING<br />Alias: String       |
| DATE           | DATE<br />Alias: Date           | DATE<br />Alias: Date           |
| TIME           | STRING<br />Alias: String       | TIME<br />Alias: Time           |
| DATETIME       | TIMESTAMP<br />Alias: Timestamp | TIMESTAMP<br />Alias: Timestamp |
| TIMESTAMP\_NTZ | TIMESTAMP<br />Alias: Timestamp | TIMESTAMP<br />Alias: Timestamp |
| TIMESTAMP\_LTZ | TIMESTAMP<br />Alias: Timestamp | TIMESTAMP<br />Alias: Timestamp |
| TIMESTAMP\_TZ  | TIMESTAMP<br />Alias: Timestamp | TIMESTAMP<br />Alias: Timestamp |
| BINARY         | BINARY<br />Alias: Binary       | BYTES<br />Alias: Bytes         |
| VARBINARY      | BINARY<br />Alias: Binary       | BYTES<br />Alias: Bytes         |
| VARIANT        | STRING<br />Alias: String       | STRING<br />Alias: String       |
| OBJECT         | STRING<br />Alias: String       | STRING<br />Alias: String       |
| ARRAY          | STRING<br />Alias: String       | STRING<br />Alias: String       |
| NULL           | STRING<br />Alias: String       | STRING<br />Alias: String       |

<Info>Learn more in [Supported data types](/data-analysis/gems/data-types).</Info>

## Limitations

There are a few limitations on the data types you can read from Snowflake:

* Prophecy reads `Object`, `Array`, and `Variant` types as `String` type.
* Prophecy does not support writing `Binary` type columns.

## Sharing connections within teams

Connections in Prophecy are stored within [fabrics](/data-analysis/environment/fabrics/prophecy-fabrics), which are assigned to specific teams. Once a Snowflake connection is added to a fabric, all team members who have access to the fabric can use the connection in their projects. No additional authentication is required—team members automatically inherit the access and permissions of the stored connection credentials.

<Warning>
  Be mindful of the access level granted by the stored credentials. Anyone on the team will have the same permissions—including access to sensitive data if allowed.

  To manage this securely, consider creating a dedicated fabric and team for high-sensitivity connections. This way, only approved users have access to those credentials.
</Warning>
