Connection Specs¶
small-expectations supports sqlite, snowflake, and databricks.
Connection values are read from smallex.toml:
[database]
engine = "..."
[database.connection]
# backend-specific connector args
All keys under [database.connection] are passed directly to the selected Python connector.
SQLite¶
Connector module: sqlite3.connect(...)
Required keys:
database: path to.dbfile (or:memory:)
Minimal example:
[database]
engine = "sqlite"
[database.connection]
database = "example.db"
Common optional keys (passed through):
timeoutdetect_typesisolation_levelcheck_same_threaduri
URI example:
[database]
engine = "sqlite"
[database.connection]
database = "file:example.db?mode=ro"
uri = true
Snowflake¶
Connector module: snowflake.connector.connect(...)
Required keys validated by small-expectations:
accountuserpasswordwarehousedatabaseschema
Minimal example:
[database]
engine = "snowflake"
[database.connection]
account = "xy12345.eu-west-1"
user = "analytics_user"
password = "your-password"
warehouse = "COMPUTE_WH"
database = "ANALYTICS"
schema = "PUBLIC"
Common optional keys (passed through):
roleauthenticatorsession_parametersclient_session_keep_aliveapplication
Databricks¶
Connector module: databricks.sql.connect(...)
Required keys validated by small-expectations:
server_hostnamehttp_pathaccess_token
Minimal example:
[database]
engine = "databricks"
[database.connection]
server_hostname = "adb-1234567890123456.7.azuredatabricks.net"
http_path = "/sql/1.0/warehouses/abc123"
access_token = "dapi..."
Common optional keys (passed through):
catalogschemasession_configurationhttp_headers
Note: small-expectations does not expand environment variables inside TOML values by itself. If you need secret injection, generate the TOML file before running or use your CI/CD secret templating flow.
Validation errors you may see¶
Missing required fields are validated before connecting.
Example:
Backend 'snowflake' is missing required connection fields: schema
Unknown engine example:
Unsupported database engine 'postgres'. Supported: databricks, snowflake, sqlite