I'm getting the below error on Tableau Desktop when using the custom query, I'm successfully able to connect and see contents from the table when directly drag the table to query builder section on Tableau Desktop.
Datasource used: AWS Athena
Driver version: AthenaJDBC42_2.0.2
Tableau Desktop version: 10.4
com.tableausoftware.jdbc.TableauJDBCException: Error reading metadata for executed query: SELECT * FROM ( select * from tablename ) "TableauSQL" LIMIT 0 [Simba][AthenaJDBC](100071) An error has been thrown from the AWS Athena client. Only one sql statement is allowed. Got: SELECT * FROM ( select * from tablename ;) "TableauSQL" LIMIT 0
There was a Java error.
Unable to connect to the server "Athena.us-east-1.amazonaws.com". Check that the server is running and that you have access privileges to the requested database.