문제

I am not able to create collection inside another collection in Cassandra. Please find error details below

cqlsh:TestKeyspace> create table users2(user_id text primary key, feeschedule map<text,set<text>>);
Bad Request: map type cannot contain another collection

Here I am trying to create column named feeschedule with type Map and Map have values which is of type List.

Could anybody suggest me how do I achieve it in Cassandra. My Cassandra version details are given below:

cqlsh version- cqlsh 4.1.0
Cassandra version – 2.0.2

Thanks in advance,

도움이 되었습니까?

해결책

You are correct, nested collections are not supported.

You will be able to do something similar with user-defined types, but not until 2.1: https://issues.apache.org/jira/browse/CASSANDRA-5590

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top