0
votes

I am trying to make a table using apache ignite 2.9.1 sqlline option. It's value part should have collection of generic key value pairs. It is very important.

I want to create following type table

I want to know , can I do this using using apache ignite sqlline option ? Please help me to understand this.

1

1 Answers

2
votes

Tables always have specific types in Apache Ignite. Caches may be of <Object, Object> but tables (which are also backed by caches) have specific column types. All columns in PRIMARY KEY are considered key columns.

This example sums it nicely:

CREATE TABLE IF NOT EXISTS Person (
  id int,
  city_id int,
  name varchar,
  age int,
  company varchar,
  PRIMARY KEY (id, city_id)
) WITH "template=partitioned,backups=1,affinity_key=city_id, key_type=PersonKey, value_type=MyPerson";