runlog
etl_craft.engine.runlog ¶
Read run identities, task summaries, dependency state and SLA results.
Lifecycle writes belong to engine.transitions. Tasks receive a selected pipeline run;
execution attempts keep separate immutable outcomes under each task summary.
RunSelector
dataclass
¶
An explicit run id or pipeline-scoped key, or the single non-terminal run.
__post_init__ ¶
Refuse conflicting or empty identities before looking at any run.
RunIdentity
dataclass
¶
A run's identity and logical date, independent of when it started.
RunKind
dataclass
¶
The date a run runs as of, and whether it is part of a backfill.
TaskRunBinding
dataclass
¶
A task's row under a run: its id, its status, and whether this call created it.
TaskRunResult
dataclass
¶
A task run's status, error message and attempt count, read back after it ran.
SlaResult
dataclass
¶
How a finished run measured against its pipeline's SLA_IN_HOURS.
RunEnding
dataclass
¶
Whether finalize_pipeline_run ended the run, and its SLA as recorded.
RunSla
dataclass
¶
When a run started, and the SLA status recorded for it so far.
fetch_active_pipeline_run_id ¶
Return the IN-PROGRESS run of pipeline_id, or None.
today ¶
Return today in the supplied project timezone; audit timestamps remain UTC.
run_candidates ¶
List runs of this pipeline by id, for selection and actionable refusals.
select_run ¶
Select exactly one run; never select an ended run without an explicit identity.
fetch_run_kind ¶
Return the run date and backfill flag of pipeline_run_id, which must exist.
as_date ¶
Read a DATE column: a date from PostgreSQL, YYYY-MM-DD text from SQLite.
fetch_task_run_result ¶
Return the current status of task_run_id; a crashed task is still IN-PROGRESS.
fetch_task_run_status ¶
Return the status of task_id under pipeline_run_id, or None if it has no row.
fetch_pipeline_run_status ¶
Return the status of pipeline_run_id, which must exist.
fetch_run_state ¶
fetch_run_state(conn: Connection, pipeline_run_id: int, task_ids: Sequence[int]) -> dict[int, TaskRunState]
Return the state of each of task_ids under the run, as the dependency graph reads it.
A task with no row is left out: it has not run.
elapsed_hours ¶
Return the hours from start to now, reading a naive start as UTC.
fetch_run_sla ¶
Return when pipeline_run_id started and its SLA status so far.