Skip to content

Commit

Permalink
Cleaning up our Snowflake documentation and adding more details / pre…
Browse files Browse the repository at this point in the history
…ttifying it (#3683)
  • Loading branch information
AndrewRTsao authored Dec 12, 2023
1 parent edd0ac7 commit 108f263
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
26 changes: 18 additions & 8 deletions docs/docs/deploy/credentials/snowflake.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,28 @@ How you configure access to Snowflake depends on whether you are developing a pr

### Configure credentials for local development

When developing a project locally, Rill uses the credentials passed via a source config `dsn` (Snowflake connection string) field or via `--env connector.snowflake.dsn=...` while running `rill start`.
Rill uses the following [format](https://pkg.go.dev/github.com/snowflakedb/gosnowflake#hdr-Connection_String) of Snowflake connection string:
```
my_user_name:my_password@ac123456/my_database/my_schema?warehouse=my_warehouse&role=my_user_role
When developing a project locally, Rill will use the credentials passed via the Snowflake connection string as defined in the `dsn` property in the [source config](../../reference/project-files/sources.md#properties) or via `--env connector.snowflake.dsn=...` while running `rill start` from the CLI. Rill uses the following [syntax](https://pkg.go.dev/github.com/snowflakedb/gosnowflake#hdr-Connection_String) when defining the Snowflake connection string:
```sql
<username>:<password>@<account_identifier>/<database>/<schema>?warehouse=<warehouse>&role=<role>
```

### Configure credentials for deployments on Rill Cloud
![Retrieving Snowflake connection parameters](/img/deploy/credentials/snowflake_conn_strings.png)

:::tip

Similarly to the local development, when deploying a project to Rill Cloud, credentials might be passed via Snowflake connection string as a source config `dsn` field.
To determine your [Snowflake account identifier](https://docs.snowflake.com/en/user-guide/admin-account-identifier), one easy way would be to check your Snowflake account URL and the account identifier to use in your connection string should be everything before `.snowflakecomputing.com`!

Alternatively, you can pass/update the credentials used by Rill Cloud by running:
:::

### Configure credentials for deployments on Rill Cloud

Similar to the local development workflow, when deploying a project to Rill Cloud, credentials can be passed via Snowflake connection string as a source configuration `dsn` field or by passing / updating the credentials directly used by Rill Cloud by running:
```
rill env configure
```
Note that you must `cd` into the Git repository that your project was deployed from before running `rill env configure`.

:::info

Note that you must first `cd` into the Git repository that your project was deployed from before running `rill env configure`.

:::
2 changes: 1 addition & 1 deletion docs/docs/reference/project-files/sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@ duckdb:
columns: "columns={'FlightDate': 'DATE', 'UniqueCarrier': 'VARCHAR', 'OriginCityName': 'VARCHAR', 'DestCityName': 'VARCHAR'}"
```
**`dsn`** - Optionally set Snowflake connection string. Refer Snowflake [docs](https://pkg.go.dev/github.com/snowflakedb/gosnowflake#hdr-Connection_String) for format
**`dsn`** - Optionally sets the Snowflake connection string. For more information, refer to our [Snowflake page](../../deploy/credentials/snowflake.md) and the official [Go Snowflake Driver](https://pkg.go.dev/github.com/snowflakedb/gosnowflake#hdr-Connection_String) documentation for the correct syntax to use.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 108f263

Please sign in to comment.