Skip to content

Fixes #39529: Show nested column paths in lineage and draw in-model column edges on the right column rows - #39730

Merged
chirag-madlani merged 2 commits into
mainfrom
chirag-madlani/lineage-first-render-columns
Dec 4, 2026
Merged

chirag-madlani merged 2 commits into
mainfrom
chirag-madlani/lineage-first-render-columns

Conversation

@chirag-madlani

@chirag-madlani chirag-madlani commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #39529

Problem

When a data model has nested tables (for example a Power BI semantic model), lineage shows only the last part of each column's name. If two tables in the model share a column name, you can't tell the ends of an edge apart:

  • The node lists customer_id twice, with no table name.
  • The Edge Information drawer shows customer_id → customer_id.
  • For an edge that starts and ends in the same model, the drawer also left out the Target row. It took the first node that matched the source and never matched the same node as the target.
  • A column edge inside one model was drawn with the asset-level self-loop arc. It ran behind the node body, so its visible ends seemed to sit at the search box and between the rows, not at the two columns.

Fix

  • New getChildPathFromFQN(childFqn, entityFqn) in FqnUtils. It returns a column's path inside its entity, for example Orders.customer_id. For a normal top-level column it still returns just the column name.
  • Edge Information drawer: Source Column, Target Column and the column-mapping summary now show that path, measured against the source and target node.
  • Drawer: the source and target nodes are now looked up separately, so an edge within one model shows its Target row.
  • Node column list: when the lineage-only filter or a search hides the parent rows, nested columns are listed without indentation and with their parent path. When the full tree is visible, rows look the same as before.
  • The path is always the column's position inside its own node, at any depth. Nothing is taken from the other end of the edge; a normal top-level column, such as a table column, still shows just its name.
  • Deep paths never overflow the node. The parent path is muted and shrinks first with an ellipsis. The column name stays visible and takes at most 3/4 of the row, so some of the path is always shown. Hovering shows the full path. In the drawer, long paths wrap.
  • A column edge inside one model now leaves the source column's row on the node's right side and turns back, with its arrow, into the target column's row (getColumnLineageCoordinates and getEdgePathData). Asset-level self-edges keep their arc.
  • The drawer's helpers that build the overview rows moved to EdgeInfoDrawer.utils.ts, so the component file holds only the component.

Reproduce (via API, matches the issue)

  1. Create a CustomDashboard service zz_tmp_repro_dashboards.
  2. Create a PowerBIDataModel sales_model with nested TABLE columns: Orders(order_id, customer_id, amount) and Customers(customer_id, name).
  3. PUT /api/v1/lineage from model to model with columnsLineage: Orders.customer_id → Customers.customer_id.
  4. Open the model → Lineage → Layers: Column → click the column edge.

Before / After

Before After
Node before-node after-node
Edge drawer before-drawer after-drawer

Deep nesting (6 levels, long names), cross-model edge

Node Tooltip Drawer
deep-node deep-tooltip deep-drawer

Captured with the same Playwright script on two production builds (this branch, and this branch with the change reverted) against one local server.

Tests

  • FqnUtils.test.ts: nested path, top-level column, quoted name, and the fallback when the entity is unknown or doesn't match.
  • EdgeInfoDrawer.test.tsx: an edge within one model shows Orders.customer_id / Customers.customer_id and both endpoints. This test fails without the fix.
  • VirtualColumnList.component.test.tsx: plain names while the tree is visible, parent paths when the list is filtered.
  • CustomNode.utils.test.tsx: the parent path and the column name render as separate parts.
  • FqnUtils.test.ts: getParentPathFromFQN for deep, top-level and unrelated columns.
  • CanvasUtils.test.ts: a column edge inside one node ends on the right side of its target column.
  • EntityLineageEdgeUtils.test.ts: that edge is drawn as a loop on the right side, and an asset-level self-edge keeps its arc.
  • yarn test on the affected suites: 343/343 pass.

Not in scope

On the global Lineage page, the backend (LineageSceneMapper.fields) sends only a node's top-level columns, so nested columns don't appear there at all. That needs a backend change and will be a separate fix.

🤖 Generated with Claude Code

…olumn edges on the right column rows

- Edge drawer and node column list show a nested column's path inside its
  own entity (Orders.customer_id) instead of the ambiguous leaf name.
- Deep paths truncate the parent path first; the column name stays visible
  and the full path is in the tooltip.
- Edge drawer resolves source and target nodes separately, so an edge within
  one model shows its Target row.
- A column edge inside one model loops on the node's right side between the
  two column rows instead of reusing the node-level arc behind the node.
- Move the edge drawer's overview builders to EdgeInfoDrawer.utils.ts.
@chirag-madlani
chirag-madlani requested a review from a team as a code owner December 4, 2026 05:00
@chirag-madlani
chirag-madlani requested review from Rohit0301 and a balanced review from Copilot and removed request for a team December 4, 2026 05:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

