Skip to content

data_updater_v2.jobs.report

report.py — the night’s report, one email a session (report.night_report).

nightly_report nightly_report_due send_report

What it says, short: the verdict and four numbers (tables landed, runs, rows, issues to act on); the failed runs, the tables behind and the new issues to act on, only when there are any; one row a family of tables; the session’s splits, dividends going ex, renames, listings, delistings and index changes (the raw tables, dated the session; ours where the catalog decides it); the coins’ estimates outstanding. The tables expected are those whose update job’s row is switched on; a table whose job is off reads off, never behind.

When: the sensor sends it once every expected table has landed for the session and settle_minutes have passed since (the dbt runs the landings set off come first), else at the row’s deadline (New York, the session’s evening) whatever has landed — a night that went wrong is reported, not waited on. One report a session.

To whom: Sam and Ethan (RECIPIENTS), unless the row’s recipients names others; an empty list, and the report is built and logged, never sent. The send goes through common-reports’ EmailClient (the environment’s EMAIL_*); a send that fails fails the run (the run-failure alert then says so).

Classes

Report

Bases: DataJob

The night’s report: gathered from the monitoring ledger, the landings and the issues, built, and sent to the row’s recipients. Carried state: the base’s, with params this job’s ReportParams.

nightly_report_due

nightly_report_due(context: Any) -> Any

Every 10 minutes: the newest NYSE session closed SETTLED ago. Sent once every table whose update job is switched on has landed for it and the row’s settle_minutes have passed since that was first seen (the cursor), else at the row’s deadline that evening, New York; one report a session (the run key).

send_report

send_report(cfg: RunConfig) -> None

The session’s report (the sensor’s, else the last session closed), sent; with no recipients, built and logged. A send that fails raises.

ReportParams

Bases: JobParams

The report’s knobs (the row’s params).

Functions

update_jobs

update_jobs() -> dict[str, list[str]]

Each raw table (its product name) -> the jobs that update it: every flow’s jobs typed update (built by hand or repairs excluded), through their steps’ produces.