# Snowflake

## Configuration

The Snowflake configurations are:

* `user`: the username to your Snowflake account
* `password`: the password to your Snowflake account
* `account`: the account name for your Snowflake account
* `role`: the desired role for the connection
* `warehouse`: the desired warehouse for the connection
* `database`: the desired database for the connection
* `schema`: the desired schema for the connection

{% code title="profile.yml" %}

```yaml
<profile name here>: # change this!
  adapters:
    <snowflake adapter name here>: # change this!
      type: snowflake
      user:
      password:
      account:
      role:
      warehouse:
      database:
      schema:

```

{% endcode %}

Under the hood, Prism takes care of parsing the configuration variables and establishing a connection to your Snowflake account.

## `hooks.sql()`

You can run queries against the Snowflake connection using the `hooks.sql` function:

```python
def run(self, tasks, hooks):
    data = hooks.sql(
        adapter_name="<snowflake adapter name>",
        query="SELECT * FROM table"
    )
```

Note that when `return_type = None`, the result will be a list tuples containing the query data.
