How to use JSON in MonetDB
Hello! MonetDB documentation says, that JSON is supported in MonetDB, but I can`t find any example. When I try to implement this query in MonetDB client: json.filter({ "store": { "bicycle": { "color": "red", "price": 19.95 }}},'$') I get this error: syntax error, unexpected IDENT in: "json" THX
Hi Art, JSON is a column type, so you first need to define a table with a column of type JSON, something like: CREATE TABLE A (js JSON); Once you inserted json documents into the table, you can do a query like: select json.filter(js, 'store') from js; Arjen ----- Original Message -----
From: "Art Apl"
To: users-list@monetdb.org Sent: Monday, November 24, 2014 2:34:47 PM Subject: How to use JSON in MonetDB Hello! MonetDB documentation says, that JSON is supported in MonetDB, but I can`t find any example. When I try to implement this query in MonetDB client: json . filter ({ "store" : { "bicycle" : { "color" : "red" , "price" : 19.95 }}}, '$' )
I get this error: syntax error, unexpected IDENT in: "json"
THX
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
Thank You for your response, unfortunately I got this exception sql>CREATE
TABLE A (js JSON);
type (json) unknown in: "create table a (js json)"
2014-11-24 18:26 GMT+03:00 Arjen de Rijke
Hi Art,
JSON is a column type, so you first need to define a table with a column of type JSON, something like:
CREATE TABLE A (js JSON);
Once you inserted json documents into the table, you can do a query like:
select json.filter(js, 'store') from js;
Arjen
----- Original Message -----
From: "Art Apl"
To: users-list@monetdb.org Sent: Monday, November 24, 2014 2:34:47 PM Subject: How to use JSON in MonetDB Hello! MonetDB documentation says, that JSON is supported in MonetDB, but I can`t find any example. When I try to implement this query in MonetDB client: json . filter ({ "store" : { "bicycle" : { "color" : "red" , "price" : 19.95 }}}, '$' )
I get this error: syntax error, unexpected IDENT in: "json"
THX
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
According this
https://www.monetdb.org/Documentation/UserGuide/AutoloadingScript
my monetdb5\createdb must contain 40_jstore.sql and 41_jsonstore.sql, but
it don`t
2014-11-24 18:32 GMT+03:00 Art Apl
Thank You for your response, unfortunately I got this exception sql>CREATE TABLE A (js JSON); type (json) unknown in: "create table a (js json)"
2014-11-24 18:26 GMT+03:00 Arjen de Rijke
: Hi Art,
JSON is a column type, so you first need to define a table with a column of type JSON, something like:
CREATE TABLE A (js JSON);
Once you inserted json documents into the table, you can do a query like:
select json.filter(js, 'store') from js;
Arjen
----- Original Message -----
From: "Art Apl"
To: users-list@monetdb.org Sent: Monday, November 24, 2014 2:34:47 PM Subject: How to use JSON in MonetDB Hello! MonetDB documentation says, that JSON is supported in MonetDB, but I can`t find any example. When I try to implement this query in MonetDB client: json . filter ({ "store" : { "bicycle" : { "color" : "red" , "price" : 19.95 }}}, '$' )
I get this error: syntax error, unexpected IDENT in: "json"
THX
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
Hi, The most likely reason is that you are using an older version. I did not check when this became part of our distribution. If you build it from source, you certainly will get this. Arjen ----- Original Message -----
From: "Art Apl"
To: "Communication channel for MonetDB users" Sent: Monday, November 24, 2014 4:37:24 PM Subject: Re: How to use JSON in MonetDB According this https://www.monetdb.org/Documentation/UserGuide/AutoloadingScript my monetdb5\createdb must contain 40_jstore.sql and 41_jsonstore.sql, but it don`t
2014-11-24 18:32 GMT+03:00 Art Apl < percunium@gmail.com > :
Thank You for your response, unfortunately I got this exception sql>CREATE TABLE A (js JSON); type (json) unknown in: "create table a (js json)"
2014-11-24 18:26 GMT+03:00 Arjen de Rijke < Arjen.de.Rijke@cwi.nl > :
Hi Art,
JSON is a column type, so you first need to define a table with a column of type JSON, something like:
CREATE TABLE A (js JSON);
Once you inserted json documents into the table, you can do a query like:
select json.filter(js, 'store') from js;
Arjen
----- Original Message -----
From: "Art Apl" < percunium@gmail.com > To: users-list@monetdb.org Sent: Monday, November 24, 2014 2:34:47 PM Subject: How to use JSON in MonetDB
Hello! MonetDB documentation says, that JSON is supported in MonetDB, but I can`t find any example. When I try to implement this query in MonetDB client: json . filter ({ "store" : { "bicycle" : { "color" : "red" , "price" : 19.95 }}}, '$' )
I get this error: syntax error, unexpected IDENT in: "json"
THX
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
participants (2)
-
Arjen de Rijke
-
Art Apl