cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tyler Hobbs <>
Subject Re: Is column update column-atomic or row atomic?
Date Thu, 17 Mar 2011 02:14:28 GMT
insert() will only overwrite (or insert) the columns that you supply in the
dictionary.  So, if you do:

  cf.insert('key', {'foo': 'bar'})

and the column 'foo' doesn't exist in that row yet, the column will simply
be added to the other columns in the row.

On Wed, Mar 16, 2011 at 9:00 PM, buddhasystem <> wrote:

> Hello Peter, thanks for the note.
> I'm not looking for anything fancy. It's just when I'm looking at the
> following bit of Pycassa docs, it's not 100% clear to me that it won't
> overwrite the entire row for the key, if I want to simply add an extra
> column {'foo':'bar'} to the already existing row. I don't care about
> cross-node consistency at this point.
> insert(key, columns[, timestamp][, ttl][, write_consistency_level])ΒΆ
>    Insert or update columns in the row with key key.
>    columns should be a dictionary of columns or super columns to insert or
> update. If this is a standard column family, columns should look like
> {column_name: column_value}. If this is a super column family, columns
> should look like {super_column_name: {sub_column_name: value}}
> --
> View this message in context:
> Sent from the mailing list archive at

Tyler Hobbs
Software Engineer, DataStax <>
Maintainer of the pycassa <> Cassandra
Python client library

View raw message