我正在尝试使用Athena boto客户端执行查询。
self.athena_client = boto3.client('athena')
response = self.athena_client.start_query_execution(
QueryString=sql.format(**query_params) if query_params else sql,
ResultConfiguration={
'OutputLocation': '...'
}
)
但是下面出现错误:
Invalid length for parameter QueryString, value: 0, valid range: 1-inf
我不知道根本原因是什么。
答案 0 :(得分:0)
您应该证明自己已正确将QueryString
参数发送到boto方法start_query_execution
。
这是一个必需参数,例如,当您请求发送带有空字符串的QueryString
时,它将抛出此错误。
在boto3 docs处查看更多内容