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:
Liveness KPI — counts user-visible tables (Postgres:
information_schema.tablesfiltered topublic; 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.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.
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
|
Return the per-app liveness-dataset visual_identifier. |
|
Return the per-app matview-status-dataset visual_identifier. |
|
Trivial liveness query against the database catalog. |
|
Per-matview row count + most-recent date table. |
|
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 queriesUSER_TABLES. Returns one row with the user-visible-table count. Per-dialect SQL resolved fromcfg.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 anddeploy <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 thevisual_identifier(viaapp_info_liveness_id) so all four apps’ liveness datasets coexist in the App2 process-global SQL registry without overwriting each other.
- 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_specsis a list of(name, date_col)tuples — the fully-qualified matview/table names to monitor + the column the “most recent” timestamp comes from. Passdate_col=Nonefor 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: seebuild_liveness_dataset.
- 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
sheetto the Analysis as the LAST sheet (this helper doesn’t enforce position becauseanalysis.add_sheetorder is the position).- Return type:
None- Parameters:
cfg (Config)
sheet (Sheet)
liveness_ds (Dataset)
matview_status_ds (Dataset)
theme (ThemePreset)