Analysis or Dashboard Definition Validation

Hi,

Quick Sight console allows the creation of a dashboard even if there are errors in the analysis, such as missing fields, invalid calculations, or invalid filters. However, when I create a JSON file using describe-dashboard-definition and then recreate the dashboard using create-dashboard command, then I get errors such as “INVALID_CALCULATED_COLUMN_EXPRESSION”, “INVALID_CONDITIONAL_FORMATTING_EXPRESSION”, etc. An analysis can become invalid because of a change in the dataset field name or some out-of-the-box visual formatting option.

Is there a way to validate an analysis or a dashboard definition so that we have a working JSON file for backup or migration to a new environment? Or is there a way to ignore validation errors as being done by Quick Sight Console?

In various posts, it has been suggested to use templates, but commands such as describe-dashboard-definition & create-dashboard should work too. We want to utilize Quick Sight APIs for backup and migrations.

Thanks for your insight on this.

Hi @qsuser

When managing Quick Sight dashboards across environments for example, migrating dashboards from development to production or backing them up it’s important to note how Quick Sight’s APIs handle dashboard definitions.

Unlike the Quick Sight console, which allows you to create or publish dashboards even if there are some issues like missing fields or invalid calculated columns, the API operations (such as describe-dashboard-definition and create-dashboard) enforce stricter validation. This means that if your dashboard JSON contains invalid calculated fields, references to missing dataset columns, or unsupported formatting options, the API calls will fail with errors like INVALID_CALCULATED_COLUMN_EXPRESSION or INVALID_CONDITIONAL_FORMATTING_EXPRESSION. As a result, directly exporting and recreating dashboards using these API commands may be challenging when dashboards have evolved or datasets have changed.

To address this, AWS strongly recommends using Quick Sight templates for backup and migration workflows. Templates provide an abstraction layer that allows easier migration by decoupling dashboards from specific dataset details and mitigating errors caused by missing or renamed fields. Using templates, you can export the core dashboard and analysis logic, update dataset mappings, and then deploy dashboards in new environments more reliably.

  • Validate and clean up your dashboards and analyses in the source environment to remove or fix invalid calculated fields or broken references before exporting.
  • Use the API commands to create templates from your existing analyses or dashboards.
  • Deploy dashboards in the target environment from these templates by mapping datasets accordingly.

Please refer to the below Quick Sight documentations and community post this might be helpful for you.

Hi @qsuser

It’s been a while since we last heard from you. If you have any further questions, please let us know how we can assist you.

If we don’t hear back within the next 3 business days, we’ll proceed with close/archive this topic.

Thank you!

Hi @qsuser

Since we have not heard back from you, I’ll go ahead and close/archive this topic. However, if you have any additional questions, feel free to create a new topic in the community and link this discussion for relevant information.

Thank you!