The parent path takes its muted colour from the color prop instead of a
text-colour class, matching the plain-name branch.
Copilot AI balanced review requested due to automatic review settings December 4, 2026 06:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@gitar-bot

gitar-bot Bot commented Dec 4, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk 1 closed / 1 findings

The lineage UI now qualifies nested columns and reroutes in-model edges; display and geometry changes could obscure or misidentify column lineage relationships.

Nested column paths now show their parent table in lineage nodes and the Edge Information drawer, and in-model column edges are drawn from the source column's row to the target column's row on the right side. The styled raw spans for the nested column label were resolved in favor of core Typography. No issues found.

✅ 1 closed
✅ Quality: Nested column label uses styled raw spans, not core Typography

📄 openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityLineage/CustomNode.utils.tsx:206-213
ColumnNameLabel draws the parent path and the column name with raw <span>s styled by class. The parent path also gets its muted colour from className="tw:text-tertiary". The component-library rules say both cases should use core Typography: a styled <span> becomes Typography as="span", and the muted colour comes from its color prop (secondary renders text-tertiary), not from a text-colour class. The plain-name branch of this same component already uses Typography, so the two branches are styled two different ways. Keep the truncation and shrink classes, since they are layout.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@chirag-madlani chirag-madlani added the To release Will cherry-pick this PR into the release branch label Dec 4, 2026
@chirag-madlani
chirag-madlani merged commit ef53974 into main Dec 4, 2026
38 checks passed
@chirag-madlani
chirag-madlani deleted the chirag-madlani/lineage-first-render-columns branch December 4, 2026 06:46
@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

🤖 Backport to 2.1 is under way. It is built from openmetadata-collate, which holds the credentials needed to open a PR here, and it will comment again with the result — nothing is needed from you unless it reports otherwise.

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

🤖 Backport to 2.0 is under way. It is built from openmetadata-collate, which holds the credentials needed to open a PR here, and it will comment again with the result — nothing is needed from you unless it reports otherwise.

@gh-bot-collate

gh-bot-collate Bot commented Dec 4, 2026

Copy link
Copy Markdown

🤖 Backport to 2.1 opened as #39757. Claude resolved a cherry-pick conflict to build it. It merges itself once the checks pass, so read the diff now if this change is a sensitive one.

@gh-bot-collate

gh-bot-collate Bot commented Dec 4, 2026

Copy link
Copy Markdown

🤖 Backport to 2.0 failed. The conflict could not be resolved, so this change is not on that branch. Resolver run.

chirag-madlani added a commit that referenced this pull request Dec 4, 2026
…odel column edges on the right column rows (#39757)

* Fixes #39529: Show nested column paths in lineage and draw in-model column edges on the right column rows (#39730)

* Fixes #39529: Show nested column paths in lineage and draw in-model column edges on the right column rows

- Edge drawer and node column list show a nested column's path inside its
  own entity (Orders.customer_id) instead of the ambiguous leaf name.
- Deep paths truncate the parent path first; the column name stays visible
  and the full path is in the tooltip.
- Edge drawer resolves source and target nodes separately, so an edge within
  one model shows its Target row.
- A column edge inside one model loops on the node's right side between the
  two column rows instead of reusing the node-level arc behind the node.
- Move the edge drawer's overview builders to EdgeInfoDrawer.utils.ts.

* Use Typography for the nested column label segments

The parent path takes its muted colour from the color prop instead of a
text-colour class, matching the plain-name branch.

(cherry picked from commit ef53974)

* Remove unused ColumnLineage import from EdgeInfoDrawer

On 2.1 the only user of ColumnLineage in this file moved to
EdgeInfoDrawer.utils.ts, so organize-imports removed it and failed UI checkstyle.

---------

Co-authored-by: Chirag Madlani <[email protected]>
chirag-madlani added a commit that referenced this pull request Dec 4, 2026
…odel column edges on the right column rows (#39730) (#39761)

* [2.0] Fixes #39529: Show nested column paths in lineage and draw in-model column edges on the right column rows (#39730)

Backport of #39730 to 2.0, adapted to the 2.0 lineage code:
- Drawer and node column rows keep 2.0's Ant Design components; only the
  path labels, the self-edge node lookup and the in-model column loop are
  applied.
- The column-mapping summary row, the drawer utils move and the core
  Typography/Tooltip label are main-only and not included.

(cherry picked from commit ef53974)

* Use core Tooltip for the nested column path on 2.0

Adding Tooltip to the antd import failed the Antd + Less deprecation guard.
The core Tooltip continues press propagation so a click still selects the row.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

To release Will cherry-pick this PR into the release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lineage UI shows nested column names without their parent table, so same-named columns in different tables of one data model are ambiguous

3 participants