ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aealexsandrov <aealexsand...@gmail.com>
Subject Re: Apache Ignite Rest API JOIN with multiple Caches
Date Wed, 27 Jun 2018 16:50:02 GMT
Hi,

Try to use qryfldexe:

For example, I create next caches:

ss1.java
<http://apache-ignite-users.70518.x6.nabble.com/file/t1704/ss1.java>  

It creates two caches with the same structure.

Now I am going to execute next command:

SELECT * FROM "mycache1".Value V1 join "mycache2".Value V2 on V1.key=V2.key

Let's use next converter to get URI string:

https://meyerweb.com/eric/tools/dencoder/

Our command will be next:

SELECT%20*%20FROM%20%22mycache1%22.Value%20V1%20join%20%22mycache2%22.Value%20V2%20on%20V1.key%3DV2.key

Run next in brouser:

http://127.0.0.1:8080/ignite?cmd=qryfldexe&pageSize=10&cacheName=mycache1&qry=SELECT%20*%20FROM%20%22mycache1%22.Value%20V1%20join%20%22mycache2%22.Value%20V2%20on%20V1.key%3DV2.key

Output:

{"successStatus":0,"error":null,"response":{"items":[[0,"Value 0",0,"Value
0"],[1,"Value 1",1,"Value 1"],[2,"Value 2",2,"Value 2"],[3,"Value
3",3,"Value 3"],[4,"Value 4",4,"Value 4"],[5,"Value 5",5,"Value
5"],[6,"Value 6",6,"Value 6"],[7,"Value 7",7,"Value 7"],[8,"Value
8",8,"Value 8"],[9,"Value 9",9,"Value
9"]],"last":false,"queryId":10,"fieldsMetadata":[{"schemaName":"mycache1","typeName":"VALUE","fieldName":"KEY","fieldTypeName":"java.lang.Integer"},{"schemaName":"mycache1","typeName":"VALUE","fieldName":"VALUE","fieldTypeName":"java.lang.String"},{"schemaName":"mycache2","typeName":"VALUE","fieldName":"KEY","fieldTypeName":"java.lang.Integer"},{"schemaName":"mycache2","typeName":"VALUE","fieldName":"VALUE","fieldTypeName":"java.lang.String"}]},"sessionToken":null}

BR,
Andrei



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Mime
View raw message