3

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.
John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
DJo
  • 2,133
  • 4
  • 30
  • 46

2 Answers2

3

Try removing the ; from the subquery - That always throws errors for me

1

I was having the same issue. To provide some clarity to the above - the outer query is being added by Tableau. Here is my simple query and the error being returned by Tableau. Tableau Athena Custom SQL error

I was able to resolve by changing my query to refer to my table in the form "database"."table" and remove the closing ;

This custom query then worked for me:

successful query

angie_s
  • 121
  • 1
  • 6