There is a Document in mongodb:
{
"_id" : ObjectId("54c955492b7c8eb21818bd09"),
"address" : {
"street" : "2 Avenue",
"zipcode" : "10075",
"building" : "1480",
"coord" : [ -73.9557413, 40.7720266 ]
},
"borough" : "Manhattan",
"cuisine" : "Italian",
"grades" : [
{
"date" : ISODate("2014-10-01T00:00:00Z"),
"grade" : "A",
"score" : 11
},
{
"date" : ISODate("2014-01-16T00:00:00Z"),
"grade" : "B",
"score" : 17
}
],
"name" : "Vella",
"restaurant_id" : "41704620"
}
I put it into Greenplum for analysis and stored it in Json type.
create table restaurant(restau json);
Some simple queries can be used;
select restau from restaurant where restau-> restaurant_id='41704620';
but,
select restau from restaurant where restau-> address -> zipcode ='10075';
Why doesn’t this work? Report syntax error.
Suggest giving grammatical errors,
Which version of GP are you using?