Reputation: 11
Can you please assist me on below query. Am loading RDBMS data (dynamic tables) into Ignite cache using below API methods and its loading into cache in JSON format but i would like data in TABLE format as like my source(RDBMS).
API Used: org.apache.ignite.binary.BinaryObject; org.apache.ignite.binary.BinaryObjectBuilder;
Upvotes: 0
Views: 314
Reputation: 2425
You should define SQL tables for your caches. You can do it either by specifying queryable fields for existing caches or creating your tables using DDL, in that case, a backed cache will be created automatically.
There is no notion of JSON or other data representation. Ignite stores all data in binary format. It's up to you how to extract or store the values.
I'm not sure why do you use BinaryObjectBuilder, well, it allows you to store values without specifying objects' schema. In most cases, it's totally fine to rely on Apache Ignite internals and allow it to do this binary serialization automatically.
Upvotes: 1