REASONER_USAGE()
relationalai.observability_preview
REASONER_USAGE(START_TS TIMESTAMP_NTZ, END_TS TIMESTAMP_NTZ DEFAULT NULL)A preview table function that estimates Snowflake credits and RelationalAI units used by each reasoner in the selected time window. It applies hourly rates for each instance family to the observed run durations. These estimates are not billing records.
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 in the selected time window:
| Column | Type | Description |
|---|---|---|
REASONER_ID | STRING | Reasoner identifier from the event attributes. |
REASONER_NAME | STRING | Reasoner name from the event attributes. |
REASONER_TYPE | STRING | Reasoner type from the event attributes; may be NULL if it is not present in the telemetry. |
START_TIMESTAMP | TIMESTAMP_NTZ | Earliest metric timestamp observed for the reasoner in the window, in UTC. |
END_TIMESTAMP | TIMESTAMP_NTZ | Latest metric timestamp observed for the reasoner in the window, in UTC. |
SNOWFLAKE_CREDITS | NUMBER(38,8) | Estimated Snowflake credits, calculated from observed run durations and instance-family rates. |
RAI_UNITS | NUMBER(38,8) | Estimated RelationalAI units, calculated from observed run durations and instance-family rates. |
Example
Section titled “Example”Estimate usage between two UTC timestamps:
SELECT *FROM TABLE( relationalai.observability_preview.REASONER_USAGE( '2026-11-01 00:00:00'::TIMESTAMP_NTZ, '2026-11-02 00:00:00'::TIMESTAMP_NTZ ))ORDER BY START_TIMESTAMP DESC;- The function uses hourly rates keyed by
INSTANCE_FAMILY. Runs on instance families without a matching rate contribute nothing, so estimates may be incomplete orNULLif no runs have a matching rate. - The result aggregates the runs for each reasoner in the selected window. Its timestamps show the earliest and latest observed metric timestamps for those runs.