# irrigate-snowflake-cookbook

This cookbook configures various clients to interact with Snowflake.

## Supported Platforms

Red Hat 7+
CentOS 7+

## Usage

### irrigate-snowflake::odbc
There are no requisite data bags or sensitive configuration. Simply include the recipe.

Include `irrigate-snowflake` in your node's `run_list`:

```json
{
  "run_list": [
    "recipe[irrigate-snowflake::odbc]"
  ]
}
```

### irrigate-snowflake::cli
This recipe will install and configure the cli with an arbitrary number of named configuration files. 

For each connection, specify a data bag containing the username and password, as well as other required connection parameters. 

Optionally also specify options and variables that will span all configuration files.

Example snippet:
```json
{
  "snowflake": {
    "cli": {
      "connections": {
        "qa": {
          "credentials_data_bag_name": "snowflake_cli_qa_credentials",
          "accountname": "orchard",
          "dbname": "some_db",
          "rolename": "some_role",
          "schemaname": "some_schema",
          "warehousename": "some_warehouse"
        },
        "prod": {
          "credentials_data_bag_name": "snowflake_cli_prod_credentials",
          "accountname": "orchard",
          "dbname": "some_db",
          "rolename": "some_role",
          "schemaname": "some_schema",
          "warehousename": "some_warehouse"
        }
      },
      "options": {
        "auto_completion": "True",
        "key_bindings": "vi"
      },
      "variables": {
        "autocommit": "On"
      }
    }
  }
}
```

Include `irrigate-snowflake` in your node's `run_list`:

```json
{
  "run_list": [
    "recipe[irrigate-snowflake::cli]"
  ]
}
```

