Expand description
Table semantic layer vocabulary.
A thin layer of semantic metadata attached to a table via table_options, so
machine consumers (LLM agents, alert/dashboard builders, MCP servers, ETL) can
align a table with the observability concept it stands for without guessing
from column names. See docs/rfcs/2026-05-28-table-semantic-layer.md.
The vocabulary is intentionally small: a key earns its place only when it records something a consumer cannot cheaply and reliably recover from the schema/data itself. Keys whose value is already in the metric name by convention, is a constant, or duplicates an existing column are deliberately omitted rather than stamped for completeness.
All public keys share the SEMANTIC_PREFIX namespace and are string-valued.
is_semantic_option_key gates them through
crate::requests::validate_table_option, so they are accepted both on the
ingestion auto-create path and on explicit CREATE TABLE ... WITH (...) DDL.
Constants§
- METADATA_
QUALITY_ DECLARED - METADATA_
QUALITY_ INFERRED - SEMANTIC_
METRIC_ METADATA_ QUALITY METADATA_QUALITY_DECLAREDwhen the protocol stated the type, orMETADATA_QUALITY_INFERREDwhen guessed from a name suffix.- SEMANTIC_
METRIC_ ORIGINAL_ NAME - Pre-translation OTel name when the table name was Prometheus-ised; the key a consumer uses to look the metric up in the OTel semantic conventions.
- SEMANTIC_
METRIC_ TEMPORALITY cumulative/delta(OTel only). Invisible in the metric name, so it is unrecoverable from the table alone.- SEMANTIC_
METRIC_ TYPE - Instrument kind:
counter/gauge/histogram/summary/updown_counter/gauge_histogram/info/stateset. - SEMANTIC_
METRIC_ UNIT - UCUM unit, e.g.
s,By,{request}. Discarded by the row encoders, so it is unrecoverable once ingested. - SEMANTIC_
OPTION_ KEYS - Every recognised public semantic table-option key. The set is a closed
whitelist: keys under
SEMANTIC_PREFIXthat are not listed here are rejected, so an unknown key likegreptime.semantic.unknown_keydoes not silently land in a table’s options. Adding a key to the vocabulary means adding it here. - SEMANTIC_
PER_ TABLE_ INDEX_ KEY - Internal
QueryContextextension key carrying the per-table semantic index (a{table_name -> {semantic_key: value}}JSON blob) from the ingestion encode path to the auto-create site. Deliberately OUTSIDESEMANTIC_PREFIXso it is not a valid table option and never leaks into a table’s options. - SEMANTIC_
PIPELINE - Internal ingestion pipeline / data model, e.g.
greptime_trace_v1. The signal-agnostic successor to the engine-specifictable_data_modeloption. - SEMANTIC_
PREFIX - Reserved prefix for every public semantic table-option key.
- SEMANTIC_
SIGNAL_ TYPE - Signal kind: one of
SIGNAL_TYPE_TRACE/SIGNAL_TYPE_LOG/SIGNAL_TYPE_METRIC/SIGNAL_TYPE_EVENT. - SEMANTIC_
SOURCE - Ingestion ecosystem, e.g.
SOURCE_OPENTELEMETRY/SOURCE_PROMETHEUS. - SEMANTIC_
TRACE_ CONVENTIONS - Semantic-conventions version the rows conform to (e.g. the OTel schema URL),
or
SEMANTIC_VALUE_UNKNOWN/SEMANTIC_VALUE_MIXEDwhen not single-valued. - SEMANTIC_
VALUE_ MIXED - Sentinel for a single-valued key that saw conflicting sources.
- SEMANTIC_
VALUE_ UNKNOWN - Sentinel for a key that cannot be determined at stamp time.
- SIGNAL_
TYPE_ EVENT - SIGNAL_
TYPE_ LOG - SIGNAL_
TYPE_ METRIC - SIGNAL_
TYPE_ TRACE - SOURCE_
ELASTICSEARCH - SOURCE_
INFLUXDB - SOURCE_
LOKI - SOURCE_
OPENTELEMETRY - SOURCE_
OPENTSDB - SOURCE_
PROMETHEUS
Functions§
- is_
semantic_ option_ key - Returns true if
keyis a recognised semantic table-option key (whitelist). - validate_
semantic_ option - Validates a
greptime.semantic.*option’svalueagainst its allowed domain.