# Snowflake



### Overview

Setting up Snowflake for MindCloud is a straightforward process but requires careful configuration to ensure successful communication between Snowflake and MindCloud.

### Setting Up MindCloud Integration in Snowlfake

To allow MindCloud to interact with Snowflake, you must create a Custom Security Integration (you must have the `ACCOUNTADMIN` role in order to execute the following commands):

1. Create a custom Security Integration by executing the following command:

```
CREATE SECURITY INTEGRATION MINDCLOUD_INTEGRATION
  TYPE = OAUTH
  OAUTH_CLIENT = CUSTOM
  OAUTH_CLIENT_TYPE = 'CONFIDENTIAL'
  OAUTH_REDIRECT_URI = 'https://api.mindcloud.co/v1/oauth/snowflake/callback'
  ENABLED = TRUE
  OAUTH_ENFORCE_PKCE = FALSE
  OAUTH_ISSUE_REFRESH_TOKENS = TRUE
```

1. Execute the following command to see the properties of the new Security Integration:

```
DESC SECURITY INTEGRATION MINDCLOUD_INTEGRATION;
```

Take note of the following values:

- OAUTH\_CLIENT\_ID
- OAUTH\_REDIRECT\_URI
- OAUTH\_AUTHORIZATION\_ENDPOINT
- OAUTH\_TOKEN\_ENDPOINT

1. Execute the following command and take note of the Client Secrets:

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