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

# Connect your app to Snowflake

> Connect Snowflake to your Lovable app using Snowflake OAuth. Run SQL, use the SQL REST API, and work with warehouses and data from your Snowflake account through Lovable’s connector gateway.

export const connector_0 = "Snowflake"

[Snowflake](https://www.snowflake.com/) is a cloud data platform for **analytics**, **data engineering**, and **AI/ML** workloads. The **Snowflake** app connector uses **Snowflake’s native OAuth** (custom security integration) so your app can call Snowflake through Lovable’s **connector gateway** without embedding long-lived passwords in your project.

With Snowflake connected, your app can:

* Run **SQL** and use the **SQL REST API** (for example submitting statements and checking status)
* Work with **warehouses**, **databases**, and **schemas** your role can access
* Build **internal tools**, **dashboards**, and **data workflows** backed by Snowflake

Snowflake fits when your organization already centralizes data in Snowflake and you want Lovable apps to query or orchestrate that data securely.

## Common use cases and example apps

| Example app          | Example prompt                                                                                                | Description                                                    |
| :------------------- | :------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------- |
| **SQL explorer**     | *Build an internal tool that runs read-only SQL against our `analytics` schema and shows results in a table.* | **Ad-hoc querying** with guardrails you define in app logic.   |
| **Metric dashboard** | *Show daily revenue and signups from Snowflake summary tables with date filters.*                             | **Operational dashboards** fed by modeled tables in Snowflake. |
| **Pipeline status**  | *After a user uploads a file, poll Snowflake for load completion and show pass/fail.*                         | **Orchestration-style UX** on top of warehouse data.           |
| **Support lookup**   | *Given an account ID, load key fields from our Snowflake `customers` view for the support UI.*                | **Enrich product UIs** with trusted warehouse data.            |
| **Data validation**  | *Run lightweight row counts and null checks on staging tables after our ETL runs.*                            | **Quality checks** using SQL against Snowflake.                |

## How Snowflake connections work

* **OAuth 2.0 (authorization code)**: You register a **custom OAuth integration** in Snowflake and enter the **Account URL**, **Client ID**, **Client secret**, and **Role** in Lovable. You (or your admin) then complete sign-in with Snowflake to authorize the connection.
* **Role**: Choose a role that has the warehouse and object access your app needs. Do **not** use `ACCOUNTADMIN` or `SECURITYADMIN`, they are blocked by the connector validation pattern.
* **Gateway**: API requests are proxied through Lovable’s **connector gateway**, which manages tokens. See [Gateway-based connectors](/integrations/introduction#gateway-based-connectors) for limits.

For Snowflake-side setup details, see Snowflake’s guide to [OAuth with clients](https://docs.snowflake.com/en/user-guide/oauth-custom).

<Note>
  Snowflake **compute and storage** costs are billed by **Snowflake** / your cloud agreement, not by Lovable.
</Note>

## How to connect Snowflake

Workspace **admins** and **owners** can create Snowflake connections. **Link** each connection to the Lovable **projects** that should use it.

### Prerequisites

* Access to a **Snowflake account** where you can create or manage an **OAuth security integration**
* Permission to use a Snowflake **role** appropriate for your app (not `ACCOUNTADMIN` or `SECURITYADMIN`)
* **Lovable workspace admin or owner** role

### Step 1: Create a Snowflake OAuth integration

Work with your Snowflake administrator if needed.

1. In Snowflake, create a **custom OAuth security integration** and obtain the **OAuth client ID** and **client secret**.
2. Configure **redirect URIs** and any other settings required by your organization. Use the **redirect URI** that Lovable shows during the connect flow so authorization can complete.
3. Confirm the **account URL** (for example `https://myorg-myaccount.snowflakecomputing.com`).

See Snowflake’s documentation: [Configure Snowflake OAuth for custom clients](https://docs.snowflake.com/en/user-guide/oauth-custom).

### Step 2: Connect Snowflake in Lovable

1. Open **Connectors** → **App connectors** and select **Snowflake**.
2. Click **Add connection**.
3. Enter a **Display name** (for example `Snowflake Prod`).
4. Fill in **Account URL**, **Client ID**, **Client secret**, and **Role** exactly as in Snowflake.
5. Start the **Connect** / **Authorize** flow and sign in to Snowflake when prompted.

After authorization, link the connection to the projects that should query Snowflake.

## Limitations

* **Scopes and roles** are determined by your Snowflake OAuth integration and the **role** you configure; the app cannot exceed those permissions.
* **Per-user Snowflake login** for every visitor is not what this connector provides—it represents a **shared** authorization for the workspace connection.
* **Gateway limits** apply as described in [Gateway-based connectors](/integrations/introduction#gateway-based-connectors).

## How to unlink projects from a {connector_0} connection

Editors and above can remove specific projects from a connection without deleting the connection entirely. The connection will remain available for other projects.

To unlink projects:

<Steps>
  <Step title="Open Connectors">
    Open **Connectors**, then go to **App connectors**, and select **{connector_0}**.
  </Step>

  <Step title="Open the connection">
    Open the connection you want to manage.
  </Step>

  <Step title="Select projects">
    Under **Linked projects**, check the projects you want to unlink.
  </Step>

  <Step title="Confirm">
    Click **Unlink projects** and confirm.
  </Step>
</Steps>

When unlinked, those projects will no longer have access to {connector_0} through this connection. If a project needs {connector_0} again, you can link it to any available connection.

## How to delete a {connector_0} connection

Workspace admins and owners can delete {connector_0} connections.

<Warning>
  Deleting a connection is permanent and cannot be undone. It will remove the credentials from all linked projects, and any apps using this connection will stop working until a new connection is added.
</Warning>

Before deleting, review the **Linked projects** section to see which projects are currently using the connection.

To delete a connection:

<Steps>
  <Step title="Open Connectors">
    Open **Connectors**, then go to **App connectors**, and select **{connector_0}**.
  </Step>

  <Step title="Open the connection">
    Open the connection you want to remove.
  </Step>

  <Step title="Review linked projects">
    Review the **Linked projects** section.
  </Step>

  <Step title="Delete">
    Under **Delete this connection**, click **Delete** and confirm.
  </Step>
</Steps>
