Apache ignites the json field

I may be missing this in the documentation, but is it possible to store and query json data in Apache Ignite? For example, let's say I have a "table" called "cars" with the following fields:

model
blueprint

      

The "blueprint" field is actually a json field that can contain data such as:

{
    horsepower: 200,
    mpg: 30
}

      

These are not the only fields for the blueprint field, and it can contain many more or fewer fields. Is it possible to execute a query like:

SELECT model FROM cars WHERE blueprint.horsepower < 300 AND blueprint.mpg > 20

      

It is not known in advance what fields will be for the "blueprint" field, and creating indexes for them is optional.

Note. This is not a question of whether this is the logically optimal way to store this information, or how the "drawing" field should be stored in a separate table. This question is for understanding whether a request for a json field is trivially possible when starting apache.

+3


source to share


1 answer


This is not supported at this time. However, you can create conversion logic between JSON and Ignite binary and store BinaryObject

in caches. To build BinaryObject

without Java class, you can use the binary builder: https://apacheignite.readme.io/docs/binary-marshaller#modifying-binary-objects-using-binaryobjectbuilder



+3


source







All Articles