Skip to content

feat(dashboards): Dr.Egeria dashboard commands write Egeria 6.3 Dashboard elements (RS-DASH PR-1) - #570

Merged
dwolfson merged 6 commits into
odpi:mainfrom
dwolfson:feat/dashboards-in-egeria-writes
Nov 9, 2026
Merged

dwolfson merged 6 commits into
odpi:mainfrom
dwolfson:feat/dashboards-in-egeria-writes

Conversation

@dwolfson

@dwolfson dwolfson commented Nov 9, 2026

Copy link
Copy Markdown
Member

Draft: opened before the Coordinator gate and the Architect read-back finish; it is marked ready when both pass.

Dashboard sheet commands write Egeria 6.3 dashboards (RS-DASH PR-1)

Branch dwolfson:feat/dashboards-in-egeria-writes, on upstream/main 259ca15 (6.2.28). Three commits:

  • 8892d12: the feature;
  • 608480e: the live-found Report-resolution fix;
  • 2b4c716: the exact-lookup performance fix.

Design: report-spec pipeline note v5.5, §8d and §10.6(c). Brief: BRIEF-RS-DASHBOARDS-IN-EGERIA-2026-11-09. Owner
decisions DB-1, DB-2 and DB-3 were decided on 2026-11-09.

What changes

Create Dashboard Sheet, Link Report to Dashboard Sheet and Add Text on Dashboard Sheet keep their names and
syntax. They now write this element chain:

Dashboard  Dashboard::<sheet>                       displayName = heading; aliases; additionalProperties.family
 └─Schema→ DisplayDataSchemaType  DashboardSchema::<sheet>
    └─AttributeForSchema(position 1)→ DisplayDataContainer  DashboardSheet::<sheet>   (the sheet)
       └─NestedSchemaAttribute(position n)→ DisplayDataField  DashboardPlacement::<sheet>::<n>::<placement name>
             placementKind report|text · span 1|2|full · presentationStyle kpi|panel · markdownContent (text)
Dashboard ─DataSetContent(queryId = placement qualifiedName, queryType placement)→ Report      (report placements)
Perspective ─ScopedBy→ placement          placement ─DataDescription→ ReportSpec (drill-down, when it has an element)

Upsert by qualifiedName.

  • A placement is found by name within its sheet. Re-running it updates it in place; its qualifiedName and
    position never change.
  • Re-running a whole document makes no writes (tested).
  • A new placement takes the next free position, so a removed placement's position is never reused.

Removing and deleting never touch Reports. DashboardSheetEgeriaWriter.remove_placement detaches the
placement's DataSetContent and deletes its field. delete_sheet deletes:

  • the fields;
  • the container;
  • the schema type;
  • the Dashboard.

Reports, ReportSpecs and Perspectives are never deleted, because membership is not anchoring. There are no
Dr.Egeria commands for these two operations today. The CLI in PR-2 exposes them (python -m pyegeria.view.dashboards delete).

One implementation.

  • The Dashboard asset write is report.upsert_dashboard_asset, shared by Create Dashboard and
    Create Dashboard Sheet.
  • The chain is written only by DashboardSheetEgeriaWriter. The processors use it, and so does PR-2's migrate.
  • migrate goes through the writer, not markdown, so text placements round-trip byte for byte.

DB-1, dual write.

  • Every command writes Egeria and the local JSON store.
  • dr_egeria --local-only (or PYEGERIA_DASHBOARD_SHEETS_LOCAL_ONLY=1), or an unreachable Egeria
    (PyegeriaConnectionException), writes the store alone. The output says so.
  • Any other Egeria error fails the command before the store is written, so the two stay consistent.
  • A sheet held only in the store, made before this PR, is written to Egeria whole on its next placement
    command. The Egeria copy is never partial.

DB-2, perspectives.

  • The Overview keys map to the Trellis names: governance, steward, owner→Data Owner, consumer, builder→App/AI
    Builder, privacy, security, architecture, engineer→Data Expert, community.
  • ScopedBy links go to the Perspective:: elements that exist. A missing one is written without its link, with a
    note. Perspectives are never created.
  • Live check (read only, 2026-11-09), 12 elements: Trellis's "Data Owner" element is
    Perspective::Owner (and "Admin" is Perspective::Administration). PERSPECTIVE_QN_OVERRIDES maps both.

Create Report.

  • reportParameters is one JSON document (§8d). It holds the snake_case common find attributes, the
    Report Parameters map and the Analytic Parameters map. Values are JSON-decoded, so Page Size 25 becomes
    25. Spec defaults the parser fills in are not pinned: only what the author wrote.
  • It also writes the typed outputFormat.
  • It writes ReportTypeInstance from the spec's element, found under ReportSpec:: or ReportType::
    (the §7a hazard). A link to another spec is detached, and the link is never duplicated on a re-run.
  • A spec with no element gets the note "Report Spec 'X' has no Egeria element (looked for ReportSpec::X and
    ReportType::X): no ReportTypeInstance was written…"
    , not silence.
  • additionalProperties.reportSpec and the other keys are still written for one release, because today's Portal
    reads them.

