Skip to main content
If you have an Evidence Studio account, you don’t need a connection.yaml. Run evidence login and the CLI uses the same data connection as your Studio organization.
This works whether your organization uses the Evidence Warehouse or a direct connection to a warehouse you own (Snowflake, BigQuery, and so on). Queries run through Evidence Studio, so they use the connection, credentials, and access rules your organization has already set up.

When to use connection.yaml instead

Add a connection.yaml to your project root only if you need one of these:
  • No Evidence Studio account. For example, you self-host Evidence.
  • Different credentials. For example, a development database or your own warehouse role instead of your organization’s.
  • Offline work. The CLI queries your warehouse directly from your machine, without going through Evidence Studio.
If a connection.yaml is present, the CLI always uses it, even when you’re logged in and your organization has a connection. If the file is invalid, queries fail with its error; the CLI does not fall back to your organization’s connection. To use your organization’s connection, delete the file.

Scaffold with evidence init

The quickest way to create a connection.yaml is to pass --warehouse to evidence init:
This writes a connection.yaml in the project root pre-filled with placeholder values, and adds it to .gitignore (the file holds credentials — keep it out of version control).
connection.yaml and any files it references — the Snowflake private-key .pem or the BigQuery service-account JSON — contain credentials. Never commit them. evidence init --warehouse gitignores connection.yaml for you, but not the referenced key files: add those to .gitignore yourself, or use the inline private_key / keyfile_json fields so there’s no separate file to leak.
Fill in the placeholders with your own connection details. If --warehouse is omitted, no connection.yaml is written and the project uses your Evidence Studio organization’s connection after evidence login.

Configuration

Provide exactly one of password, private_key, or private_key_path. Paths (private_key_path) are resolved relative to connection.yaml.See the Snowflake direct connector for the full field reference and how to create a read-only Snowflake user.