romil kothawade
romil kothawade

Reputation: 43

APACHE IGNITE : Join query on tables with different caches

Apache Ignite : I have two caches which have table person in one cache and city table in another cache and i am trying to get name from person who's id is equal with id which is in city table so i want to make join query who will work for that please help....

Upvotes: 1

Views: 1516

Answers (2)

Rhishi
Rhishi

Reputation: 275

Try following query for your requirement:-

List<List<?>> qry = cache.query(new SqlFieldsQuery("select * from table1 as t1, table2 t2 where t1.id = t2.foreignId")).getAll();

Upvotes: 0

alamar
alamar

Reputation: 19343

How about SELECT * FROM "Cache1".table1 t1 JOIN "Cache2".table2 t2 ON t2.foreignId = t1.id?

Upvotes: 2

Related Questions