tabular-query
The tabular-query transform loads one tabular parent output into an in-memory SQLite table, runs one or more SELECT queries from configuration, and returns a JSON object of result tables under tables.
When to use it
Use tabular-query when you need SQL filtering, grouping, or joins-on-one-table over CSV/TSV without exporting data outside HEAT. Downstream nodes such as tabular-to-dataservice can consume tables when inputFormat is json.
Limitations
- Single tabular input only (one loaded table; no automatic multi-file joins).
- The full file is held in memory: suited to small and medium tables, not multi-GB raw logs.
- Each query must be a single SELECT; all CSV columns are stored as TEXT (use
CASTin SQL for numeric logic). - Optional
captured_at/elapsed_mshelpers requiretimeColumn,timeColumnIsMs: true, and a validbaseCapturedAt.
Configuration (summary)
| Property | Required | Description |
|---|---|---|
queries | yes | Map of name → SQL string; each result becomes tables[name] |
inputFormat | no | auto, csv, or tsv (default auto) |
tableName | no | SQLite table alias (default t) |
timeColumn | no | Column for elapsed ms or ISO8601 |
timeColumnIsMs | no | Default true |
baseCapturedAt | no | ISO8601 base when timeColumnIsMs is true |
Example
{
"inputFormat": "auto",
"tableName": "t",
"queries": {
"fast_rows": "SELECT time_ms, speed_mps FROM t WHERE CAST(speed_mps AS REAL) > 10.0 ORDER BY CAST(time_ms AS INTEGER)"
}
}Output shape
{
"tables": {
"fast_rows": {
"columns": ["time_ms", "speed_mps"],
"rows": [{ "time_ms": "1000", "speed_mps": "12.5" }]
}
}
}