SPICE Usage Analytics (Dataset Sizes by User/Group/Namespace, Permissions, etc)

Use Case

Customers at times have challenges in understanding and obtaining information about the SPICE consumption details for a QuickSight account. The maximum SPICE capacity and SPICE capacity consumed in a QuickSight region can be monitored using the Amazon CloudWatch automatic dashboards for QuickSight. As QuickSight adoption grows, customers have the need to analyze how their SPICE is consumed and to secure insights that can help them proactively monitor SPICE datasets.

In this article, we will consider the following 3 use cases:

  • ISV customers with multiple namespaces who would like to know the SPICE usage for each dataset across customer namespaces/groups for all regions.

  • Customers who would like to determine datasets which are created via file upload or via other data sources and analyze SPICE consumption for each of them.

  • Scenarios where customers would like to identify all duplicate datasets or any orphaned datasets not being utilized in an account for housekeeping purposes.

Solution

Using Amazon QuickSight API’s, we can build a solution that can retrieve all the dataset details along with their permissions and ownership and store them in a database or csv files in an Amazon S3 bucket. The data can then be used to build a QuickSight dashboard. Below are the steps to generate the data:

  • List all datasets along with SPICE capacity using ListDataSets and check for Import mode as SPICE.
  • Using the list above, now describe the datasets using DescribeDataSet and get creation date, last updated date, and their permissions using DescribeDataSetPermissions.
  • Retrieve information about File based datasets and their details using ListIngestions.
  • Track SPICE usage by users, groups or namespaces ,get list of all users across all namespaces using ListUsers.
  • List all dashboards using ListDashboards and identify dependent datasets with DescribeDashboard.

The below flowchart outlines the steps required to build the solution:

Shown below is a sample dashboard built in QuickSight from the data extracted to an S3 bucket.

The process to extract all dataset information using API operations can be scheduled to run frequently, and results can be pushed to an S3 bucket in your account. Furthermore, we can use new suites of data ingestion APIs from this link to refresh data in SPICE providing updated view for all insights in dashboard.

In this article, we demonstrated how you can get SPICE consumption details for all datasets for your QuickSight account. We also showed how you can easily determine SPICE usage as well as which datasets are created with the upload file option and which ones are not file-based. Once you obtain all of the above information, you can easily visualize and derive insights and create alerts for dataset usage.

Authors : @Neeraj , @salim

4 Likes

Hi @Neeraj! Thank you for this nice article! Could you clarify one moment please, how did you get total size of the SPICE? I cannot find documented API for this. Is this a legitimate way to get it? Thanks in advance!

Hi @Roman ,

To get Total SPICE “used” capacity you can list all dataset in your account and describe each datasets using DescribeDataSet and check if Import Mode is SPICE then get ConsumedSpiceCapacityInBytes , again this is not applicable for uploaded files as a source. . For File based datasets you may have to use ListIngestions and read all IngestionSizeInBytes .
Adding them all SPICE capacity that’s how we got 69 GB total SPICE capacity as referred in dashboard shown above.

At present there is no API to get total “purchase” SPICE capacity in account ( we have feature request to add one in future). For now this can be input you can provide the way we set 100 GB in dashboard as shown in above example.

1 Like

Thank you very much, @Neeraj! Yes, I came up with similar approach (by summarizing SPICE usage of each dataset). Nice touch on ingestions. Thanks again!

1 Like