v1
dag_wave_ledger record, v1 — canonical aliases.
Consumers and the record registry import from here and never touch the inner
module names, mirroring file_metadata/v1/__init__.py.
Module
Submodules
- bitfount.cache.types.dag_wave_ledger.v1.migrations - No inbound migration — this is the base version.
- bitfount.cache.types.dag_wave_ledger.v1.model - Pydantic record for the
dag_wave_ledgercache table (v1). - bitfount.cache.types.dag_wave_ledger.v1.schema - SQLAlchemy ORM for the
dag_wave_ledgercache table (v1). - bitfount.cache.types.dag_wave_ledger.v1.store - CRUD for the
dag_wave_ledgerrecord (v1).
Classes
ORM
class ORM(**kwargs):SQLAlchemy model for the dag_wave_ledger cache table.
One row per file a waved background run has carried through every step
of the DAG. This is the only place that question is answerable: no step's
own partition holds the answer, because the per-file calculation steps write
a row for every candidate including the ones they failed (ADR 0005's
row-completeness contract), while the eligibility steps are patient-grain
and hold no file_id at all.
Written by the wave loop, never by a step. A step must not write outside its own partition, and — load-bearing — the recovery progress bound counts rows across the DAG's step partitions, so a ledger bound to a step would make every wave look productive and disarm the bound.
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.
Ancestors
Variables
-
bitfount_patient_id : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
-
completed_at : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
-
file_path : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
-
partition_key : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
-
project_id : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
-
run_id : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
-
tags : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
-
wave_index : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
Record
class Record(**data: Any):One file a waved run carried through every step of the DAG.
Attributes
partition_key: The digest over the DAG's stamped step hashes. Set by the store from its own argument.project_id: The lineage's project, or the empty string when it has none. Set by the store from its own argument.file_path: The file, asfile_metadataspells it.bitfount_patient_id: The patient the file belongs to, orNonefor an orphan — a filescan_metadatacould not identify.completed_at: When the wave that carried this file finished.wave_index: Which wave of the sweep carried it; reporting only.run_id: The flow run that banked it.tags: Free-form provenance, as on every cache record.
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
bitfount_patient_id : str | None
- static
completed_at : datetime.datetime
- static
file_path : str
- static
model_config
- static
partition_key : str
- static
project_id : str
- static
run_id : str | None
- static
tags : dict[str, typing.Any] | None
- static
wave_index : int