I want the following structure in my database with the cassandra -cli
for example I have a person with an address and the address contains a zipcode, housenumber etc schematic it looks like this:
name: "address",
value: {
city: {name: "city", value: "San Francisco"},
street: {name: "street", value: "555 Union Street"},
zip: {name: "zipcode", value: "94105"},
}
I know how to create a supercolumn and normal columns. But I want to use the column_metadata to specify how the colums in a supercolumn look like. So that would end up something like this:
Create column family person
with comparator = UTF8Type
and key_validation_class=UTF8Type
and default_validation_class = UTF8Type
and compression_options =
{sstable_compression:SnappyCompressor, chunk_length_kb:64}
and column_metadata = [
{column_type: super, column_name: address, validation_class: UTF8Type
column_metadata =[
{column_name: city, validation_class: UTF8Type}
{column_name: Street, validation_class: UTF8Type}
{column_name: zip, validation_class: UTF8Type}
{column_name: housnumber, validation_class: LongType}
];
Is this at all possible?
It would be even better if I can put a super column in another super column. This way the super column "addresses" could contain multiple super columns "address" with columns: "street", "zip", etc.