Amazon web services AWS Athena JDBC驱动程序ResultSet.getCharacterStream方法未实现

Amazon web services AWS Athena JDBC驱动程序ResultSet.getCharacterStream方法未实现,amazon-web-services,amazon-athena,Amazon Web Services,Amazon Athena,我有一个Athena/PrestoDB查询,返回多达3亿个设备ID。此屏幕截图显示在AWS UI中执行时的查询。结果在1分钟内显示出来,我在几分钟内从UI中提供的链接下载了完整的结果(319MB) 当我通过JDBC连接执行相同的查询时,我收到一个MethodNotImplemented错误。来自的AthenaJDBC41-1.0.0.jar似乎尚未实现getCharacterStream ActiveRecord::StatementInvalid: ActiveRecord::JDBCErr

我有一个Athena/PrestoDB查询,返回多达3亿个设备ID。此屏幕截图显示在AWS UI中执行时的查询。结果在1分钟内显示出来,我在几分钟内从UI中提供的链接下载了完整的结果(319MB)

当我通过JDBC连接执行相同的查询时,我收到一个MethodNotImplemented错误。来自的AthenaJDBC41-1.0.0.jar似乎尚未实现getCharacterStream

ActiveRecord::StatementInvalid: ActiveRecord::JDBCError: com.amazonaws.athena.jdbc.NotImplementedException: Method ResultSet.getCharacterStream is not yet implemented: SELECT distinct(device_id) FROM presales.sightings_v3 WHERE DATE(date) BETWEEN DATE('2016-03-01') AND DATE('2016-03-02') AND ( contains(audiences, 1133) OR contains(audiences, 1149) OR contains(audiences, 1184) );
我使用的是来自和的驱动程序AthenaJDBC41-1.0.0.jar

我的猜测是,方法ResultSet.getCharacterStream只用于大的结果,因为我的其他查询工作正常


理想情况下,我希望此响应包含查询id或S3路径,而不是流式传输大数据结果。我很好奇Athena UI如何在S3上生成指向结果的链接?

您可以从结果集获取查询id

((AthenaStatementClient)((AthenaResultSet)rs).getClient()).getQueryExecutionId()
有了它,您就可以用

<s3_staging_dir>/<query_id>.csv
/.csv

Rahul Pathak还表示,ResultSet.getCharacterStream将在下一个版本中实现。