recon_gen.common.sheets.app_info

App Info (“i”) sheet — diagnostic canary on every shipped dashboard.

Every L3 dashboard’s last sheet is named “i” (App Info). It carries three things:

  1. Liveness KPI — counts user-visible tables (Postgres: information_schema.tables filtered to public; Oracle: USER_TABLES). Real query, hits the database, never QS-cached (Direct Query). KPI shows a number → QS rendering pipeline works. KPI blank → QS itself is broken.

  2. Per-matview row count table — caller-supplied list of matview names UNION’d into one dataset. Freshly-loaded matviews showing 0 means the ETL hasn’t refreshed them.

  3. Deploy stamp text box — git short SHA + ISO timestamp baked at generate time so a viewer can tell which build of the dashboard they’re looking at.

Diagnostic value: collapses the QS spinner-footgun ladder (Aurora returns rows → describe_data_set CREATION_SUCCESSFUL → fresh incognito → assume QS broken; CLAUDE.md ops footgun) to a single glance at “i”.

Usage from an app’s build_*_app(cfg, …):

```python from recon_gen.common.sheets.app_info import (

APP_INFO_SHEET_NAME, APP_INFO_SHEET_TITLE, APP_INFO_SHEET_DESCRIPTION, app_info_liveness_id, app_info_matviews_id, build_liveness_dataset, build_matview_status_dataset, populate_app_info_sheet,

)

# In _l1_datasets (or equivalent): liveness_aws = build_liveness_dataset(cfg, app_segment=”l1”) matviews_aws = build_matview_status_dataset(

cfg, app_segment=”l1”, view_specs=[

(f”{l2_prefix}_drift”, “business_day_end”), (f”{l2_prefix}_overdraft”, “business_day_end”), …,

],

) liveness_ds = Dataset(identifier=app_info_liveness_id(“l1”),

arn=cfg.dataset_arn(liveness_aws.DataSetId))

matviews_ds = Dataset(identifier=app_info_matviews_id(“l1”),

arn=cfg.dataset_arn(matviews_aws.DataSetId))

# As LAST sheet on the analysis: app_info_sheet = analysis.add_sheet(Sheet(

sheet_id=SheetId(“<app>-sheet-app-info”), name=APP_INFO_SHEET_NAME, title=APP_INFO_SHEET_TITLE, description=APP_INFO_SHEET_DESCRIPTION,

)) populate_app_info_sheet(

cfg, app_info_sheet, liveness_ds=liveness_ds, matview_status_ds=matviews_ds, theme=theme,

)

Functions

app_info_liveness_id(app_segment)

Return the per-app liveness-dataset visual_identifier.

app_info_matviews_id(app_segment)

Return the per-app matview-status-dataset visual_identifier.

build_liveness_dataset(cfg, *, app_segment)

Trivial liveness query against the database catalog.

build_matview_status_dataset(cfg, *, ...)

Per-matview row count + most-recent date table.

populate_app_info_sheet(cfg, sheet, *, ...)

Populate the "i" sheet with three visuals (KPI + table + text box).

recon_gen.common.sheets.app_info.app_info_liveness_id(app_segment)[source]

Return the per-app liveness-dataset visual_identifier.

Return type:

str

Parameters:

app_segment (str)

recon_gen.common.sheets.app_info.app_info_matviews_id(app_segment)[source]

Return the per-app matview-status-dataset visual_identifier.

Return type:

str

Parameters:

app_segment (str)

recon_gen.common.sheets.app_info.build_liveness_dataset(cfg, *, app_segment)[source]

Trivial liveness query against the database catalog.

Postgres queries information_schema.tables; Oracle queries USER_TABLES. Returns one row with the user-visible-table count. Per-dialect SQL resolved from cfg.dialect (P.9c — earlier versions hardcoded the Postgres SQL on both dialects, which silently broke the KPI on Oracle).

app_segment: short kebab-case tag identifying which app owns this Dataset (e.g., "l1", "exec", "inv", "l2ft"). Becomes part of the AWS DataSetId so each app gets its own physical dataset and deploy <single-app> doesn’t delete-then- create another app’s App Info dataset out from under it (M.4.4.7). BO.5 — also drives the visual_identifier (via app_info_liveness_id) so all four apps’ liveness datasets coexist in the App2 process-global SQL registry without overwriting each other.

Return type:

DataSet

Parameters:
  • cfg (Config)

  • app_segment (str)

recon_gen.common.sheets.app_info.build_matview_status_dataset(cfg, *, app_segment, view_specs)[source]

Per-matview row count + most-recent date table.

view_specs is a list of (name, date_col) tuples — the fully-qualified matview/table names to monitor + the column the “most recent” timestamp comes from. Pass date_col=None for tables without a natural date dimension; the latest_date column will render NULL for that row.

Caller decides which (matview, date_col) pairs matter for this app — typically the L1 invariant matviews + the base tables (<prefix>_transactions, <prefix>_daily_balances) so the operator can spot stale matviews against fresh ETL loads at a glance on the App Info sheet.

app_segment: see build_liveness_dataset.

Return type:

DataSet

Parameters:
  • cfg (Config)

  • app_segment (str)

  • view_specs (list[tuple[str, str | None]])

recon_gen.common.sheets.app_info.populate_app_info_sheet(cfg, sheet, *, liveness_ds, matview_status_ds, theme)[source]

Populate the “i” sheet with three visuals (KPI + table + text box).

Caller is responsible for registering the datasets on the App and for adding sheet to the Analysis as the LAST sheet (this helper doesn’t enforce position because analysis.add_sheet order is the position).

Return type:

None

Parameters: