views:

181

answers:

1

If I need to append data (not insert) into a particular super column, what should I do?

For eg: Consider a existing record described below

Kespace : test
columFamily: testColum
SuperColumn : testSuper
column_name : email
value : [email protected]

Here if I want to add my phone number to the super column "testSuper". What should I do?

+3  A: 

Do a simple insert (with the same key) where your ColumnParent denotes the correct SCF and SC

(Java example)

client.insert(
    keyspace, 
    key, 
    parent, 
    new Column("phoneNumber".getBytes("UTF-8"), "555-14921911".getBytes("UTF-8"), timestamp), 
    ConsistencyLevel.ONE
);
Schildmeijer