How to schedule or automate dataset refresh in aws quicksight

Question:

What are the options available to schedule or automate refresh of a quicksight SPICE dataset?

Are there any APIs available to automate spice datatset refresh? preferably using python.

Answer:

You have two options,

Using API services available in the latest version of boto3

Use ‘create_ingestion‘ method to initiate dataset refresh, and use ‘describe_ingestion‘ to check the status of refresh

DataSetId of dataset can be found from aws URI or use ‘list_data_sets‘ method to list all datasets and get DataSetId from the field [‘DataSetSummaries’][‘DataSetId’] method call response

IngestionId – set unique id, I used current time in epoch [str(int(time.time()))]

– Schedule refresh using schedule option in quicksight dataset

You can schedule refreshes for ‘hourly’, ‘daily’, ‘weekly’ or ‘monthly’ cadence using schedule option in quicksight-dataset

enter image description here

Leave a Reply