具有Athena自定义查询的Tableau数据源

时间:2018-06-22 05:37:09

标签: datasource tableau amazon-athena tableau-server

使用自定义查询时,在Tableau Desktop上出现以下错误,当直接将表拖到Tableau Desktop上的查询构建器部分时,我能够成功连接并查看表中的内容。

使用的数据源:AWS Athena

驱动程序版本:AthenaJDBC42_2.0.2

Tableau Desktop版本: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.

2 个答案:

答案 0 :(得分:0)

尝试删除;从子查询中-总是对我抛出错误

答案 1 :(得分:0)

我遇到了同样的问题。 为了使上述内容更加清楚-Tableau正在添加外部查询。这是我的简单查询,Tableau返回了错误。 Tableau Athena Custom SQL error

我能够通过更改查询以使用“ database”。“ table”形式引用我的表并删除结尾来解决该问题;

然后该自定义查询对我有用:

successful query