Expand description
Table and TableEngine requests
Modules§
- semantic 🔒
- Table semantic layer vocabulary.
Structs§
- AddColumn
Request - Add column request
- Alter
Table Request - Alter table request
- Annotation
Context - Table shape an annotation option is validated against.
- Build
Index Table Request - Compact
Table Request - Copy
Database Request - Copy
Query ToRequest - Copy
Table Request - Copy table request
- Delete
Request - Delete (by primary key) request
- Flush
Table Request - Insert
Request - Modify
Column Type Request - Change column datatype request
- SetDefault
Request - Table
Options - Truncate
Table Request - Truncate table request
Enums§
- Alter
Kind - Annotation
Family - A family of annotation table options: pure metadata markers that no region
consumes. Setting or unsetting them only rewrites the table’s
extra_options, so the alter skips region dispatch entirely. - Annotation
Validation Error - Why an annotation option was rejected. Typed so each DDL entry point maps
rules onto its existing error variants and status codes: ALTER keeps
missing columns as
TableColumnNotFound(4002), CREATE keeps itsInvalidArgumentsfamily — the rules converge, the contracts do not. - Copy
Direction - Entity
Role - The role a set of columns plays for an entity:
id(identifying attributes),descriptive, orscope. Columns may be tags or fields; DDL validation only requires that they exist and render as stable strings (has_stable_string_form). - SetIndex
Option - Unset
Index Option
Constants§
- AUTO_
CREATE_ TABLE_ KEY - COMMENT_
KEY - DDL_
TIMEOUT - DDL_
WAIT - FILE_
TABLE_ FORMAT_ KEY - FILE_
TABLE_ LOCATION_ KEY - FILE_
TABLE_ META_ KEY - FILE_
TABLE_ PATTERN_ KEY - METADATA_
QUALITY_ DECLARED - METADATA_
QUALITY_ INFERRED - OTLP_
METRIC_ COMPAT_ KEY - OTLP_
METRIC_ COMPAT_ PROM - REPARTITION_
COLUMN_ HINT_ KEY - SEMANTIC_
ENTITY_ PREFIX - Reserved prefix for the entity-identity sub-namespace:
greptime.semantic.entity.<type>.{id|descriptive|scope}. Unlike the rest of the vocabulary (a closed whitelist), entity types are open-ended (service,host,k8s.pod,process,agent, custom, …), so keys here are validated by prefix + shape rather than membership. Seedocs/rfcs/2026-06-25-entity-relationships-and-graph-query.md. - SEMANTIC_
ENTITY_ SERVICE_ ID - The well-known entity-identity key auto-stamped on OTLP trace tables; its value
is the
service_nametag column, declaring the logicalserviceentity. - 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_
SOURCE_ VERSION - Source protocol version, e.g. Prometheus remote write
1.0/2.0. - 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 - SKIP_
WAL_ KEY - SOURCE_
ELASTICSEARCH - SOURCE_
INFLUXDB - SOURCE_
LOKI - SOURCE_
OPENTELEMETRY - SOURCE_
OPENTSDB - SOURCE_
PROMETHEUS - STORAGE_
KEY - TABLE_
DATA_ MODEL - TABLE_
DATA_ MODEL_ TRACE_ V1 - TRACE_
TABLE_ PARTITIONS_ HINT_ KEY - TTL_KEY
- VALID_
DDL_ OPTION_ KEYS - VALID_
TABLE_ OPTION_ KEYS - WRITE_
BUFFER_ SIZE_ KEY
Statics§
Functions§
- has_
stable_ string_ form - Returns true if a column of
data_typerenders as a stable string — the requirement for entity id/descriptive/scope columns. The read-time derivation casts them to strings, so a type without a stable string form would fail only when the graph is scanned; DDL validation rejects it up front instead. - is_
entity_ option_ key - Returns true if
keyis a well-formed entity-identity option key. - is_
semantic_ option_ key - Returns true if
keyis a recognised semantic table-option key. - is_
trace_ v1_ table - Returns true if the table stores spans in the
greptime_trace_v1data model (fixed span columns), the shape the Jaeger query path and the entity-graph derivation rely on. - parse_
entity_ columns - Tokenizes an entity option’s comma-separated column list (trimmed, empty
tokens dropped).
validate_semantic_optionrejects empty tokens at DDL time, so readers only ever drop what validation already refused. - parse_
entity_ option_ key - Parses a well-formed entity-identity option key of the shape
greptime.semantic.entity.<type>.{id|descriptive|scope}into(entity_type, role). The<type>may itself contain dots; the role is the final dot-separated segment. This is the single parser of the key format — DDL validation and the read-time derivation both go through it. - validate_
and_ 🔒normalize_ annotation - Validates one annotation option and returns the value to store — the repartition hint is trimmed to the bare column name, semantic values pass through unchanged.
- validate_
and_ normalize_ annotation_ options - CREATE-side entry: validates every annotation option present in
optionsand writes normalized values back in place. - validate_
database_ option - Returns true if the
keyis a valid key for database. - validate_
semantic_ option - Validates a
greptime.semantic.*option’svalueagainst its allowed domain. - validate_
table_ option - Returns true if the
keyis a valid key for any engine or storage.