Comments - Cassandra Storage Engine Use Example

10 years, 11 months ago Robert Wagner

Connecting SQL table does not work as shown:

MariaDB [test2]> create table t1 (
  rowkey varchar(36) primary key,
  data1 varchar(60),
  data2 bigint
) engine=cassandra  thrift_host='10.60.1.47' keyspace='mariadbtest2' column_family='cf1';
ERROR 1928 (HY000): Internal error: 'PRIMARY KEY column must match Cassandra's name 'pk''

One should change the Primary Key to pk:

MariaDB [test2]> create table t1 (
  pk varchar(36) primary key,
  data1 varchar(60),
  data2 bigint
) engine=cassandra  thrift_host='10.60.1.47' keyspace='mariadbtest2' column_family='cf1';
Query OK, 0 rows affected (0.00 sec)
 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.