Skip to content

Fix(sigma-dashboards): Populate dataModels during ingestion#28282

Open
zak-nuccio wants to merge 10 commits into
open-metadata:mainfrom
zak-nuccio:fix/sigma-datamodel-dashboard-lineage
Open

Fix(sigma-dashboards): Populate dataModels during ingestion#28282
zak-nuccio wants to merge 10 commits into
open-metadata:mainfrom
zak-nuccio:fix/sigma-datamodel-dashboard-lineage

Conversation

@zak-nuccio
Copy link
Copy Markdown
Contributor

@zak-nuccio zak-nuccio commented May 19, 2026

Describe your changes:

Summary

The Sigma ingestion connector was missing two pieces of lineage that the
OpenMetadata model expects:

  1. Dashboard.dataModels population — the CreateDashboardRequest
    never set the dataModels field, so the Dashboard entity stored in
    OM had an empty data-model list and no DataModel references appeared
    on the Dashboard page.

  2. DataModel → Dashboard lineage edgesyield_dashboard_lineage_details
    only emitted Table → DataModel edges. The DataModel → Dashboard edges
    (required to complete the end-to-end lineage graph) were never yielded.

Root cause

yield_dashboard built the CreateDashboardRequest without a dataModels
argument. Sigma data models are yielded separately (via yield_datamodel),
so they are available via self.context.get().dataModels at dashboard-yield
time but were never included in the request.

Changes

ingestion/src/metadata/ingestion/source/dashboard/sigma/metadata.py

  • yield_dashboard: added dataModels field to CreateDashboardRequest,
    built as a list of fully-qualified entity names from
    self.context.get().dataModels; uses None (not []) when the list is
    empty to avoid overwriting an existing value with an empty list.

  • yield_dashboard_lineage_details: added a first pass that fetches the
    stored Dashboard entity and, for every dataModels EntityReference on
    it, yields an AddLineageRequest edge from the DataModel to the Dashboard.
    This runs before the existing Table → DataModel logic so both edge types are
    populated in a single lineage run.

ingestion/tests/unit/topology/dashboard/test_sigma.py

  • Updated test_yield_dashboard to assert that the yielded
    CreateDashboardRequest.dataModels list is populated.
  • Updated lineage tests to supply vizualizationType on test
    Elements fixtures (required now that non-viz elements are skipped
    — this is a prerequisite for the companion fix/sigma-skip-nonviz-elements
    change).
  • Restored missing _get_datamodel mock in test_query_based_lineage_no_queries_fallback.

Changes

  • ingestion/src/metadata/ingestion/source/dashboard/sigma/metadata.py
  • ingestion/tests/unit/topology/dashboard/test_sigma.py

Test plan

  • pytest ingestion/tests/unit/topology/dashboard/test_sigma.py — all tests pass
  • Manually triggered full py-tests CI workflow on branch fix/sigma-datamodel-dashboard-lineage in fork — awaiting results

Type of change:

  • Bug fix

High-level design:

N/A — small bug fix across two methods in the Sigma connector.

Tests:

Use cases covered

  • Sigma ingestion run populates the dataModels field on the Dashboard entity in OM.
  • Lineage graph shows DataModel → Dashboard edges in addition to Table → DataModel edges.

Unit tests

  • Updated test_yield_dashboard to assert dataModels is populated.
  • Existing lineage tests updated to pass vizualizationType on test fixtures.
  • Files updated: ingestion/tests/unit/topology/dashboard/test_sigma.py

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

  • Not applicable (no new connector behaviour beyond the bug fix).

Playwright (UI) tests

  • Not applicable (no UI changes).

Manual testing performed

  1. Confirmed unit tests pass locally: pytest ingestion/tests/unit/topology/dashboard/test_sigma.py
  2. Reviewed generated CreateDashboardRequest JSON — dataModels field now populated.

UI screen recording / screenshots:

Not applicable.

Checklist:

  • I have read the CONTRIBUTING document.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

