roboto.experimental.ingest.schema#
Module Contents#
- class roboto.experimental.ingest.schema.Field(/, **data)#
Bases:
pydantic.BaseModelOne column of a topic’s data, identified by name, type, and unit.
pathlists the names from the schema root down to this field, so a nested field’s path extends its parent’s.nameandpathstate one fact twice (the last path element is the field’s name), so either may be omitted and derives from the other: a top-level field needs onlyname, and a nested field needs onlypath. A vector column (e.g. a LeRobotobservation.statefeature) is expressed as a parent field holding the array plus one child field per named element.This is what a caller declares.
SchemaFieldRecordis what the platform returns for a field it has stored, and carries the identifiers it assigns.- Parameters:
data (Any)
- canonical_data_type: roboto.domain.topics.record.CanonicalDataType#
Roboto’s normalized type for the field, used for cross-format reads and visualization.
- data_type: str = None#
Native type of the field as recorded by the source format (e.g.
"float32").
- model_config#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str = ''#
Name of the field. Defaults to the last element of
pathwhen onlypathis given; at least one ofnameandpathmust be declared.
- path: list[str] = None#
The names from the schema root down to this field; a nested field’s path extends its parent’s path. Omitted,
None, or empty defaults to[name]; when given, every element must be non-empty and the last element must equalname.
- class roboto.experimental.ingest.schema.Schema(/, **data)#
Bases:
pydantic.BaseModelThe structure of one topic’s data: the columns it carries.
However a schema is produced, whether hand-written field by field or converted from a source format’s own metadata, the registered result is the same: schemas are content-addressed server-side. Identity covers every attribute of every field (name, path, source data type, canonical type, and unit), so identical declarations collapse to a single stored schema no matter how many times they are repeated, while declarations differing in any field attribute are stored separately.
A column a timeline source reads is declared by typing it
Timestampwith aTimeUnitunit; nothing else marks it. Which of a topic’s timeline sources reads fall back to is not part of the schema: it is stated ontimeline_sourcesand can be changed later, so the same columns are one schema no matter which source is preferred.This is what a caller declares, so it carries no checksum: the platform computes that from the fields.
TopicSchemaRecordis the stored schema the platform returns, carrying that checksum and the identifiers it assigns.- Parameters:
data (Any)
- fields: list[Field] = None#
Declared columns of the topic’s data. At least one is required, and every field’s path must be unique within the schema.
- model_config#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str | None = None#
Informational label for the schema (often the topic name). Not part of schema identity.