我试图弄清楚如何使用AWS S3 Select,一切看起来都很直接,但是下面的查询就是不想工作:
select r.value from S3Object[*].outputs.private_subnets r
以上返回Invalid Path component.
这是我正在使用的JSON:
{
"outputs": {
"private_subnets": {
"value": [
"subnet-1",
"subnet-2",
"subnet-3"
],
"type": [
"tuple",
[
"string",
"string",
"string"
]
]
},
"public_subnets": {
"value": [
"subnet-1",
"subnet-2",
"subnet-3"
],
"type": [
"tuple",
[
"string",
"string",
"string"
]
]
},
"vpc_id": {
"value": "vpc-123",
"type": "string"
}
}
}我只是不明白这个错误,value在SQL中是一个特殊的词吗?
到目前为止,我尝试过的是:
select r from S3Object[*].outputs.private_subnets r
{
"r": {
"value": [
"subnet-1",
"subnet-2",
"subnet-3"
],
"type": [
"tuple",
[
"string",
"string",
"string"
]
]
}
}select r.type from S3Object[*].outputs.private_subnets r
{
"type": [
"tuple",
[
"string",
"string",
"string"
]
]
}所以我不明白value有什么问题。
发布于 2019-07-26 17:29:01
您无法选择此值,因为"value“是保留关键字。https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference-keyword-list.html。这可以使用值周围的双引号转义。
https://stackoverflow.com/questions/57134508
复制相似问题