Summary by Gitar

  • CI/CD fixes:
    • Updated playwright-sso-tests.yml to dynamically generate provider secret keys using a shell step, replacing the unsupported upper() function.
  • Sigma connector improvements:
    • Populated dataModels field in CreateDashboardRequest and added unit test coverage for data model FQN resolution.
    • Updated yield_dashboard_lineage_details documentation to clarify that DataModel to Dashboard lineage is handled by the base class.

This will update automatically on new commits.

…→Dashboard lineage

Fix 1 — populate dataModels field:
When creating a Dashboard via yield_dashboard, populate the dataModels list
with FQNs of every ingested Sigma element. This exposes the DataModel
associations on the Dashboard entity in OM and enables Fix 3 to work without
extra per-element API calls.

Fix 3 — emit DataModel→Dashboard lineage edges:
In yield_dashboard_lineage_details, after yielding Table→DataModel lineage,
also emit DataModel→Dashboard edges so the full lineage chain is visible in OM:

  Table → DataModel → Dashboard

Implementation: fetch the Dashboard entity (which now carries dataModels thanks
to Fix 1), build an elementId→EntityReference map, then yield one
AddLineageRequest per element.
…); fix pyright type: ignore on context attributes
@zak-nuccio zak-nuccio requested a review from akash-jain-10 as a code owner May 19, 2026 22:26
Copilot AI review requested due to automatic review settings May 19, 2026 22:26
@zak-nuccio zak-nuccio requested review from a team, harshach and tutte as code owners May 19, 2026 22:26
@github-actions
Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Sigma dashboard ingestion to include dashboard data model references and documents lineage behavior, with accompanying unit-test expectation changes. It also includes an unrelated SSO Playwright workflow secret-key normalization change.

Changes:

  • Adds dataModels population to Sigma CreateDashboardRequest.
  • Updates Sigma unit-test expected dashboard payload.
  • Adjusts SSO workflow secret lookup key generation.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
ingestion/src/metadata/ingestion/source/dashboard/sigma/metadata.py Adds Sigma dashboard data model FQNs and updates lineage docstring.
ingestion/tests/unit/topology/dashboard/test_sigma.py Updates expected dashboard request to include dataModels.
.github/workflows/playwright-sso-tests.yml Adds provider key normalization for SSO secret lookup.

Comment on lines +139 to +149
dataModels=[
FullyQualifiedEntityName(
fqn.build( # type: ignore[arg-type]
self.metadata,
entity_type=DashboardDataModel,
service_name=self.context.get().dashboard_service, # type: ignore[attr-defined]
data_model_name=dm,
)
)
for dm in getattr(self.context.get(), "dataModels", None) or []
],
description="SAMPLE DESCRIPTION",
sourceUrl="http://url.com/to/dashboard",
charts=[],
dataModels=[],
Comment on lines +189 to +192
- name: Set provider secret key
if: ${{ matrix.provider != 'mock-oidc' }}
id: provider_key
run: echo "key=$(echo '${{ matrix.provider }}' | tr '[:lower:]-' '[:upper:]_')" >> $GITHUB_OUTPUT
@github-actions
Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

Copilot AI review requested due to automatic review settings May 20, 2026 04:43
@github-actions
Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented May 20, 2026

Code Review ✅ Approved

Populates the dataModels field on Dashboard entities and adds DataModel-to-Dashboard lineage edges to the Sigma connector, while fixing SSO secret generation in the CI pipeline. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment on lines +124 to +131
_dm_fqns = [
FullyQualifiedEntityName(
fqn.build( # type: ignore[arg-type]
self.metadata,
entity_type=DashboardDataModel,
service_name=self.context.get().dashboard_service, # type: ignore[attr-defined]
data_model_name=dm,
)
Comment on lines +354 to +359
Only Table → DataModel edges are emitted here. DataModel → Dashboard edges
are handled automatically by the base class ``yield_datamodel_dashboard_lineage``
which runs before this method inside ``yield_dashboard_lineage``.

Non-visualization elements (text boxes, dividers, buttons, controls) are skipped
to avoid Sigma API 500 errors on elements that carry no upstream lineage.
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.

2 participants