0

I have the use case where I will be querying ignite cache with rest apis using SQL queries. I need to sort, join etc.

I have setup the JdbcCacheStore and if I load data using cache.loadCache(null), everything works. I am able to query using rest apis.

http://host:port/ignite?cmd=qryfldexe&pageSize=10&cacheName=Person&qry=select+firstName%2C+lastName+from+Person

I don't want to load cache when ignite is started. I want it to be populated (readthrough) if cache is not present. If I use, get rest api readthrough works.

http://host:port/ignite?cmd=get&key=getKey&cacheName=partionedCache&destId=8daab5ea-af83-4d91-99b6-77ed2ca06647

But I will be querying using "Sql fields query execute"

http://apacheignite.gridgain.org/docs/rest-api#sql-fields-query-execute

When I tried querying using it http://host:port/ignite?cmd=qryfldexe&pageSize=10&cacheName=Person&qry=select+firstName%2C+lastName+from+Person, readthrough did not work. Cache did not populate.

Also, as the rest api allows to pass only one cacheName, how to run join queries?

1 Answer 1

0

Read-through for queries is not supported because for read-through you need to know set of keys to load in advance, which is not possible with SQL. For SQL you need to load all required data into memory in advance.

Sign up to request clarification or add additional context in comments.

2 Comments

If read-through is not support SQL queries, what kind of query can use the read-through feature?
Read-through from arbitrary store is supported for any key based operation (e.g. get()). Also note that in future versions of Ignite there will be a built-in persistent storage that will allow to execute queries against data stored on disk. But this is not released yet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.