Skip to main content

model

Pydantic record for the flow_specs cache table (v1).

Classes

FlowSpecRecord

class FlowSpecRecord(**data: Any):

The persisted replay material for one linked (project, datasource).

Attributes

  • project_id: Project the datasource is linked to.
  • datasource_name: Datasource the project is linked to.
  • dag_name: The FlowSpec's name, which is also the DAG and Prefect flow name. Denormalised so lineage can be read without deserialising flow_spec_raw.
  • flow_spec_raw: The FlowSpec exactly as the Hub sent it.
  • origin_task_id: Task id of the triggering envelope, retained so a recovered attempt reports under the task the Hub already tracks. None for the CLI path, which has no envelope.
  • gave_up_at: When the lineage hit the unproductive-attempt bound. None while the lineage is still allowed to recover.
  • gave_up_reason: Support-facing explanation of why it gave up.
  • linked_at: When this link was last recorded.
  • tags: Arbitrary flat metadata.

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 dag_name : str
  • static datasource_name : str
  • static gave_up_reason : str | None
  • static model_config
  • static origin_task_id : str | None
  • static project_id : str
  • gave_up : bool - Whether this lineage has been abandoned.

    Reads the timestamp rather than the reason, so a give-up recorded with no reason still counts.