Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions workflow/preview-projects.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

### Pull Requests (GitHub Actions)

You can automatically create preview projects in GitHub each time you open a pull request. This allows you to easily test out changes you've made to your dbt project, in Lightdash.

Check warning on line 70 in workflow/preview-projects.mdx

View workflow job for this annotation

GitHub Actions / Validate documentation

prose.filler-word

"easily" claims ease or quality — cut it, or say what the reader does.

Learn more about setting up a Lightdash preview project for pull requests using GitHub Actions [here](/workflow/set-up-ci-cd#add-previews-to-pull-requests).

Expand Down Expand Up @@ -161,6 +161,25 @@

Queries in the preview stop working when temporary credentials expire; refresh them and run `lightdash preview` again. If the target has no keys, the preview uses IAM role authentication, which runs as the Lightdash server's own AWS identity rather than yours. To use the upstream project's saved connection instead, pass `--no-warehouse-credentials`.

### Snowflake with `authenticator: oauth`

If your dbt Snowflake profile sets `authenticator: oauth` with an OAuth access token in `token`, `lightdash preview`, `lightdash compile` and `lightdash deploy` use that token for the warehouse catalog lookup. `user` is optional with this authenticator. The CLI doesn't send the profile's `role`, so the session uses the role the token was issued for.

```yaml
dev:
type: snowflake
account: abc123
authenticator: oauth
token: "{{ env_var('SNOWFLAKE_OAUTH_TOKEN') }}"
database: ANALYTICS
warehouse: TRANSFORMING
schema: dbt_me
```

The access token expires, so Lightdash never stores it on the project. If your instance has [Sign in with Snowflake](/integrations/connect-project#sign-in-with-snowflake) turned on, the project or preview is created to ask each user to sign in with Snowflake in Lightdash. If it doesn't, the CLI warns and creates it without warehouse credentials, as with `--no-warehouse-credentials`. In that case, re-running `lightdash start-preview` on an existing preview, or running `lightdash set-warehouse`, leaves the stored credentials unchanged.

The refresh-token form of Snowflake OAuth, where the profile also sets `oauth_client_id` and `oauth_client_secret`, isn't supported, because the CLI doesn't exchange the refresh token. The CLI also stops with an error when `authenticator: oauth` has no `token`, or when another authenticator has no password or private key. To continue without a warehouse connection, pass `--skip-warehouse-catalog`. When `lightdash deploy` creates a project, also pass `--no-warehouse-credentials`.

## Permissions

### Permissions are copied from the parent project
Expand Down