Linking Superset Chart to Focus Show on Dashboard in DataHub

Original Slack Thread

Dear all, I have injested Superset, there is a link for the each chart (View in superset). This link forwards me to the edit window of the chart in the superset. Now I want this link forward me to the dashboard and then focus show the chart. How this will be possible? Thank you so much.

Hey there! :wave: Make sure your message includes the following information if relevant, so we can help more effectively!

  1. Are you using UI or CLI for ingestion?
  2. Which DataHub version are you using? (e.g. 0.12.0)
  3. What data source(s) are you integrating with DataHub? (e.g. BigQuery)
  1. UI

Charts can appear in multiple dashboards, right? It might be awkward to link to one dashboard if the chart is also in another dashboard

Yes I agree with you, but there is urgent need to show the chart in the dashboard with focus. Could you please show how it could be possible?

Right now, I believe the easiest solution for you would be to query the superset API yourself and emit the ChartInfo aspect with an updated chartUrl. I’d suggest using the DataHubGraph class in to pull the existing ChartInfo aspect, then edit it in memory, then again use the DataHubGraph to re-emit it.

Thank you so much, can we achieve the same goal by changing the inside source code the datahub

You can make a fork of datahub, or you can submit a pull request. I think we’ll be hesitant to add this change unless it’s behind a config flag, though, because it’s not clear to me that all users will want this behavior over the current one