Super columns add another level of nesting over standard columns. The CLI allows inserts to super columns much like inserts of normal columns. They can be read with get
, written with set
, and deleted with del
. The super column version of these commands uses an extra ['xxx']
to represent the extra level of the map called the sub-column.
Create a column family named
supertest
using the clause 'with column_type=super
':[default@testkeyspace] create column family supertest with column_type='Super';
Now, insert data. Notice super columns have an extra level of the map ['XXX']:
[default@test..] set supertest['mynewcar']['parts']['engine']='v8'; [default@test..] set supertest['mynewcar']['parts']['wheelsize']='20"'; [default@test..] set supertest['mynewcar']['options']['cruise control']='yes'; [default@test..] set supertest['mynewcar']['options']['heated seats']='yes';
Use
assume
so CLI formats the columns as ASCII text, and then fetch all the...