207.3.2 PROMQL_LABELS Function
This function enables users to query data from an Oracle AI Database Telemetry Streaming workspace to fetch all the labels (key-value pairs) from a metric key or metric name.
The PROMQL_LABELS
function returns a CLOB for distinct
values that a particular metric key or metric name can take.
Syntax
PROMQL_LABELS(
promql_query IN VARCHAR2,
start_time_epoch IN NUMBER,
end_time_epoch IN NUMBER,
fetch_sql IN NUMBER DEFAULT 0)
return clob;
Parameters
Table 207-3 PROMQL_LABELS Function Parameters
Parameter | Description |
---|---|
promql_query |
The PromQL query from the user |
start_time_epoch |
The start time of the time range in which the query is interested |
end_time_epoch |
The end time of the query |
step_size_seconds |
Resolution size of the query. The output data points
are (usually) |
fetch_sql |
Result desired by the client. (set it to 1 if you want SQL, and set it to 2 for JSON) |
Note:
The start_time_epoch
and end_time_epoch
can be
set to zero(0), in which case the data from the last-hour time series table is
fetched.