Skip to content

Config

Both global and local config files use the same schema.

version: 2
permissions:
deny:
- "*"
allow:
- select
inspect_cache:
path: /home/you/.local/state/tonic/inspect-cache.db
ttl: 168h
snowflake:
browserauth_cache_dir: /home/you/.cache/snowflake
connections:
warehouse:
backend: snowflake
permissions:
allow:
- update
- transaction
options:
account: my-account
user: my-user
auth: browserauth
browserauth_cache: true
context:
database: ANALYTICS
schema: PUBLIC
warehouse: COMPUTE_WH
role: ANALYST
local-pg:
backend: postgres
options:
host: localhost
port: 5432
user: app
sslmode: prefer
context:
database: app_db
schema: public
secrets:
password_env: PGPASSWORD
scratch:
backend: sqlite
options:
path: ./scratch.db
aurora:
backend: mysql
options:
host: db.example.com
port: 3306
user: app
sslmode: preferred
context:
database: analytics
secrets:
password_env: MYSQL_PWD
FieldPurpose
versionConfig schema version. Current value is 2.
connectionsMap of saved target names to backend-specific connection definitions.
permissionsInherited statement allow/deny defaults.
inspect_cachePersistent inspect cache path and TTL.
snowflakeShared Snowflake runtime settings.
BackendOptionsContextSecrets
Postgreshost, port, user, sslmodedatabase, schemapassword_env
Snowflakeaccount, user, auth, browserauth_cache, private_key_pathdatabase, schema, warehouse, rolepassword_env, private_key_passphrase_env
SQLitepathnonenone
MySQLhost, port, user, sslmodedatabase; schema accepted as aliaspassword_env

Context aliases catalog and namespace are accepted where the backend maps them to database/schema concepts.

When tonic saves config, it writes with mode 0600.