Example
Validation
The runtime validates the whole file at startup and exits with a non-zero code on any error. It never starts with a partially valid configuration.- Unknown keys are rejected, so a misspelled key such as
max_sample_row_returnedfails startup. It is not silently ignored. - Numeric values outside their allowed range are rejected. The runtime does not clamp them.
- Error messages name the invalid field.
Environment variables
Any string value can reference environment variables with${VAR} syntax. Substitution runs before validation and applies to values only, not keys.
Secrets
Every secret field accepts either an inline value or a path to a file that holds the value. Add_file to the key to read the value from a file, for example password_file instead of password.
- Setting both
passwordandpassword_fileis a validation error. - The file is read as UTF-8, and leading and trailing whitespace is stripped. An empty file is rejected.
- Secret values are held in memory only. They are never written to logs or telemetry, or sent to Elementary Cloud.
Configuration reference
Top level
cloud
instance
limits
See Local limits.
concurrency
connections
Each entry needs warehouse_connection_id, the ID of the matching warehouse connection in Elementary Cloud, and type. The other fields depend on the type.
- Snowflake
- Databricks
- Postgres
- Redshift
Set exactly one of
private_key or password. Key-pair authentication requires an encrypted private key, so private_key_passphrase is mandatory with private_key.Local limits
Elementary Cloud sends a requested timeout and sample size with each task. The runtime applies the lower of the requested value and the local limit, so Cloud can tighten a limit for a single task but can never exceed the local limit.Query timeout
max_query_timeout_seconds caps how long a single query runs. The runtime sets it as a statement timeout on the warehouse session before each query, so the warehouse cancels the query when the limit is reached:
If a connection cannot enforce a statement timeout, the runtime refuses to run the query.
The session setting overrides user-level and role-level defaults for the same parameter. Snowflake is the exception: it enforces the lower of the session and warehouse
STATEMENT_TIMEOUT_IN_SECONDS, so a warehouse-level timeout acts as a hard cap.Sample rows
max_sample_rows_returned caps how many result rows leave your network per query. This is the main control over which business data reaches Elementary Cloud.
The runtime never fetches a full result. It wraps the query in a LIMIT of the sample size plus one row. If more rows exist, it runs a separate count(*) over the same query to get the total row count. Only the capped sample and the count are returned.
Result size
max_result_bytes caps the JSON-encoded size of the sample sent for one query. When the sample exceeds the cap, the runtime drops whole rows from the end until it fits. Partial rows are never sent. Independently of this setting, samples are limited to the first 1,000 columns.
Concurrency
max_concurrent_tasks caps parallel tasks on one instance. Each task runs its queries one after another, so it uses at most one warehouse session at a time. Use it to keep the runtime within warehouse concurrency and connection limits. With several replicas, the total is max_concurrent_tasks × replicas.
SQL validation
Before running any query, the runtime parses it with a SQL parser for the connection’s dialect and rejects it unless all of the following hold:- It contains exactly one statement.
- The statement is a
SELECT,WITH,UNION,INTERSECT, orEXCEPTquery. - No part of it, including subqueries and CTEs, contains
INSERT,UPDATE,DELETE,MERGE,SELECT ... INTO,CREATE,DROP,ALTER,TRUNCATE,GRANT,COPY, or any statement the parser cannot classify.
What leaves your network
The runtime sends Elementary Cloud only what it needs to report the result of each task.
Runtime logs never contain task SQL text, row values, or credentials.
Query auditing
Every query the runtime runs is tagged with SQL comments, so you can find and attribute it in your warehouse query history:elementary_cloud_test_id is added to queries that run a test. Elementary Cloud can add more tags in the same format. Snowflake sessions also report elementary as the client application.
Database roles
The warehouse role is the main security boundary. Give the runtime its own user and role, with read-only access to only the data it needs to test. Use separate connections, each with its own role, to keep data domains apart.- Snowflake
- Databricks
- Postgres
- Redshift
- Snowflake enforces the lower of the session and warehouse statement timeouts, so the warehouse setting caps queries even if the runtime configuration changes.
- Masking policies and row access policies apply to the runtime role like any other role. Use them to hide sensitive columns and rows from samples.
- Attach a network policy to the user to accept logins only from the runtime’s egress IPs.
- Add a resource monitor on the warehouse to cap credit usage.

