gpt4 book ai didi

c# - outputLocation 不是有效的 S3 路径。雅典娜异常(exception)

转载 作者:行者123 更新时间:2023-12-05 01:43:40 27 4
gpt4 key购买 nike

我正在尝试使用 C# athena 驱动程序执行 athena 查询。

Amazon.Athena.Model.ResultConfiguration resultConfig = new Amazon.Athena.Model.ResultConfiguration();
resultConfig.OutputLocation = "https://s3.us-east-2.amazonaws.com/testbucket/one/2018-02-06/";
//other inputs i have tried
//"s3://testbucket/one/2018-02-06/"
//testbucket

//Populate the request object
Amazon.Athena.Model.StartQueryExecutionRequest queryExec = new Amazon.Athena.Model.StartQueryExecutionRequest();
queryExec.QueryString = query.QueryString;
queryExec.QueryExecutionContext = queryExecutionContext;
queryExec.ResultConfiguration = resultConfig;

StartQueryExecutionResponse athenaResponse = athenaClient.StartQueryExecution(queryExec);//throws exception

不同情况的异常(exception)情况:

  1. outputLocation is not a valid S3 path. Provided https://s3.us-east-2.amazonaws.com/testbucket/one/2018-02-06/

  2. Unable to verify/create output bucket testbucket. Provided s3://testbucket/one/2018-02-06/

  3. Unable to verify/create output bucket testbucket. Provided testbucket

谁能帮我找出正确的 s3 格式?

提前致谢。

最佳答案

输出位置需要采用以下格式:

s3://{bucketname}/{path}

在您的情况下,这将导致以下位置:

resultConfig.OutputLocation = "s3://testbucket/one/2018-02-06/";

关于c# - outputLocation 不是有效的 S3 路径。雅典娜异常(exception),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48779143/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com