Getting error - We can't parse this SQL syntax. If you are using custom SQL, verify the syntax and try again

Hi Team ,

I am getting below error in eu-west1 region for table visual.

I have checked dataset it is working fine. but this issue we see in only analysis and dashboard. This we are not facing in any other region.

Can you please help me to resolve this.

Hi @rnikam

Could you please confirm whether you have author/owner access to the dashboard and are able to edit it? This error typically occurs when there is an issue with the custom SQL or the dataset query being used.

To help us investigate further, could you please share:

  1. Is the dataset running in SPICE or Direct Query mode?
  2. What type of data source is being used (e.g., Redshift, Athena, MySQL)?

If you’re not familiar with the SQL that was used to build the dataset, I’d recommend reaching out to the original author of the dashboard. They would have the best context on the query logic and can help pinpoint where the syntax issue may be occurring.

Please refer to the following community post, which has addressed the similar issue.

Hi @Xclipse ,

Yes I am the owner of both dataset and dashboard . We are using custom sql in direct query dataset. We have analysed and it seems something related to multiselect. Where ever we are using multiselect that reports are failing and only in 1 region.

Hi @rnikam

Thank you for narrowing it down, that’s very helpful.

The issue with multiselect parameters in custom SQL with Direct Query is a known pattern that can cause this SQL parsing error. When multiple values are selected, QuickSight expands the parameter values into the SQL query, and this can sometimes result in syntax that the underlying data source cannot parse.

Could you please try the following:

  • Verify the parameter syntax: Please ensure the custom SQL uses the IN clause for multiselect parameters rather than =. For example: WHERE column IN (<<$parameter>>)

  • Test with a single selection: Please confirm whether the error only occurs when multiple values are selected in the multiselect control.

Hi @rnikam

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!