There is a difference between a cache and table.
IgniteVisor lists all the caches that are registered/created in the cluster.
On the other hand, sqlline reports only table names that are returned by
JDBC driver.

If you want to create an IgniteCache that should be visible through sqlline,
please try the following approach:
// Create dummy cache to act as an entry point for SQL queries.
CacheConfiguration<?, ?> cacheCfg = new
CacheConfiguration<>(DUMMY_CACHE_NAME).setSqlSchema("PUBLIC");
IgniteCache<?, ?> cache = ignite.getOrCreateCache(cacheCfg);

// Create reference City table based on REPLICATED template.
cache.query(new SqlFieldsQuery("CREATE TABLE city (id LONG PRIMARY KEY, name
VARCHAR) WITH \"template=replicated\"")).getAll();


[1] https://apacheignite-sql.readme.io/docs/create-table
[2]
https://github.com/apache/ignite/blob/master/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryDdlExample.java

Thanks!



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to