I don't understand, could you explain me a bit more by example or something?
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/Maintaining-relationships-between-tables-tp4236p4266.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
I think you did not understand my question. I want to add a new value to the
cache, one that is not already present in the database table.
Example:
Right now the cache has the following:
[key=PersonKey [id=2], val=Person [id=2, firstName=Marc, lastName=Robinson,
orgid=300, salary=12000]]
[key=Pe
Could you tell me how do I do the following:
I want to add a new row to the Person cache,which is currently not present
in the Person table. So, first add it to the cache and then write through to
the table. The columns in the Person table are "id, firstName, lastName,
orgid, salary". How do I do
No, I know that. I want to know if we can use UPDATE sql query with ignite or
not?
Because, I want to do something like this: I have a table each in 2
different cache, I want to update some column entry in one table as well as
cache by performing cross-cache sqlqueryfield join. How do I do that?
Hi,
Can we use UPDATE SQL query in ignite cache to update the cache and then
write the update back to the database??
I have the following method:
private static void queryChange() {
IgniteCache, Person> cache =
Ignition.ignite().cache("PCache");
// Execute query to get
Is is possible to use update sql queries in ignite?? I have the following
method:
private static void queryChange() {
IgniteCache, Person> cache =
Ignition.ignite().cache("PCache");
// Execute query to get names of all employees.
String sql =
"update
Thanks it works now!
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/Passing-argument-in-sql-query-under-where-clause-giving-error-tp4164p4176.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
[09:35:06,774][ERROR][main][GridMapQueryExecutor] Failed to execute local
query: GridQueryRequest [reqId=1, pageSize=1024, space=PCache,
qrys=[GridCacheSqlQuery [qry=SELECT
"PCache".PERSON._KEY __C0,
"PCache".PERSON._VAL __C1
FROM "PCache".PERSON
WHERE (SALARY > ?1) AND (SALARY <= ?2), params=[0, 1
Is there any quick fix? What changes do I need to make in my Java code to fix
this error? Or do I just need to download the enterprise 7.5.9 (I'm
currently using 7.5.8) and use its schema-import-utility??
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/Passing-ar
Hi,
I'm trying to execute the cross-cache sql fields query with join and it
executes fine as long as I don't do setArgs and pass an argument, when I
need to pass an argument with the where clause, then it gives error: Failed
to execute local query: GridQueryRequest [reqId=1, pageSize=1024,
space=P
OK, UPDATE:
This method is working, but how do I add setArgs (I mean, I want to pass the
argument for orgname as "Ignite" i.e. to only print person names in Ignite
organization. How to do that??? It's giving error if I simply do as given on
the ignite website:
private static void sqlFieldsQueryW
Could this error be because I haven't done setIndexedType?:
cfg1.setIndexedTypes(OrganizationKey.class, Organization.class);
OR because I have same column name "orgid" in both the tables??
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/How-to-load-2-tables-in-a
CacheConfig class:
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License,
OK, I changed the SQL query to: "select Person.firstName "
+ "from Person, \"OrgCache\".Organization where
"
+ "Person.orgid = Organization.orgid "
+ "and Organization.orgname = ?");
Getting the foll
Actually, this is what's happening:
This is the code:
package org.apache.ignite.organization;
import java.util.List;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.security.KeyStore.Entry;
import java.sql.Connection;
import java.sql.Drive
But, in my transaction method:
PersonKey key = new PersonKey(5);
System.out.println();
System.out.println(">>> Update salary and write-through to database
for person with ID: " + key.getId());
try (Transaction tx = ignite.transactions().txStart()) {
// Rea
Hi @dsetrakyan,
Can you look into my above comment, the error that I'm getting?
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/How-to-load-2-tables-in-a-cache-tp4026p4071.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Yes, it makes sense! So, is there any way that the SQL JOIN relations can
work in gridgain for the 2 tables loaded in different cache?
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/How-to-load-2-tables-in-a-cache-tp4026p4069.html
Sent from the Apache Ignite Use
Thanks, I was able to test it now!
Just confirming for the final time, so if before tx.commit(), I do:
cache.put(k1,v1);
cache.put(k1,v2);
and then if I get k1's value: cache.get(k1), in a new thread before doing
tx.commit(), then I'll get value v2 for key k1, right? Coz in the cache
value for
I don't understand what you mean by data types? I'm talking about 2 database
tables present in the same MySql database/
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/How-to-load-2-tables-in-a-cache-tp4026p4065.html
Sent from the Apache Ignite Users mailing list
Sorry, but I'm getting confused here. So, how can I simply invoke a new
client call before the line tx.commit()? By, starting a new node, right? How
do I do that in the same program??
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/How-to-perform-lazy-write-to-da
So, I'm want to do this:
package apache.ignite.schemas;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
impo
I have two tables department (dept_id and dept) and employee(emp_id, dept_id,
firstname, lastname) in a database that I want to load into the cache. I
used the schema import tool and it generated the CacheConfig.java,
DepartmentKey.java, Department.java, Employee.java and EmployeeKey.java
files. No
Could you tell me how do I start another client node before tx.commit() line
in the code (in the transaction method)? I want to test how this transaction
is happening?
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/How-to-perform-lazy-write-to-database-tp4002p4
Hi,
I have the CacheConfig.java file generated from the schema import tool. And
I am working on a MySql database. So, whenever any updates to the cache is
performed, it is updated in the database as well.
So, the operations are taking place in the following steps:
1.) Update the cache for k1 from
Hi,
I created a file helloworld.txt. Now I'm reading from the file and then I
want to load the contents of the file into the cache, and whenever the cache
is updated, it should write to the file as well.
This is my code so far:
Please tell me what to do to load the cache and then write from the
Hi,
I have that in my generated CacheConfig file, but still the error shows. I
have also tried this with H2 database and it works fine, but I wanna use
Mysql, and it is giving me this mapping error.
Here's my CacheConfig.java :
/*
* Licensed to the Apache Software Foundation (ASF) under one or
27 matches
Mail list logo