Hi,
I am new to Ignite. Could you tell me the right way to create a
cache, load data into cache, and then query the cache via JDBC?
I wrote the following code to create a table via JDBC.
Class.forName("org.apache.ignite.IgniteJdbcDriver");
con = DriverManager.getConnection (connectionURL)
String create_sql = "CREATE TABLE Person " +
"(_key INTEGER PRIMARY KEY, " +
" name VARCHAR(255), " +
" age INTEGER);";
Statement cstmt = con.createStatement();
cstmt.executeQuery(create_sql);
But i got this error.
java.sql.SQLException: Failed to query Ignite.
at
org.apache.ignite.internal.jdbc2.JdbcStatement.executeQuery(JdbcStatement.java:131)
at IgniteJDBC.main(IgniteJDBC.java:26)
Caused by: javax.cache.CacheException: Unsupported SQL statement:
CREATE TABLE Person (_key INTEGER PRIMARY KEY, name VARCHAR(255),
age INTEGER)
Thanks so much
Ivan