Skip to content

fix(schemas): serve the column vocabulary - #1127

Merged
catinspace-au merged 9 commits into
mainfrom
fix/schema-vocabulary-served
Nov 11, 2026
Merged

catinspace-au merged 9 commits into
mainfrom
fix/schema-vocabulary-served

Conversation

@catinspace-au

@catinspace-au catinspace-au commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

The console's own lists of primitives, use cases and override types drifted from dfe-schemas. The schema form offered retired use cases and had no map or vector.

  • GET /api/v1/schemas/vocabulary reads registries/types.yaml from the pinned wheel. It serves primitives, use cases (label, question, arguments, retired names), attributes, cardinalities and override types. It uses schema:read like the other schema reads.
  • cardinality has values, a default, labels and a retired attribute mapping for each value. A form can offer low and read a stored lowcardinality as low.
  • GET /api/v1/system/defaults has ttl_days.maximum, so the form stops hard coding 365 when the engine takes 36500.
  • The connection block's header table for an external source uses the header's @source expressions. The table said _timestamp reads timestamp then @timestamp, but the expression is timestamp | now().

An override type with arguments has a template such as Decimal({precision},{scale}) and typed parameters. A form can build the text without knowing the type.

Pinned to dfe-schemas 0.2.29 for labels and override options. Cardinality labels come with dfe-schemas #114. Until then the engine serves the capitalised value.

The console kept its own copies of the primitives, use cases and override types, and they drifted from dfe-schemas. It offered retired use cases and had no map or vector.

- GET /api/v1/schemas/vocabulary serves primitives, use cases and override types from the pinned dfe-schemas registry, with labels and the names each use case replaced.
- GET /api/v1/system/defaults carries the retention maximum beside the value.
- The external pipeline header table uses the header's @source expressions. It no longer shows @timestamp as the source for _timestamp.

Labels and override options live in dfe-schemas types.yaml. Until the pin moves to a release that has them, labels use the names and no override types are offered.
The form needs to offer `cardinality: low` before a column can use it. The vocabulary dropped the retired `lowcardinality` attribute without its replacement.

The vocabulary has `cardinality` values, default and labels. It also lists what each retired attribute reads as (`lowcardinality` is `low`).

The vocabulary reads from the `cardinality` block of dfe-schemas types.yaml. Labels come from its `labels` map when present.
The vocabulary route reads these registry fields through pydantic from_attributes, which leaves no attribute access in the source for vulture to see.
0.2.29 has the type vocabulary labels and override options. The vocabulary route serves labels and 29 override types instead of names alone.
The default header version is no longer a constant. The external pipeline header table reads the profile at the version dfe-schemas marks current.
The source columns response carried attributes but no cardinality, so the console could not show a saved column as `low`. The response now reports the declared cardinality. A column with the retired `lowcardinality` attribute reads as `low`.
The cardinality helper returns the Cardinality literal the response field declares, which ty needs. THIRD-PARTY-NOTICES lists dfe-schemas at the version the lock pins.
@catinspace-au
catinspace-au marked this pull request as ready for review November 11, 2026 08:38
@catinspace-au
catinspace-au merged commit ea8e845 into main Nov 11, 2026
19 checks passed
@catinspace-au
catinspace-au deleted the fix/schema-vocabulary-served branch November 11, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant