我正在尝试从 s3-select 中的 json 数据中查询数据。
{
person = [
{
"Id": 1,
"Name": "Anshu",
"Address": "Templestowe",
"Car": "Jeep"
}
{
"Id": 2,
"Name": "Ben Mostafa",
"Address": "Las Vegas",
"Car": "Mustang"
}
{
"Id": 3,
"Name": "Rohan Wood",
"Address": "Wooddon",
"Car": "VW"
}
]
}
QUERY = "select * from S3Object s"
QUERY = "select s.person from S3Object s"
QUERY = "select s.person[0] from S3Object s"
QUERY = "select s.person[0].Name from S3Object s"
所有这些查询都可以正常工作并根据需要返回相应的对象,但是当我尝试搜索名称/汽车上的数据时,它不起作用。
QUERY = "select * from S3Object s where s.person.Name = \"Anshu\" "
错误:com.amazonaws.services.s3.model.AmazonS3Exception:第 1 行第 32 列的列索引无效。
s3-select online 上相关内容不多。想知道我们是否可以查询字段名称!文档中没有提供带有 s3-select 的 where 子句的选择查询示例