Skip to Content
This documentation is provided with the HEAT environment and is relevant for this HEAT instance only.
RunnersCore Utilstabular-query

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 CAST in SQL for numeric logic).
  • Optional captured_at / elapsed_ms helpers require timeColumn, timeColumnIsMs: true, and a valid baseCapturedAt.

Configuration (summary)

PropertyRequiredDescription
queriesyesMap of name → SQL string; each result becomes tables[name]
inputFormatnoauto, csv, or tsv (default auto)
tableNamenoSQLite table alias (default t)
timeColumnnoColumn for elapsed ms or ISO8601
timeColumnIsMsnoDefault true
baseCapturedAtnoISO8601 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" }] } } }