Re: multiple value key
Yes, what IDE generates should be fine. -Val -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/multiple-value-key-tp4138p4209.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: multiple value key
Ok, so loading data into cache from database may be done in *arbitrary* way, -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/multiple-value-key-tp4138p4205.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: multiple value key
You can use loadCache method to load any set of data from the DB. It takes optional list of arguments that you can use to parametrize the loading process (e.g., use them to provide time bounds and query the DB based on these bounds). You can load based on any criteria, there are no limitation and this doesn't depend on how your key and value classes look like. Just make sure that each loaded row is properly mapped to key and value objects. Key has to be unique for each value, otherwise values will overwrite each other. Makes sense? -Val -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/multiple-value-key-tp4138p4203.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: multiple value key
I mean following situtation: my key is integer and timestamp. Now, using SELECT * FROM ... WHERE timestamp IS BETWEEN (A, B) AND integer IN {1,2} (it is only pseudocode) It loads into cache ignite entire data with integer key = 1;2 and timestamp from interval (A,B) ANd now, having this double value key is it possible to load entire data (to cache) all rows from interval (A, B) ? Now, using SELECT * FROM ... WHERE timestamp IS BETWEEN (A, B) AND integer IN *ANY* Aim: loading data from cache with partially defined key. -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/multiple-value-key-tp4138p4196.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: multiple value key
What do you mean by "partially defined key"? Can you provide an example? Generally, you can query by any field(s) that can reside in both key and value objects. Answer on the second question is yes (assuming that you have enough memory to hold the data, of course). -Val -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/multiple-value-key-tp4138p4186.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: multiple value key
So the conclusion is: Each sql query can fastly be done on ignite cache memory (but not through). Is it possible to query by partially defined key ? I would like be able to load data into memory (cahce ignite) by partially defined key. The second question: Lets assume that my key is timestamp. Can I load into memory cache (so read-through) all data from year 2000 ? Note, that data in postgres has timestamp of form 2000-04-21-12:21:12:000 -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/multiple-value-key-tp4138p4169.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: multiple value key
Hi, If you're querying value by key, it's better to use get() method instead of query. The key can be either a primitive, or any Java object. In the latter case don't forget to properly implement equals() and hashCode() methods. With queries you can do any other more complicated requests. Ignite uses standard SQL, so all your examples should work. See [1] for more details. [1] https://apacheignite.readme.io/docs/sql-queries -Val -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/multiple-value-key-tp4138p4144.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.
multiple value key
Hello, Is it possible to use multiple value key ? For example, Timestamp, Integer, Integer ? I know that loading data maybe done using key - get method for example. But how to implement load with many value key ? Now, I simply write query: ... WHERE key = 42. However, for multiple key: WHERE key= 42 && timestamp ='2001-12...' && k2 = 21. What about situation when I give only two parameters, for example WHERE key= 42 && timestamp ='2001-12...' . Moreover, is it possible to get all rows with timestamp later than year 2000 ? -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/multiple-value-key-tp4138.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.