.net - Storing JSON object in CASSANDRA -
.net - Storing JSON object in CASSANDRA -
i want store json in cassandra db. each fields of json should mapped respective column.
is possible ? if possible how can accomplish it?.
please help me guys..
the reply same given in other post - cassandra no more schema-less there no out-of-the-box solution (unless have pre-defined json structure). create first-level json construction map<text, text> (if, think, need select entry key)
{ "keya": { "keyb": 5, "keyc": "somestring" }, "keyd": 3; }
this mapped next map entries
<keya, '{ "keyb": 5, "keyc": "somestring" }'> <keyd, '3'>
in way can content first-level key in json have search subsequent entries. "flatten" keys map this:
<keya, '{ "keyb": 5, "keyc": "somestring" }'> <keya.keyb, '5'> <keya.keyc": ' "somestring" '> <keyd, '3'>
you might want insert custom entry in map store original json. in way should able search entry map much bigger original json since it's denormalized perform key based searches. more: since maps statically typed have map integers, uuid, float or whatever strings.
hth, carlo
.net cassandra
Comments
Post a Comment