common_dagster.monitoring.models
The monitoring ledger’s census: four abstract tables every job container binds to its schema.
Every job-oriented container gets the same four-table execution ledger. The
abstract models own the complete column and constraint shape; a container
module only binds that shape to its schema. Monitoring tables declare the
named monitoring database target in Table.info so provisioning routes
identical schema names to the correct physical database.
Classes
FindingSummaryBase
Bases: Base
One aggregate anomaly type observed during a stage.
Fields and properties declared here; inherited members belong to the bases above.
finding_count
finding_count: Mapped[int] = mapped_column(BigInteger, nullable=False)finding_id
finding_id: Mapped[str] = mapped_column(Text, primary_key=True)finding_type
finding_type: Mapped[str] = mapped_column(Text, nullable=False)recorded_at
recorded_at: Mapped[dt_t] = mapped_column(DateTime(timezone=True), nullable=False, server_default=(func.now()))severity
severity: Mapped[str] = mapped_column(Text, nullable=False)receipt_id
def receipt_id() -> Mapped[str | None]run_id
def run_id() -> Mapped[str]stage_id
def stage_id() -> Mapped[str]RunBase
Bases: Base
One durable workload execution.
Fields and properties declared here; inherited members belong to the bases above.
error
error: Mapped[str | None] = mapped_column(Text, nullable=True)finished_at
finished_at: Mapped[dt_t | None] = mapped_column(DateTime(timezone=True), nullable=True)flow_name
flow_name: Mapped[str] = mapped_column(Text, nullable=False)job_name
job_name: Mapped[str] = mapped_column(Text, nullable=False)job_type
job_type: Mapped[str] = mapped_column(Text, nullable=False)run_date
run_date: Mapped[date_t | None] = mapped_column(Date, nullable=True)run_id
run_id: Mapped[str] = mapped_column(Text, primary_key=True)started_at
started_at: Mapped[dt_t] = mapped_column(DateTime(timezone=True), nullable=False, server_default=(func.now()))status
status: Mapped[str] = mapped_column(Text, nullable=False, default='running', server_default='running')StageBase
Bases: Base
One attempt of one named step within a run.
Fields and properties declared here; inherited members belong to the bases above.
attempt
attempt: Mapped[int] = mapped_column(BigInteger, nullable=False)finished_at
finished_at: Mapped[dt_t | None] = mapped_column(DateTime(timezone=True), nullable=True)message
message: Mapped[str | None] = mapped_column(Text, nullable=True)stage_id
stage_id: Mapped[str] = mapped_column(Text, primary_key=True)stage_name
stage_name: Mapped[str] = mapped_column(Text, nullable=False)started_at
started_at: Mapped[dt_t] = mapped_column(DateTime(timezone=True), nullable=False, server_default=(func.now()))status
status: Mapped[str] = mapped_column(Text, nullable=False, default='running', server_default='running')run_id
def run_id() -> Mapped[str]TargetReceiptBase
Bases: Base
One persisted, checked, or delivered target affected by a stage.
Fields and properties declared here; inherited members belong to the bases above.
checks_failed
checks_failed: Mapped[int | None] = mapped_column(BigInteger, nullable=True)checks_total
checks_total: Mapped[int | None] = mapped_column(BigInteger, nullable=True)message
message: Mapped[str | None] = mapped_column(Text, nullable=True)receipt_id
receipt_id: Mapped[str] = mapped_column(Text, primary_key=True)recorded_at
recorded_at: Mapped[dt_t] = mapped_column(DateTime(timezone=True), nullable=False, server_default=(func.now()))rows_rejected
rows_rejected: Mapped[int | None] = mapped_column(BigInteger, nullable=True)rows_total_after
rows_total_after: Mapped[int | None] = mapped_column(BigInteger, nullable=True)rows_written
rows_written: Mapped[int | None] = mapped_column(BigInteger, nullable=True)status
status: Mapped[str] = mapped_column(Text, nullable=False)target_key
target_key: Mapped[str | None] = mapped_column(Text, nullable=True)target_name
target_name: Mapped[str] = mapped_column(Text, nullable=False)target_type
target_type: Mapped[str] = mapped_column(Text, nullable=False)run_id
def run_id() -> Mapped[str]stage_id
def stage_id() -> Mapped[str]Functions
bind
def bind(schema: str) -> tuple[type[RunBase], type[StageBase], type[TargetReceiptBase], type[FindingSummaryBase]]The four concrete tables for one container schema, registered once on the shared Base.
A container calls this once with its own schema name; calling it again for the same schema returns the same classes, never a second registration.
Types and values
MONITORING_TARGET
MONITORING_TARGET = 'monitoring'