Bug? Errors when describing dashboard definitions

I was hoping to copy a dashboard definition from one environment to another, but I can’t describe the dashboard without getting lots of errors.

Here are some examples:

        {
            "Type": "COLUMN_NOT_FOUND",
            "Message": "Column that used in the parameter can not be found in Dataset",
            "ViolatedEntities": [
                {
                    "Path": "parameter/EndDateRange"
                }
            ]
        },
        {
            "Type": "DATA_SET_NOT_FOUND",
            "Message": "The DataSet that used in the calculated field can not be found in the analysis",
            "ViolatedEntities": [
                {
                    "Path": "calculated-field/StabilityFlag"
                }
            ]
        }

I then ran a test by performing the following steps on an existing analysis:

  1. Removed all sheets, filters, controls, and parameters
  2. Removed all datasets except 1
  3. Removed all calculated fields from remaining dataset
  4. Created an empty sheet
  5. Published a new dashboard from this analysis

When describing the definition of the new dashboard, I saw the following:

  • Errors: 86
  • DataSetIdentifierDeclarations: 1
  • Sheets: 1
  • CalculatedFields: 177
  • ParameterDeclarations: 0
  • FilterGroups: 0
  • ColumnConfigurations: 38

This leads me to believe there is a bug in the way QuickSight publishes and/or describes dashboards.

Thank you for letting us know. I would recommend filing a case with AWS Support where we can dive into the details so that we can help you further. Here are the steps to open a support case. If your company has someone who manages your AWS account, you might not have direct access to AWS Support and will need to raise an internal ticket to your IT team or whomever manages your AWS account. They should be able to open an AWS Support case on your behalf. Hope this helps!

1 Like

Hey @IanAtVolvo, have you been able to figure this out? I am experiencing the same problem. Some “ghost” calculated fields are showing up in the describe call, which also prevents the asset export feature from working. I do not see any of these fields in the UI.

It looks like some old calculated fields are not removed from some internal database, and they make their way into the description somehow. Which seems to be actually invalid beyond the errors it reports. As of now, it has duplicate field names. The old names that used an old data set are still there, and then the new name referencing the new data set is also there.

Hi @m0ltar,

Yes, I’ve noticed the same exact issue! I’ve opened multiple tickets with AWS support but haven’t gotten much help from them.

@Ramon_Lopez ^ That’s the kind of support I was talking about with you in the DMs.

I found that this happens if you have a calculated field that you created in your analysis, and you replace the original dataset in your analysis by a new dataset that contains a field with the same name. The field mapping when replacing the dataset doesn’t include calculated fields, so you end up with 2 fields with the same name.

The UI doesn’t allow 2 fields with the same name, so it only shows the field from the new dataset. The calculated field is not displayed in the UI but it’s still in the analysis/dashboard. It has an error because it contains references to the old dataset.

1 Like

@IanAtVolvo

Can you please share the ticket numbers via private message? i’d love to learn about this issue and see how we can help.

Thanks

@David_Wong this totally matches what I have seen in the output. All of the problematic calculated fields had the same name as the new fields! Great observation!

@m0ltar

I wonder if QuickSight should include calculated fields in the field mapping when we replace a dataset in an analysis. This would allow us to replace a calculated field in the analysis by a field that comes from the new dataset. Sometimes we decide to move a calculation from the analysis to a dataset. That’s when this issue arises.

I had a similar issue and I could fix it in an indirect way. I wanted to export Quicksight analysis asset as bundle, however, the export complained that the analysis has error and the export can only be executed on error-free analysis. The problem is that QS analysis shows no error, and there is no way to remove this error on the GUI. Here are the steps that I did.

  1. Run the describe-analysis-definition command (in PowerShell, Windows) and also store the output to a text file to help the analysing easier.
aws quicksight describe-analysis-definition --aws-account-id {your_account_id_here} --analysis-id {your_analysis_id_here} > description_output.txt

The output text shows any errors, the definition, etc.

....
"Errors": [
        {
            "Type": "COLUMN_NOT_FOUND",
            "Message": "Column that used in the filter can not be found in Dataset",
            "ViolatedEntities": [
                {
                    "Path": "filter-group/xxxxxxx/filter/yyyyyy"
                }
            ]
        }
    ],
    "Definition": {....},
.....
  1. To better understand this error, go to the filter definition mentioned in the error (search for the filter ID value yyyyyy in the text file).
{
                "FilterGroupId": "xxxxxxx",
                "Filters": [
                    {
                        "TimeRangeFilter": {
                            "FilterId": "yyyyyy",
                            "Column": {},
                            "IncludeMinimum": true,
                            "IncludeMaximum": true,
                            "RangeMinimumValue": {
                                "Parameter": "StartDate"
                            },
                            "RangeMaximumValue": {
                                "Parameter": "EndDate"
                            },
                            "NullOption": "NON_NULLS_ONLY",
                            "TimeGranularity": "DAY"
                        }
                    }
.....
}

Comparing to other filter definitions, this filter is missing the column definition (empty). This is the reason of the error. It seems to me that the column of this filter would refer to a no-more-existing dataset/column, but its filter still exists. However, in Quicksight GUI, we can only see and edit filters of existing visual/dataset. Therefore, there is no way to remove this zombie-filter in the GUI and this error stays for this analysis and we cannot export asset bundle it.

  1. To remove this error, I used the command update-analysis. I will need to copy the definition value from the above output text file and (in my case) remove the zombie filter definition that causes the analysis error and save it in a text file (updated_definition_analysis.json) for the below command.
aws quicksight update-analysis --aws-account-id {your_account_id} --analysis-id {your_analysis_id} --name '{your_analysis_name}' --definition file://updated_definition_analysis.json

This command will update your QS analysis and will tell you the status of the update progress. After this update is completed, you can use the describe-analysis-definition to check if the error is resolved.

I hope this could help removing all the errors and you can export Quicksight as asset bundle successfully.

2 Likes

When I put a file patch in the definition section, I get this error, any advice?