Skip to content

snapshots

etl_craft.services.operations.snapshots

Read canonical execution views without selecting runs by recency.

timestamp

timestamp(value: object) -> datetime | None

Normalize nullable Engine DB timestamps to aware UTC instants.

pipeline_view

pipeline_view(conn: Connection, pipeline_id: int) -> PipelineView

Read one definition and its pause within the caller's snapshot.

run_view

run_view(conn: Connection, pipeline_id: int, pipeline_run_id: int) -> RunView

Read the exact run; a foreign pipeline's identity never matches.

run_document

run_document(row: RowMapping) -> RunView

Convert a stored run row into its public document.

task_run_view

task_run_view(conn: Connection, pipeline_id: int, *, task_run_id: int | None = None, pipeline_run_id: int | None = None, task_id: int | None = None) -> TaskRunView | None

Read a task run by its id or by an exact task and pipeline-run pair.

task_document

task_document(conn: Connection, row: RowMapping) -> TaskRunView

Convert a task summary and its attempts into one public document.

attempt_document

attempt_document(row: RowMapping) -> AttemptView

Normalize the same attempt document for task inspection and direct API reads.