Skip to content

common_dagster.monitoring.schemas

Validated row and input shapes for the common monitoring ledger.

Classes

FindingInput

Bases: _MonitoringRecord

One grouped finding supplied to record_finding_summaries.

Fields and properties declared here; inherited members belong to the bases above.

finding_count

finding_count: Positive

finding_type

finding_type: NonBlank

severity

severity: FindingSeverity

FindingSummaryRecord

Bases: FindingInput

The complete persisted shape of one finding summary.

Fields and properties declared here; inherited members belong to the bases above.

finding_id

finding_id: NonBlank

receipt_id

receipt_id: NonBlank | None = None

recorded_at

recorded_at: datetime

run_id

run_id: NonBlank

stage_id

stage_id: NonBlank

RunRecord

Bases: _MonitoringRecord

The complete persisted shape of one run row.

Fields and properties declared here; inherited members belong to the bases above.

error

error: NonBlank | None = None

finished_at

finished_at: datetime | None = None

flow_name

flow_name: NonBlank

job_name

job_name: NonBlank

job_type

job_type: JobType

run_date

run_date: date | None = None

run_id

run_id: NonBlank

started_at

started_at: datetime

status

status: RunStatus

StageRecord

Bases: _MonitoringRecord

The complete persisted shape of one stage-attempt row.

Fields and properties declared here; inherited members belong to the bases above.

attempt

attempt: Positive

finished_at

finished_at: datetime | None = None

message

message: NonBlank | None = None

run_id

run_id: NonBlank

stage_id

stage_id: NonBlank

stage_name

stage_name: NonBlank

started_at

started_at: datetime

status

status: StageStatus

TargetReceiptRecord

Bases: _MonitoringRecord

The complete persisted shape of one target receipt.

Fields and properties declared here; inherited members belong to the bases above.

checks_failed

checks_failed: NonNegative | None = None

checks_total

checks_total: NonNegative | None = None

message

message: NonBlank | None = None

receipt_id

receipt_id: NonBlank

recorded_at

recorded_at: datetime

rows_rejected

rows_rejected: NonNegative | None = None

rows_total_after

rows_total_after: NonNegative | None = None

rows_written

rows_written: NonNegative | None = None

run_id

run_id: NonBlank

stage_id

stage_id: NonBlank

status

status: TargetStatus

target_key

target_key: NonBlank | None = None

target_name

target_name: NonBlank

target_type

target_type: NonBlank

Types and values

FindingSeverity

FindingSeverity = Literal['warning', 'error']

JOB_TYPES

JOB_TYPES: frozenset[str] = frozenset(get_args(JobType))

JobType

JobType = Literal['update', 'build', 'maintenance', 'dbt']

NonBlank

NonBlank = Annotated[str, StringConstraints(strip_whitespace=True, min_length=1)]

NonNegative

NonNegative = Annotated[int, Field(strict=True, ge=0)]

Positive

Positive = Annotated[int, Field(strict=True, ge=1)]

RunStatus

RunStatus = Literal['running', 'success', 'failed', 'canceled']

RunTerminalStatus

RunTerminalStatus = Literal['success', 'failed', 'canceled']

StageStatus

StageStatus = Literal['running', 'success', 'failed', 'skipped', 'canceled']

StageTerminalStatus

StageTerminalStatus = Literal['success', 'failed', 'skipped', 'canceled']

TargetStatus

TargetStatus = Literal['complete', 'partial', 'failed']