Quicksight Dataset/Datasource changes not visible in Browser Console

0

Nitpick about Quicksight in its current incarnation (currently on first-month trial, pay-per-session plan):

Datasets added from the CLI don't show up in the Browser Console (even after adding permissions shown below)

Also, datasets deleted from the CLI still show up in the list of datasets in Browser Console until you remove them (of course they don't really exist)

Dashboards (and I'd assume Analyses) do, however, display correctly in the Browser Console when added or removed from the CLI

If this is by design, I'd request changing the design, as it breaks the whole automated CLI workflow process.

Suggested fix: Quicksight should update its cached list of datasets every time the Datasets option is clicked in the browser console.

Perms used: "quicksight:UpdateDataSourcePermissions", "quicksight:DescribeDataSourcePermissions", "quicksight:PassDataSource", "quicksight:DescribeDataSource", "quicksight:DeleteDataSource", "quicksight:UpdateDataSource"

asked a year ago1336 views
1 Answer
2

Hello,

Greetings of the day.

Thank you for reaching out with your concern in AWS re:Post.

In order to confirm, I tried reproducing same on my test environment as follow:

Creating dataset:

aws quicksight create-data-set --aws-account-id 21*** --data-set-id asdf --name asdf --import-mode "DIRECT_QUERY" --physical-table-map file://file21.json

Following are the contents of file21.json:

{ "test211": { "CustomSql": { "DataSourceArn": "arn:aws:quicksight:us-east-1:****:datasource/*****", "Name": "New custom SQL", "SqlQuery": "SELECT country FROM "spectrum-db"."sqlcontinentcountry" limit 10", "Columns": [ { "Name": "country", "Type": "STRING" } ] } } }

I was successfully able to create a dataset and got the following output,

{ "Status": 201, "Arn": "arn:aws:quicksight:us-east-1:****:dataset/asdf", "DataSetId": "asdf", "RequestId": "8849dc98-1bef-44df-8a22-a40ba0d766c4" }

Results: Could see this dataset on UI as well.

Deleting dataset:

aws quicksight delete-data-set --aws-account-id 215926120184 --data-set-id da337620-24ff-4181-88a4-74fc73781def

I was successfully able to delete dataset and got the following output,

{ "Status": 200, "Arn": "arn:aws:quicksight:us-east-2:215926120184:dataset/da337620-24ff-4181-88a4-74fc73781def", "DataSetId": "da337620-24ff-4181-88a4-74fc73781def", "RequestId": "3f5b2796-ee2c-4ead-ae71-badd82f30fb4" } Results: Could see this dataset deleted from UI as well.

However, I understand that you are not able to see similar results on UI and with this regards, I would like to inform you, this behaviour you are observing can appear due to 2 reasons:

  1. The Quicksight user in the UI console is checking the dataset in a region different from the actual region where the dataset resides.

  2. The dataset owner did not share the dataset to the user who is viewing them in QuickSight UI console. Here, please try to verify if those datasets owned by the same QuickSight user through using the cli below . [1]

    aws quicksight describe-data-set-permissions --aws-account-id xxxx --data-set-id yyyy

Resolution:

  1. I understand you mentioned you have the correct permissions but please verify again if you have actually given permissions to the data source that was created via the CLI. To get data sources listed in the UI, you need to update data source permissions and provide permissions to the user from which you are currently logged in to QuickSight. In order to update the data source permissions you can run the following:

aws quicksight update-data-source-permissions --aws-account-id <Account_Id> --data-source-id <Datasource_id> --grant-permissions file://permissions1.json

You must create a permissions1.json file and it should contain the following in order to share the Data Source with "User" permissions:

[ { "Actions": [ "quicksight:DescribeDataSource","quicksight:DescribeDataSourcePermissions","quicksight:PassDataSource" ], "Principal": "arn:aws:quicksight:region:<Account_ID>:user/default/<UserName>" //QuickSight UserARN or QuickSight GroupARN } ]

In order to share the Data source with the "Owner" permissions use the following in the permissions1.json file:

[ { "Actions": [ "quicksight:DescribeDataSource","quicksight:DescribeDataSourcePermissions","quicksight:PassDataSource","quicksight:UpdateDataSource","quicksight:DeleteDataSource","quicksight:UpdateDataSourcePermissions" ], "Principal": "arn:aws:quicksight:region:<Account_ID>:user/default/<UserName>" //QuickSight UserARN or QuickSight GroupARN } ]

  1. Also ensure that the QuickSight user in the UI console is not checking for the data source in a region that is different from the actual region the data source has been created.

  2. Try clearing cache of your browser or try viewing dataset from different browser in case Browser is causing the issue.

I hope the above information is helpful to you.

Thank you and have a great day ahead.

References:

[1]https://docs.aws.amazon.com/cli/latest/reference/quicksight/describe-data-set-permissions.html
[2]https://awscli.amazonaws.com/v2/documentation/api/latest/reference/quicksight/update-data-set-permissions.html

AWS
Priya_s
answered a year ago
profile picture
EXPERT
iwasa
reviewed a year ago
  • Thank you, that worked! The commands are so similar, I thought data-source was just a legacy version of data-set. Once I added the physical-table-map it worked. It might be a good idea to add that example to the standard CLI reference. In any case, thank you greatly for your detailed assistance!

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions