0
我试图实现cassandra SE和MariaDB的互操作性。在cqlsh
中,我可以使用复合键创建表格。当我在mariadb中尝试相同时,出现错误ERROR 1070 (42000): Too many key parts specified; max 1 parts allowed
。 这是我代码,我在cqlsh
使用:指定的关键部件过多; max 1部分允许cassandra引擎和mariadb
cqlsh:mariadbtest> create table test (test1 int, test2 bigint, test3 varchar, primary key (test1, test2)) with compact STORAGE;
在Mariadb
:
MariaDB [test]> set global cassandra_default_thrift_host='localhost';
MariaDB [test]> create table random (test1 int(5), test2 bigint(5), test3 varchar(20), PRIMARY KEY (test1, test2)) engine=cassandra keyspace='historian' thrift_host='localhost' column_family='test';
ERROR 1070 (42000): Too many key parts specified; max 1 parts allowed
当我使用单列作为我的主键,它工作正常,没有错误。请帮助我解决组合键问题。 任何帮助,将不胜感激。
我试过复合分区密钥,我得到了同样的错误。是的,我需要它用于我的桌子。你能否给我提供一个关于如何在cassandra SE和MySQL上使用组合键的例子。 – user2782405