It’ll get the cache definitions from the cluster. I don’t think the types in 
the XML file will have any effect here.

> On 20 Jan 2020, at 18:52, narges saleh <[email protected]> wrote:
> 
> Hello Stephan,
> 
> I mean using JDBC defined types in the XML file, to define the tables. 
> Similar to the way  JDBC types are used in defining tables with 3rd party 
> databases.
> 
> thanks.
> 
> On Mon, Jan 20, 2020 at 10:04 AM Stephen Darlington 
> <[email protected] <mailto:[email protected]>> 
> wrote:
> Which JDBC settings? If you use the JDBC thick client, you can define your 
> caches there if you like.
> 
>> On 18 Jan 2020, at 12:01, narges saleh <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> Hello Stephan,
>> 
>> Thanks. I get this working using query entity in my XML config file. I 
>> assume it is not possible to do the same with JDBC settings in the XML file.
>> 
>> On Fri, Jan 17, 2020 at 2:10 AM Stephen Darlington 
>> <[email protected] <mailto:[email protected]>> 
>> wrote:
>> See the “Configuring Indexes using query entities” section of the 
>> documentation:  
>> https://www.gridgain.com/docs/latest/developers-guide/SQL/indexes#configuring-indexes-using-query-entities
>>  
>> <https://www.gridgain.com/docs/latest/developers-guide/SQL/indexes#configuring-indexes-using-query-entities>
>> 
>> Regards,
>> Stephen 
>> 
>>> On 16 Jan 2020, at 23:14, narges saleh <[email protected] 
>>> <mailto:[email protected]>> wrote:
>>> 
>>> 
>>> Thanks Stephan.
>>> 
>>> Can you send me an example where the cache and tables are entirely defined 
>>> in the XML configuration file (and no POJO), with query entity or just 
>>> JDBC? Let's assume that the sql codes run on a server node or a thick 
>>> client.
>>> 
>>> 
>>> On Thu, Jan 16, 2020 at 8:02 AM Stephen Darlington 
>>> <[email protected] <mailto:[email protected]>> 
>>> wrote:
>>> 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 
>>> <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] 
>>>> <mailto:[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.
>>> 
>>> 
> 
> 


Reply via email to