Skip to content

ontology: spec.py Pydantic models reject spec-conformant documents carrying datatype #424

Description

@christianeu-db

Summary

converters/ontology/src/ossie_ontology/spec.py DatasetField and Metric omit datatype, while the base OssieObject sets extra="forbid". Any conformant document with datatype (including examples/tpcds_semantic_model.yaml) fails to parse with extra_forbidden.

Root cause

extra="forbid" + no datatype field on DatasetField/Metric, though the core spec defines datatype on both.

Repro (real converter, HEAD ab8fc1a — EXECUTED)

SemanticModel(**doc) with a field datatype: Integer:

1 validation error for SemanticModel
datasets.0.fields.0.datatype
  Extra inputs are not permitted [type=extra_forbidden, input_value='Integer', input_type=str]

Potential fix

Add datatype: str | None = None to DatasetField and Metric. This should be a non-breaking change. Value-enum validation is a separate, optional concern.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions