Quickstart
This walks through the smallest useful StrataBI dashboard: a dropdown that drives an Athena-backed table and chart. It assumes the runtime is already deployed in your account (see Deploy).
1. Write a dashboard
A dashboard needs a name and a layout of tiles. Here a dropdown writes an input value that two downstream tiles consume through a SQL parameter:
{
"name": "Sales by Region",
"layout": [
{
"id": "region_input",
"position": { "row": 0, "order": 0, "width": 3 },
"block": {
"type": "input_select",
"config": {
"input_id": "region",
"options": [
{ "label": "North", "value": "north" },
{ "label": "South", "value": "south" }
],
"value": "north"
}
}
},
{
"id": "sales",
"position": { "row": 0, "order": 1, "width": 9 },
"triggered_by": ["region_input"],
"load": { "mode": "input" },
"exec": { "type": "athena", "database": "analytics", "async": true },
"query": {
"sql": "SELECT region, month, revenue FROM sales WHERE region = :region ORDER BY month",
"params": { "region": "region" }
},
"block": { "type": "table", "config": { "page_size": 25 } }
}
]
}2. What's happening
- The
input_selecttile stores its value under the input keyregion. - The
salestile'sload.modeisinput, andtriggered_bylists
region_input — so it re-runs whenever that input changes.
query.paramsmaps the SQL token:regionto the input keyregion. StrataBI
substitutes the value before the query runs.
exec.asyncruns the query through the async Athena runner, which writes a
parquet result to S3 and reports status; the table loads it when ready.
3. Add a run button
Give a tile a manual run control by enabling controls.run_button. It renders a ▷ button on the tile that triggers just that tile — handy with load.mode: "manual":
{
"id": "report",
"load": { "mode": "manual" },
"controls": { "run_button": true },
"exec": { "type": "athena", "database": "analytics", "async": true },
"query": { "sql": "SELECT * FROM monthly_report" },
"block": { "type": "table", "config": {} }
}Tip
Validate any dashboard against the published schema before you save it — see Agent integration for the schema URL. Catching a typo at author time is far cheaper than debugging a blank tile.
Shaleio