Skip to content

This feature is currently in Preview.

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.

NameTypeDescription
START_TSTIMESTAMP_NTZRequired start of the time window, inclusive. Use a UTC timestamp.
END_TSTIMESTAMP_NTZOptional end of the time window, exclusive. Defaults to NULL, which includes all matching telemetry from START_TS onward.

One row per reasoner run observed in the selected time window:

ColumnTypeDescription
REASONER_NAMESTRINGReasoner name from the event attributes.
REASONER_IDSTRINGReasoner identifier from the event attributes.
REASONER_TYPESTRINGReasoner type from the event attributes; may be NULL if it is not present in the telemetry.
COMPUTE_POOL_NAMESTRINGCompute pool name, or NULL if the registered events view does not include this optional column.
INSTANCE_FAMILYSTRINGInstance family, or NULL if the registered events view does not include this optional column.
START_TIMESTAMPTIMESTAMP_NTZFirst metric timestamp observed for the run within the requested window, in UTC.
END_TIMESTAMPTIMESTAMP_NTZLast metric timestamp observed for the run within the requested window, in UTC.
DURATION_SECONDSNUMBERWhole seconds between the first and last metric timestamps observed in the window.

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_id event 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.