REASONER_RUN_DURATION()
relationalai.observability_preview
REASONER_RUN_DURATION(START_TS TIMESTAMP_NTZ, END_TS TIMESTAMP_NTZ DEFAULT NULL)A preview table function that returns one row for each reasoner run with telemetry in the selected time window. The duration is based on the first and last metric observed in that window, not a billing record.
Before querying, enable app observability and use an active Snowflake warehouse. Requires the observability_viewer or observability_admin application role.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
START_TS | TIMESTAMP_NTZ | Required start of the time window, inclusive. Use a UTC timestamp. |
END_TS | TIMESTAMP_NTZ | Optional end of the time window, exclusive. Defaults to NULL, which includes all matching telemetry from START_TS onward. |
Returns
Section titled “Returns”One row per reasoner run observed in the selected time window:
| Column | Type | Description |
|---|---|---|
REASONER_NAME | STRING | Reasoner name from the event attributes. |
REASONER_ID | STRING | Reasoner identifier from the event attributes. |
REASONER_TYPE | STRING | Reasoner type from the event attributes; may be NULL if it is not present in the telemetry. |
COMPUTE_POOL_NAME | STRING | Compute pool name, or NULL if the registered events view does not include this optional column. |
INSTANCE_FAMILY | STRING | Instance family, or NULL if the registered events view does not include this optional column. |
START_TIMESTAMP | TIMESTAMP_NTZ | First metric timestamp observed for the run within the requested window, in UTC. |
END_TIMESTAMP | TIMESTAMP_NTZ | Last metric timestamp observed for the run within the requested window, in UTC. |
DURATION_SECONDS | NUMBER | Whole seconds between the first and last metric timestamps observed in the window. |
Example
Section titled “Example”Get the observed duration of reasoner runs between two UTC timestamps:
SELECT *FROM TABLE( relationalai.observability_preview.REASONER_RUN_DURATION( '2026-11-01 00:00:00'::TIMESTAMP_NTZ, '2026-11-02 00:00:00'::TIMESTAMP_NTZ ))ORDER BY START_TIMESTAMP DESC;- The function includes telemetry with a metric name and a
rai.engine_run_idevent attribute. Runs without these values are not returned. - If a run crosses a requested time-window boundary, its returned timestamps and duration include only metrics observed inside the window.