Skip to content

Comments

feat: lineage and usage visualization#37701

Draft
qf-jonathan wants to merge 6 commits intoapache:masterfrom
qf-jonathan:feat/lineage-and-usage-visualization
Draft

feat: lineage and usage visualization#37701
qf-jonathan wants to merge 6 commits intoapache:masterfrom
qf-jonathan:feat/lineage-and-usage-visualization

Conversation

@qf-jonathan
Copy link
Contributor

@qf-jonathan qf-jonathan commented Feb 5, 2026

SUMMARY

This PR introduces a comprehensive lineage visualization feature that allows users to explore data relationships across datasets, charts, and dashboards using interactive Sankey diagrams.

Three Lineage Perspectives:

  1. Dataset Lineage: Shows upstream database and downstream charts/dashboards that use the dataset
  2. Chart Lineage: Displays the complete data pipeline from database → dataset → chart → dashboards
  3. Dashboard Lineage: Reveals all upstream databases, datasets, and charts feeding into a dashboard

Implementation:

  • Backend: Three new REST API endpoints (/api/v1/lineage/{dataset|chart|dashboard}/<id>) with proper permissions and comprehensive unit tests
  • Frontend: LineageView component with ECharts Sankey chart, API hooks, and LineageModal for reusable display across the application

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

lineage-demo.mp4

TESTING INSTRUCTIONS

View Dataset Lineage:

  1. Navigate to Data → Datasets
  2. Click on any dataset to open the edit dialog
  3. Click the Lineage tab
  4. Verify you see a Sankey diagram showing the database, dataset, and all charts/dashboards using it
  5. Click on any node in the diagram and verify details appear at the bottom
  6. Click Close to dismiss the details panel

View Chart Lineage:

  1. Navigate to Charts
  2. Click the three-dot menu (⋮) on any chart card
  3. Select View Lineage
  4. Verify the modal shows the data flow: database → dataset → chart → dashboards
  5. Click on the chart node and click Open Chart to verify navigation works
  6. Alternatively, open any chart in Explore view, click the header menu (⋮), and select View Lineage

View Dashboard Lineage:

  1. Navigate to Dashboards
  2. In dashboard edit mode, click the three-dot menu (⋮) on any dashboard card
  3. Select View Lineage
  4. Verify the diagram shows all databases, datasets, and charts feeding into the dashboard
  5. Click on a dashboard node and click Open Dashboard to verify navigation
  6. Alternatively, open any dashboard, click the header menu (⋮), and select View Lineage

Test Interactive Features:

  • Click different nodes and verify the details panel updates with correct information
  • Verify database and dataset nodes show only a Close button
  • Verify chart and dashboard nodes show both Open and Close buttons
  • Verify the legend at the top matches the node colors in the diagram

ADDITIONAL INFORMATION

  • Changes UI
  • Introduces new feature or API
  • Has associated issue:
  • Required feature flags:
  • Includes DB Migration
  • Removes existing feature or API

@github-actions github-actions bot added the api Related to the REST API label Feb 5, 2026
@netlify
Copy link

netlify bot commented Feb 5, 2026

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit c2c78b8
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/69849dd2ca874300086fc5e5
😎 Deploy Preview https://deploy-preview-37701--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov
Copy link

codecov bot commented Feb 5, 2026

Codecov Report

❌ Patch coverage is 70.62147% with 52 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.61%. Comparing base (e10237f) to head (c2c78b8).
⚠️ Report is 11 commits behind head on master.

Files with missing lines Patch % Lines
superset/datasets/api.py 24.00% 19 Missing ⚠️
superset/charts/api.py 25.00% 18 Missing ⚠️
superset/dashboards/api.py 31.81% 15 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #37701       +/-   ##
===========================================
+ Coverage        0   43.61%   +43.61%     
===========================================
  Files           0      646      +646     
  Lines           0    49650    +49650     
  Branches        0     5560     +5560     
===========================================
+ Hits            0    21655    +21655     
- Misses          0    27696    +27696     
- Partials        0      299      +299     
Flag Coverage Δ
hive 41.89% <70.62%> (?)
presto 41.91% <70.62%> (?)
python 43.61% <70.62%> (?)
unit 100.00% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Vitor-Avila
Copy link
Contributor

Really cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Related to the REST API review:draft size/XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants