Execution types

A tile's exec.type controls how it gets data. There are three: athena, cache, and lambda.

athena

Runs an Athena SQL query. query is required.

json
{
  "exec": { "type": "athena", "database": "analytics", "async": true },
  "query": { "sql": "SELECT region, revenue FROM sales", "params": {} }
}
FieldDescription
databaseAthena database to query.
asyncIf true, run through the async runner (see below).
workgroupOptional governed workgroup override.
output_prefixOptional cache/output prefix.

Sync vs async. A synchronous Athena tile runs the query inline and returns a dataframe. An async tile ("async": true) hands the query to the async Athena runner, which writes a parquet result to S3 and reports status; the tile loads the artifact when it's ready. Async keeps dashboards responsive for slower queries.

Caution
Async execution currently supports Athena only, and produces a parquet dataframe artifact (result_kind: dataframe, result_format: parquet). Other async result shapes are not yet supported.

cache

Reads a precomputed object directly from S3 — no query. Use it for expensive results you've already materialized.

json
{ "exec": { "type": "cache", "cache_s3_uri": "s3://bucket/path/result.parquet" } }

The object's extension determines how it loads: .parquet/.csv as dataframes, .json, .md, .html, or an image.

lambda

Invokes a registered module Lambda. module_id and lambda_index are required; StrataBI resolves them to a concrete Lambda through the module registry.

json
{ "exec": { "type": "lambda", "module_id": "sales_demo", "lambda_index": 0 } }

See Modules for the module Lambda contract.

Result contract

Every execution produces a result with a kind, a format, and a name. StrataBI infers these from the block type — a table expects a dataframe/parquet, a markdown block an md artifact, and so on — and you can override them on exec (result_kind, result_format, result_name) when needed.