# Snowflake

### How can I connect Snowflake to Relay.app?

* In a SQL file, create a new security integration by running the following

```
CREATE OR REPLACE SECURITY INTEGRATION relay_app_integration
  TYPE = OAUTH
  ENABLED = TRUE
  OAUTH_CLIENT = CUSTOM
  OAUTH_CLIENT_TYPE = 'CONFIDENTIAL'
  OAUTH_REDIRECT_URI = 'https://run.relay.app/connect/callback/snowflake'
  OAUTH_ISSUE_REFRESH_TOKENS = TRUE
  OAUTH_SINGLE_USE_REFRESH_TOKENS_REQUIRED = TRUE
  OAUTH_REFRESH_TOKEN_VALIDITY = 7776000;
```

* Run the following to reveal the Oauth secrets which Relay.app will need to connect

```
SELECT SYSTEM$SHOW_OAUTH_CLIENT_SECRETS('RELAY_APP_INTEGRATION');
```

Finally, retrieve the instance URL from the 'accounts' settings page:

<figure><img src="/files/Ha0crtKBzoyQ8J1QFhck" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/F90Ahdr7OYow3Bn1gXMn" alt=""><figcaption></figcaption></figure>

* Finally, enter these pieces of information into the Relay.app connection dialog and click **connect**


---

# Agent Instructions: 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:

```
GET https://docs.relay.app/app-specific-faqs/snowflake.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
