我正在使用 JDBC连接到特定工作组的Athena 。但是默认情况下,它会重定向到主要工作组 下面是代码片段
Properties info = new Properties();
info.put("user", "access-key");
info.put("password", "secrect-access-key");
info.put("WorkGroup","test");
info.put("schema", "testschema");
info.put("s3_staging_dir", "s3://bucket/athena/temp");
info.put("aws_credentials_provider_class","com.amazonaws.auth.DefaultAWSCredentialsProviderChain");
Class.forName("com.simba.athena.jdbc.Driver");
Connection connection = DriverManager.getConnection("jdbc:awsathena://athena.<region>.amazonaws.com:443/", info);
如您所见,我正在使用“工作组”作为属性的键。我也尝试过“工作组”,“工作组”,“工作组”。它不能重定向到指定的工作组。始终转到默认的一个即主要工作组。
请帮助。谢谢
答案 0 :(得分:1)
如果您查看Athena JDBC的release notes,则工作组支持来自v2.0.7。
如果jar低于此版本,它将无法正常工作。尝试将库升级到2.0.7或更高版本
答案 1 :(得分:0)
您需要覆盖工作组中的客户端设置。启用以下设置并通过JDBC重新运行查询。
选中此doc以获得更多信息。