구문
인수
db_name- TimeSeries 테이블이 있는 데이터베이스 이름입니다.time_series_table- TimeSeries 테이블 이름입니다.promql_query- PromQL 구문으로 작성한 쿼리입니다.start_time- 평가 범위의 시작 시간입니다.end_time- 평가 범위의 종료 시간입니다.step-start_time부터end_time까지(양 끝 포함) 평가 시간을 순회할 때 사용하는 간격입니다.
반환 값
promql_query에 전달된 쿼리의 결과 유형에 따라 서로 다른 컬럼을 반환할 수 있습니다.
| 결과 유형 | 결과 컬럼 | 예시 |
|---|---|---|
| vector | tags Array(Tuple(String, String)), timestamp TimestampType, value ValueType | prometheusQuery(mytable, ‘up’) |
| matrix | tags Array(Tuple(String, String)), time_series Array(Tuple(TimestampType, ValueType)) | prometheusQuery(mytable, ‘up[1m]‘) |
| scalar | scalar ValueType | prometheusQuery(mytable, ‘1h30m’) |
| string | string String | prometheusQuery(mytable, ‘“abc”‘) |