Query topic messages with SQL
query_messagesRun read-only SQL queries over a single topic to filter, aggregate, downsample, and retrieve event evidence from physical-world data. Returns rows as dictionaries for analysis.
Instructions
Answer quantitative questions with read-only DuckDB SQL over one topic: filtering, aggregates, downsampling, and event evidence. Call describe_data_source and describe_topic first; use the returned schema and show the SQL to the user. Returns rows as dictionaries. Use read_loggings for textual diagnostics. Time bounds are inclusive source timestamps in seconds, not offsets from the first message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | ||
| path | Yes | ||
| topic | Yes | ||
| end_seconds | No | ||
| sql_statement | Yes | ||
| start_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |