You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Surinder Mehra <re...@gmail.com> on 2022/02/16 08:54:42 UTC
Unable to execute sql in Control centre
Hi,
I tried to execute sql commands in control centre as per demo in ignite
training on 15h feb
I always get thai error " table not found"
As you can see table name and schema is present on control centre. Same
query works in java code.
Am I missing something?
Cache Config:
CacheConfiguration<Integer, Department> deptCacheConfig = new
CacheConfiguration<>(DEPT_CACHE);
deptCacheConfig.setCacheMode(CacheMode.PARTITIONED);
deptCacheConfig.setBackups(1);
deptCacheConfig.setIndexedTypes(Integer.class, Department.class);
Department class:
public class Department implements Serializable{
@QuerySqlField(index = true)
private final int deptId;
@QuerySqlField
private final String deptName;
[image: image.png]
Re: Unable to execute sql in Control centre
Posted by Surinder Mehra <re...@gmail.com>.
Yes thank you !
On Wed, Feb 16, 2022, 14:33 Pavel Tupitsyn <pt...@apache.org> wrote:
> I think schema name is required:
> SELECT * FROM "deptCache".DEPARTMENT
>
> On Wed, Feb 16, 2022 at 11:55 AM Surinder Mehra <re...@gmail.com>
> wrote:
>
>> Hi,
>> I tried to execute sql commands in control centre as per demo in ignite
>> training on 15h feb
>> I always get thai error " table not found"
>> As you can see table name and schema is present on control centre. Same
>> query works in java code.
>> Am I missing something?
>>
>> Cache Config:
>>
>> CacheConfiguration<Integer, Department> deptCacheConfig = new CacheConfiguration<>(DEPT_CACHE);
>> deptCacheConfig.setCacheMode(CacheMode.PARTITIONED);
>> deptCacheConfig.setBackups(1);
>> deptCacheConfig.setIndexedTypes(Integer.class, Department.class);
>>
>>
>> Department class:
>>
>> public class Department implements Serializable{
>> @QuerySqlField(index = true)
>> private final int deptId;
>> @QuerySqlField
>> private final String deptName;
>>
>>
>> [image: image.png]
>>
>>
Re: Unable to execute sql in Control centre
Posted by Pavel Tupitsyn <pt...@apache.org>.
I think schema name is required:
SELECT * FROM "deptCache".DEPARTMENT
On Wed, Feb 16, 2022 at 11:55 AM Surinder Mehra <re...@gmail.com> wrote:
> Hi,
> I tried to execute sql commands in control centre as per demo in ignite
> training on 15h feb
> I always get thai error " table not found"
> As you can see table name and schema is present on control centre. Same
> query works in java code.
> Am I missing something?
>
> Cache Config:
>
> CacheConfiguration<Integer, Department> deptCacheConfig = new CacheConfiguration<>(DEPT_CACHE);
> deptCacheConfig.setCacheMode(CacheMode.PARTITIONED);
> deptCacheConfig.setBackups(1);
> deptCacheConfig.setIndexedTypes(Integer.class, Department.class);
>
>
> Department class:
>
> public class Department implements Serializable{
> @QuerySqlField(index = true)
> private final int deptId;
> @QuerySqlField
> private final String deptName;
>
>
> [image: image.png]
>
>