Given a dataset id, how can I find out the resources that depends on that dataset id?

I have row level dataset and need to find out what datasets(parent datasets) that references this dataset id. How can I do that using the cli? I cannot seem to find in the documentation.

Hello @alltej - Thank you for posting your query. I am not quite sure if I understand your query well. However if you are looking for resources that depends on a certain dataset, you can get that details from the “Usage” tab of that dataset details page. Please see the reference snapshot below. Hope that helps! Thank you!

image

1 Like

Is that usage returned in the cli? That’s what I am looking.

Hello @alltej - Thank you for your response. There’s no readymade methods available to give you the usage at this point of time. However, you can definitely make use of a combination of methods and custom logic to determine the dependency. For example, list_analyses and describe_analysis calls can be used to identify the analyses which are dependent on a partucular analysis. Similarly dashboard dependencies can also be determined. Hope this helps!

2 Likes

Hi @alltej - You can explore the boto3 api for quicksight … Please see the below link - describe_data_set_permissions - Boto3 1.26.123 documentation

Hope this will help you to extract the permissions for data sets.

Regards - Sanjeeb

1 Like

I did look at that describe dataset but did not see any.

Hi @alltej - Ok, let me also try from my side. I believe you are looking for the data sets which are used by other dataset, right and you are looking for a solution programmatically?

Tagging @Ashok and @DeepakS for their advise as well.

Regards - Sanjeeb

1 Like

When you use DescribeDataset, the arn under “RowLevelPermissionDataset” will tell you which dataset contains the RLS rules.

image

If you want to find all datasets that use these rules, you have to loop through all your datasets and look for this arn.

3 Likes

Thank you @David_Wong for pointing the right API name, i will also check this one :slight_smile:

Regards - Sanjeeb

1 Like

HI @Sanjeeb2022 @Ashok @David_Wong

Not sure this solution answered the original ask. We are looking for all the analysis and dashboards which are using this dataset. same listed under “Usages” tab on dataset page.

Hi @mukeshusc2018,

I believe the original question was about how to find the datasets where an RLS dataset is being used.

If you want to use the API to find what dataset is being used in an analysis or dashboard, you can use DescribeAnalysis or DescribeDashboard. You’ll see “DataSetArns” in the response.

You can loop through the response for all your analyses and dashboards to look for a specific dataset ID.

Hi David, no we want the reverse of what you mentioned. but output should be same what’s showing up on “Usage” tab on a dataset.

List all the resources [analysis, dashboard etc] on a dataset.

Yes but imagine having thousands of dashboards, calling api for each of the dashboard and then matching the dataset ID would be nightmare. rather describing dataset resources and finding the dashboards and analyses directly using dataset ID.