> This page is for Docs.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://zuora.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://zuora.ferndocs.com/_mcp/server.

# Prepare a Snowflake user and role for Mediation

> Before using Snowflake with Mediation, create a dedicated Snowflake user and assign a default role with the required privileges.

Before using Snowflake with Mediation, create a dedicated Snowflake user and assign a default role with the required privileges.

## Create a dedicated user

Create a dedicated Snowflake user for Mediation.

Example:

```
CREATE USER mediation_dev
  PASSWORD = 'password'
  MUST_CHANGE_PASSWORD = FALSE
  DEFAULT_ROLE = some_role;
```

## Required role privileges

The role assigned as **DEFAULT_ROLE** must have these privileges:

* USAGE on the storage integration created.
* USAGE on the database to be used.
* USAGE on the schema to be used.
* USAGE on the warehouse to be used.
* SELECT on the relevant tables.
* INSERT on the relevant tables.
* IMPORTED PRIVILEGES on the `SNOWFLAKE` database.

## Generate a key pair for key-pair authentication

If you plan to use key-pair authentication, generate a key pair on your machine and assign the public key to the Snowflake user.

Example:

```
# Generate private key
openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out rsa_key.p8 -nocrypt

# Generate public key
openssl rsa -in rsa_key.p8 -pubout -out rsa_key.pub
```

Update the Snowflake user with the public key.

```
ALTER USER mediation_dev SET RSA_PUBLIC_KEY = 'MIIBIjANBgkqh...';
```