incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julio Carlos Barrera Juez <juliocar...@gmail.com>
Subject Re: inserting rows in columns inside a supercolumn
Date Wed, 28 Apr 2010 11:01:14 GMT
OK, I have solved my problems with Cassandra data model. Now I am using
Column Families of type Super and SuperColumns with many columns inside.

Thanks!

2010/4/16 Julio Carlos Barrera Juez <juliocarlos@gmail.com>

> Hi again,
>
> First of all, obviously, I have omitted the timestamps to make easy the
> representation, not in the code. Secondly, there are one supercolumn with
> two rows, A and D, all the others are columns, including B,
> with various key-values (1, 2, etc.). I need two levels for my design, it is
> mandatory, it means, I need supercolumns and columns.
>
> I am trying to introduce key-value(-timestamp) 6, 7, 8 and 9; but when I
> try to do it, the values are not appended to the other ones. Instead of
> this, only the final value of each column is stored.
>
> I am trying to append values in columns inside a supercolumn,
> but maintaining old values.
>
> All help will be appreciated. Thank you.
>
>
> 2010/4/15 Miguel Verde <miguelitovert@gmail.com>
>
> Just to nitpick your representation a little bit, columnB/etc... are
>> supercolumnB/etc..., key1/etc... are column1/etc..., and you can probably
>> omit valueA/valueD designations entirely, it would still be understood.
>>
>> Columns in Cassandra always have timestamps, you can't omit them.
>>
>> Can you post a snippet of the code you are using and the error you get?
>>
>> On Thu, Apr 15, 2010 at 5:02 AM, Julio Carlos Barrera Juez <
>> juliocarlos@gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> I'm working with Cassandra 0.5 and Thrift API. I have a simple doubt:
>>>
>>> I want to insert a row in columns inside a supercolumn, like this
>>> (without timestamps):
>>>
>>> SuperColumnNameA ==> keyA valueA ==> columnB ==> key1 value1
>>>
>>>    ==> key2 value2
>>>
>>>    ==> key3 value3
>>>                                                         ==> columnC
>>> ==> key4 value4
>>>
>>>    ==> key5 value5
>>>                                 ==> keyD valueD ==> columnE ==> *key6
>>> value6*
>>>
>>>    ==> *key7 value7*
>>>                                                         ==> columnF ==>*
key8
>>> value8*
>>>
>>>    ==> *key9 value9*
>>>
>>> For instance, I want to insert only key-values 6,7,8 and 9, but when I
>>> try it, I destroy all the others values. What is the correct mode to do it.
>>> I have tries obtaining the supercolumn and adding more values,
>>> bath_insert(), etc, but I always failing.
>>>
>>> Thank you.
>>>
>>
>>
>

Mime
View raw message