Three deviations from the brief (for the Architect read-back)

  1. The placement field's displayName is <sheet> / <placement name>, not the bare name.
    • A report placement is named after its Report, and Dr.Egeria resolves Report Name by displayName across
      all types. A field sharing the Report's displayName made the next Link Report to Dashboard Sheet
      ambiguous and refused. The micro-test hit this; it would have happened live.
    • The bare name is in additionalProperties.placementName and in the qualifiedName.
    • The Portal's own report lookup filters to type Report, so it was not affected.
  2. The perspective labels and the drill-down spec name are also kept on the field
    (additionalProperties.perspectives, comma-separated, and detailSpec).
    • A label is not recoverable from its element ("owner" and "Data Owner" both map to Perspective::Owner).
    • A spec or perspective with no element would otherwise be lost. The links carry the graph meaning; the
      labels make the round trip exact.
    • These are plain strings, not structured values.
  3. No compact-spec change, so refresh_specs is not run.
    • The brief listed the commands' OM_TYPEs. refresh_specs regenerates base_report_formats.py, which is
      stage 2's file.
    • The processors pin their Egeria types in code instead, so the commands work unchanged.
    • Follow-up, after stage 2 lands: the commands' spec descriptions still say "local record, not yet an Egeria
      element".

Found live (dry runs only, read only)

__async_get_guid__ cannot resolve two real Reports, 'Term Definition Completeness' and 'Governance Classification
Coverage'. Egeria rejects its unique-name lookup (400) because another element type shares the name.

  • The writer resolves a placement's Report by an exact displayName lookup filtered to type Report (0.1 s; a
    contains-search took ~35 s).
  • Two Reports with one name give a note and no link.
  • Dr.Egeria's own refusal of those two names in Link Report… predates this PR.

Gate 1: micro-tests through the real dispatcher (setup_dispatcher / V2Dispatcher.dispatch)

These use an in-memory fake Egeria, tests/micro-tests/dashboard_fake_egeria.py, with entities and relationships
in the response shapes checked live. Each command is covered for:

  • create: the 10.6 chain, exactly;
  • re-run: no writes, store byte-identical;
  • update: only the changed field and the changed asset are written, and removed perspectives are cleared;
  • remove a placement: the field and its link go, the Report stays, and the next position is free;
  • delete a sheet: only the chain goes; Reports, ReportSpecs and Perspectives stay.

Also tested:

  • the dry run;
  • a missing report: refused by Dr.Egeria as today, and a note in migration;
  • a missing perspective;
  • local-only;
  • a local-only sheet written whole;
  • Create Report with reportParameters and ReportTypeInstance under each prefix, with no duplicate on a
    re-run, with a relink when the spec changes, and with the "no element" note.

Full micro-suite, Python 3.13 (uv run -p 3.13 pytest tests/micro-tests/ --junitxml …): 2524 tests, 0 failures, 0 errors, 3 skipped at 2b4c716 (JUnit: junit-dashboards-pr1-2b4c7166.xml).

Not in this PR

  • PR-2: the reader and the CLI.
  • PR-3: the Portal.
  • The family folder (§8d's CollectionMembership); family is kept in additionalProperties.family.
  • ReportRunOf history.
  • Retiring the JSON store.

Signed-off-by: Dan Wolfson dan.wolfson@pdr-associates.com

🤖 Generated with Claude Code

… (RS-DASH PR-1)

Create Dashboard Sheet, Link Report to Dashboard Sheet and Add Text on
Dashboard Sheet keep their names and syntax and now write the pipeline
note v5.5 §8d chain: Dashboard -Schema-> DisplayDataSchemaType
-AttributeForSchema-> DisplayDataContainer -NestedSchemaAttribute(position)->
one DisplayDataField per placement, with DataSetContent (queryId = the
placement's qualifiedName), ScopedBy to Trellis Perspectives (DB-2) and
DataDescription to the drill-down ReportSpec. Upsert by qualifiedName;
a re-run writes nothing. Removing a placement or deleting a sheet never
deletes a Report or ReportSpec.

DB-1: every command also writes the local JSON store; --local-only (or
PYEGERIA_DASHBOARD_SHEETS_LOCAL_ONLY) or an unreachable Egeria writes the
store alone and says so.

Create Report writes one reportParameters document (author-written values
only), the typed outputFormat, and ReportTypeInstance from the spec element
found under ReportSpec:: or ReportType::, with a note when the spec has no
element. additionalProperties keys are kept for one release.

The Dashboard asset write is shared (upsert_dashboard_asset) by Create
Dashboard and Create Dashboard Sheet. DashboardSheetEgeriaWriter is the one
Egeria implementation, for the processors and for migration.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
A live dry run found two real Reports ('Term Definition Completeness',
'Governance Classification Coverage') that __async_get_guid__ cannot
resolve: its unique-name lookup is rejected when another element type
shares the display name. The writer now finds the one Report whose
displayName matches exactly (the Portal's own lookup), else by
qualifiedName; two same-named Reports give a note and no link.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
The contains-search took ~35 s per placement on the live platform; the
exact by-property-value lookup filtered to type Report takes 0.1 s.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…rt lookup)

- A placement added after a removal never reuses a taken position: an
  explicit migrate index that is already taken falls back to max+1.
- A sheet with two placements of one name is refused before any write
  (they would collapse into one); a report and a text placement cannot
  share a name, in Egeria or the store.
- Link Report to Dashboard Sheet resolves Report Name with the exact
  Report-typed lookup first, so a Report whose name another element type
  shares no longer fails validation.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
A re-run's action list now names the Schema, AttributeForSchema and
NestedSchemaAttribute links it found in place, so its "unchanged" count
matches the first run's change count (live step (a): 9 and 9, not 9 and 6).

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
@dwolfson
dwolfson marked this pull request as ready for review November 9, 2026 16:36
@dwolfson
dwolfson merged commit f104235 into odpi:main Nov 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant