If you create a cache, either in code or XML, using the minimal list of parameter it won’t be accessible using SQL.
There are a number of ways you can define what’s visible using SQL. You can use a POJO with the @QuerySqlField annotation (and the indexTypes property in the XML file) or define QueryEntities. See the documentarian: https://www.gridgain.com/docs/latest/developers-guide/SQL/indexes Whether you do it on the client or server side is a bit of a religious debate, but either works. The important thing is that the first definition to hit the cluster is the one that takes effect. The most common pattern I see with JDBC is the caches are defined server side, and clients connect using the thin-client driver. Thin clients just need a hostname and port. However, there is also a thick-client JDBC driver. The XML here is no different from any other node. Regards, Stephen > On 16 Jan 2020, at 12:54, narges saleh <[email protected]> wrote: > > Thanks Ilya, Steve. > 1) What do you mean by SQL enabled? Do I still need to define the POJO > classes for the objects/tables? > 2) Can I specify the caches including the table definitions entirely in XML > config file and pass the config file to the JDBC connection? If yes, I'd > greatly appreciate it if you provide some small samples. Please keep in mind > that we have native persistence in place not a third party database. > > > > On Wed, Jan 15, 2020 at 7:29 AM Ilya Kasnacheev <[email protected] > <mailto:[email protected]>> wrote: > Hello! > > 4) I actually think that if you specify caches in thick client's config file, > and they are absent on server, they will be created. > > (However, they will not be changed if configuration differs) > > Regards, > -- > Ilya Kasnacheev > > > ср, 15 янв. 2020 г. в 15:59, narges saleh <[email protected] > <mailto:[email protected]>>: > Hi All, > > I am trying to use ignite's cache grid with native persistence and prefer to > use JDBC for cache/db connectivity. > > 1) Is this possible, in either client or server mode? > 2) If yes, I assume, I'd need one JDBC connection per cache, as I see it is > possible to specify only one cache per JDBC connection. Is this right? > 3) Is this also true if I need to join multiple tables/caches? > 4) Can I specify my caches in XML config file and just pass the config file > to the JDBC connection? > 5) Will I get the same load performance if I JDBC with streaming set to true > as I'd using the streamer module directly (I see that I can specify most of > the streamer config options on JDBC connection configuration)? > > thanks.
