JDBC AWS - Athena - 指定数据库

问题描述 投票:0回答:1

我正在尝试将 Athena 与 JDBC 结合使用来执行一些 SQL 查询。我已经阅读了很多如何连接:

"jdbc:awsathena://AwsRegion=us-east-1;User=%s;Password=%s;S3OutputLocation=%s"

上面是简单的示例,但如何指定我将连接或执行查询的数据库。

当我使用这个网址时,我发现了这个错误:

Exception in thread "main" java.sql.SQLException: [Simba][AthenaJDBC](100071) An error has been thrown from the AWS Athena client. TABLE_NOT_FOUND: line 1:15: Table 'awsdatacatalog.default.fc_content' does not exist

此表是在另一个数据库和数据源中创建的。

jdbc amazon-athena
1个回答
0
投票

手册第 100 页您可以看到如何在连接时选择目录。

您还可以在查询中使用完全限定的表名称作为替代方案。

© www.soinside.com 2019 - 2024. All rights reserved.