There are multiple ways to configure a cache to use SQL. The easiest is to
use @QuerySqlField annotation. Check out this doc
https://www.gridgain.com/docs/8.7.6/developers-guide/SQL/sql-api#querysqlfield-annotation
.

On Tue, Nov 5, 2019 at 5:52 PM BorisBelozerov <arsenal18...@gmail.com>
wrote:

> I have 3 nodes, and I code in each node:
> The 1st node: in Main function
>                 Ignite ignite=Ignition.start();
>                 CacheConfiguration<Integer, DataX> cacheConfiguration = new
> CacheConfiguration<Integer,DataX>();
>                 QueryEntity valQE = new QueryEntity();
>                 valQE.setKeyFieldName("key");
>                 valQE.setKeyType("java.lang.Integer");
>                 valQE.setValueType("DataX");
>                 valQE.addQueryField("key", "java.lang.Integer", "key");
>                 valQE.addQueryField("value","java.lang.String","value");
>
> cacheConfiguration.setQueryEntities(java.util.Arrays.asList(valQE));
>                 cacheConfiguration.setName("tdCache");
>                 IgniteCache<Integer, DataX> dtCache =
> ignite.getOrCreateCache(cacheConfiguration);
> The 2nd and 3rd node:
>                 Ignite ignite=Ignition.start();
> I open ignitevisorcmd.bat but I can't see DataX or tdCache
> I use sqlline.bat: select * from "tdCache".DATAX; but I can't select it:
> Schema "tdCache" not found
> Can you help me?? Thank you
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Reply via email to