Skip to main content

v1

schema_versions record, v1 — canonical aliases.

Consumers and the record registry import from here and never touch the inner module names, mirroring steps/*/v1/__init__.py.

Module

Submodules

Classes

ORM

class ORM(**kwargs):

SQLAlchemy model for the schema_versions cache table.

Stores pipeline schema version snapshots for each task hash. Multiple rows per task hash are allowed — each store call creates a distinct row identified by (task_hash, created_at).

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance's class are allowed. These could be, for example, any mapped columns or relationships.

Variables

  • created_at : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • pipeline_version : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • run_id : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • schema_data : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • tags : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • task_hash : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]

Record

class Record(**data: Any):

Stored schema version record.

Attributes

  • prefect_task_hash: Unique hash identifying the pipeline task.
  • pipeline_version: Semantic version string of the pipeline that created this record.
  • schema_data: Full pipeline schema snapshot. Renamed from schema_json to avoid a Pydantic v2 namespace conflict.
  • created_at: When this schema version record was first written.
  • tags: Arbitrary flat metadata.
  • run_id: UUID of the run that produced this record (for provenance).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Variables

  • static model_config
  • static pipeline_version : str
  • static prefect_task_hash : str
  • static run_id : str | None