javascript - 无法在 AthenaRequest.getResultsStream 的 Request.createReadStream 中读取未定义的属性“流”
问题描述
我正在尝试连接到 AWS Athena 并尝试执行选择查询。我已经为此安装了 athena-client(npm install athena-client),并且我拥有所有必需的权限。这是以下错误。
错误:TypeError:无法读取 AthenaRequest.getResultsStream 的 Request.createReadStream 中未定义的属性“流”。
我用过的代码:
var athena = require("athena-client")
var clientConfig = {
bucketUri: 's3 uri'
}
var awsConfig = {
accessKeyId: "accessKeyId",
secretAccessKey: "secretAccessKey",
region: "region",
}
var client = athena.createClient(clientConfig, awsConfig)
client.execute('SELECT * FROM db.table', function(err, data) {
if (err) {
return console.error(err)
}
console.log(data)
})
这是完整的错误:
commands.js:322 TypeError:无法在 AthenaRequest.getResultsStream(VM9 测试:68387)处的 AthenaClient.eval(VM9 测试:68222)处的 Request.createReadStream(VM9 测试:83489)处读取未定义的属性“流”(VM9 测试:68222)在 Generator.next( < 匿名 > ) 已完成(VM9 测试:68088)
解决方案
推荐阅读
- c# - HttpWebRequest.Headers 缺少一些标头
- c++ - 使用 nlohmann 访问 JSON 的数组元素“[]”
- android - 错误:无法找到或加载主类 \AppData\Local\Android\Sdk\cmdline-tools\latest\bin\\
- sql - 如何解决唯一约束错误?
- php - WordPress:获取带有 ID 的帖子标题
- mysql - 显示学生姓名和数学分数(即使他们没有分数)
- wordpress - 翻译自定义帖子类型 slug
- android - 如何知道使用 Intent 创建的事件创建成功
- networking - 为什么在 TCL 的命令中没有显示结果?
- android - 是否可以捕获 Android 手机 SIM 卡 APDU?