How to get related analysis/dashboard for a given dataset?

Hello all,

I am working on a pipeline to maintain Quicksight assets using a lambda (python). One of my tickets is to delete orphan data sets.

I am aware I can get all analysis/dashboards details and then find all the data sets related to them and therefore identify the ones I am no longer using. But I think that would not be a very efficient way to do it.

When I go to the UI and try to delete a data set, quicksight right away shows a pop up stating how many dashboards and analysis would be affected if I proceed with the deletion and wondering if there a API call I can leverage to get that same information without going the details of hundreds of assets.

Thank you in advance for your help, ideas and time.

Hi @jjluna,
I’m not completely sure that there is currently a more efficient way to complete this, you could potentially try out the ‘describe-data-set’ API, this may be able to provide that information but I unfortunately have not had the opportunity to test out. Let me know if this can help provide the information you’re looking for, if not than I can mark this as a feature request!

Hello @Brett ,

Thanks for your answer. Actually I am using describe_analysis_definition and describe_dashboard_definition to get the used datasets, but I do not believe is the most efficient way to do it as I have a fairly large amount of reports and it just take a lot of time.

Thanks again for your input.

Hi @jjluna,
I agree, it would be very helpful if there was a more efficient way to handle this. One other note to add, while this isn’t achieved through using any type of API call; another way to view the assets that a dataset is being used in/attached to (plus you have the ability to ‘revoke access’ from this section) is to do the following:
Under your datasets section, select the dataset in question, click the ellipses next to the name and select ‘Manage Permissions’:

Then switch over to ‘Usage’ at the top and you’ll receive a list of assets that is currently utilizing that dataset. You can revoke access to those assets from here:

Additionally though, I’ll mark this as a feature request to promote visibility to the support team!