Skip to main content
Elementary Runtime is in private beta. Reach out to the team to learn more.
Elementary Runtime reads a single versioned YAML file at startup. The file defines how the runtime reaches Elementary Cloud, the local limits that cap what every task can do, and the warehouse connections the runtime is allowed to use. Only this file decides which warehouses the runtime can query and which credentials it uses. Elementary Cloud can only send tasks to connections defined here. It cannot add connections, change credentials, or raise local limits.

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_returned fails 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.
Configuration and secret files are read once, at startup. Restart the runtime to apply changes or rotated credentials.

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 password and password_file is 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.
Use _file keys for every secret in production. Inline values, including ${VAR} references to environment variables, are visible to anyone who can read the configuration file or inspect the process environment.
Mount secret files read-only and readable only by the runtime user, for example from a Kubernetes Secret, Docker secret, or your secret manager’s file-based integration. See Deployment. The secret fields are:

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.
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.
Set max_sample_rows_returned: 0 to keep all row values inside your network. The runtime then runs only a count(*) over the query, and Elementary Cloud receives the row count with no sample. Tests that pass or fail on row count keep working. Failed-row samples are not shown in Elementary Cloud.

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, or EXCEPT query.
  • 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.
Rejected queries are never sent to the warehouse. The task fails with a validation error.
SQL validation is a second line of defense, not a replacement for warehouse permissions. Always run the runtime with a read-only role scoped to the data it needs to test. See Database roles.

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 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.
For environments where no business data may leave the network, combine a read-only scoped role with these limits:
Elementary Cloud then receives only the test status and row count for each query, plus connection health and redacted error messages.