nd I have to reset them. I just need to
>>>>>>> store
>>>>>>> the state as it artived from Kafka, there might already be an event for
>>>>>>> this happening saved before, or maybe this is the first one.
>>>>>>>
>>>>>
orrect that inserting null creates a tombstone.
>
> Can you only insert the columns that actually have new values? Just skip the
> columns with no information. (Make the insert generator a bit smarter.)
>
> Create table happening (id text primary key, event text, a text, b text, c
ed statements for
>>>>>>> each combination of set / unset values in large INSERT/UPDATE statements
>>>>>>> may be prohibitive.
>>>>>>>
>>>>>>> Instead, you can look into driver level support for UNSET values.
>>>>>
ndra 2.2 or later IIRC.
>>>>>>
>>>>>> See:
>>>>>> Java Driver:
>>>>>> https://docs.datastax.com/en/developer/java-driver/3.0/manual/statements/prepared/#parameters-and-binding
>>>>>> Python Driver:
>>>&
018 at 3:21 PM Durity, Sean R <
>>>>> sean_r_dur...@homedepot.com> wrote:
>>>>>
>>>>>> You say the events are incremental updates. I am interpreting this to
>>>>>> mean only some columns are updated. Others should keep their origina
ed. Others should keep their original
>>>>> values.
>>>>>
>>>>> You are correct that inserting null creates a tombstone.
>>>>>
>>>>> Can you only insert the columns that actually have new values? Just
>>>>> skip the
>>>>
>>>> Can you only insert the columns that actually have new values? Just
>>>> skip the columns with no information. (Make the insert generator a bit
>>>> smarter.)
>>>>
>>>> Create table happening (id text primary key, event text, a
Make the insert generator a bit smarter.)
>>>
>>> Create table happening (id text primary key, event text, a text, b text,
>>> c text);
>>> Insert into table happening (id, event, a, b, c) values
>>> ("MainEvent","The most complete i
t; Insert into table happening (id, event, a, b, c) values ("MainEvent","The
>> most complete info we have right now","Priceless","10 pm","Grand Ballroom");
>> -- b changes
>> Insert into happening (id, b) values ("MainEvent",&q
;
>
>
> Sean Durity
>
>
> -Original Message-
> From: Tomas Bartalos
> Sent: Thursday, December 27, 2018 9:27 AM
> To: user@cassandra.apache.org
> Subject: [EXTERNAL] Howto avoid tombstones when inserting NULL values
>
> Hello,
>
> I’d start with
quot;10 pm","Grand Ballroom");
-- b changes
Insert into happening (id, b) values ("MainEvent","9:30 pm");
Sean Durity
-Original Message-
From: Tomas Bartalos
Sent: Thursday, December 27, 2018 9:27 AM
To: user@cassandra.apache.org
Subject: [EXTERNAL
Hello,
I’d start with describing my use case and how I’d like to use Cassandra to
solve my storage needs.
We're processing a stream of events for various happenings. Every event have a
unique happening_id.
One happening may have many events, usually ~ 20-100 events. I’d like to store
only the l
: user@cassandra.apache.org
Subject: Re: Inserting null values
I agree that inserting null is not as good as not inserting that column at all
when you have confidence that you are not shadowing any underlying data. But
pragmatically speaking it really doesn't sound like a small number of
incid
I agree that inserting null is not as good as not inserting that column at
all when you have confidence that you are not shadowing any underlying
data. But pragmatically speaking it really doesn't sound like a small
number of incidental nulls/tombstones (< 20% of columns, otherwise
CASSANDRA-3442 t
On Wed, Apr 29, 2015 at 9:16 AM, Eric Stevens wrote:
> In the end, inserting a tombstone into a non-clustered column shouldn't be
> appreciably worse (if it is at all) than inserting a value instead. Or am
> I missing something here?
>
There's thresholds (log messages, etc.) which operate on to
se the Insert query builder (
>>>> *com.datastax.driver.core.querybuilder.Insert*) which allows me to
>>>> dynamically insert as many or as few columns as I need, and doesn’t require
>>>> multiple prepared statements. Then, I will look at Ali’s suggestion – I
>>>> w
IfNotNull’ and pump all
>>> my values into that, which will then filter out the ones that are null.
>>> Should keep the code nice and neat – I will feed back if I find any
>>> problems with this approach (but please jump in if you have already spotted
>>> any :)).
>>>
‘addToInsertIfNotNull’ and pump all
>> my values into that, which will then filter out the ones that are null.
>> Should keep the code nice and neat – I will feed back if I find any
>> problems with this approach (but please jump in if you have already spotted
>> any :)).
&g
at – I will feed back if I find any
> problems with this approach (but please jump in if you have already spotted
> any :)).
>
>
>
> Thanks!
>
> Matt
>
>
>
> *From:* Robert Wille [mailto:rwi...@fold3.com]
> *Sent:* 29 April 2015 15:16
> *To:* user@cassandra.ap
:)).
Thanks!
Matt
*From:* Robert Wille [mailto:rwi...@fold3.com]
*Sent:* 29 April 2015 15:16
*To:* user@cassandra.apache.org
*Subject:* Re: Inserting null values
I’ve come across the same thing. I have a table with at least half a dozen
columns that could be null, in any combination. Having a
I’ve come across the same thing. I have a table with at least half a dozen
columns that could be null, in any combination. Having a prepared statement for
each permutation of null columns just isn’t going to happen. I don’t want to
build custom queries each time because I have a really cool syst
The problem of NULL insert is already solved long time ago with Insert
Strategy in Achilles:
https://github.com/doanduyhai/Achilles/wiki/Insert-Strategy
However, it's nice to see there will be a flag on the protocol side to
handle this problem
On Wed, Apr 29, 2015 at 2:27 PM, Ali Akhtar wrot
Have you considered adding a 'toSafe' method which checks if the item is
null, and if so, returns a default value? E.g String too = safe(bar, ""); .
On Apr 29, 2015 3:14 PM, "Matthew Johnson" wrote:
> Hi all,
>
>
>
> I have some fields that I am storing into Cassandra, but some of them
> could be
https://issues.apache.org/jira/browse/CASSANDRA-7304
From: Matthew Johnson [mailto:matt.john...@algomi.com]
Sent: Wednesday, April 29, 2015 11:37 AM
To: user@cassandra.apache.org
Subject: Inserting null values
Hi all,
I have some fields that I am storing into Cassandra, but some of them could be
Hi all,
I have some fields that I am storing into Cassandra, but some of them could
be null at any given point. As there are quite a lot of them, it makes the
code much more readable if I don’t check each one for null before adding it
to the INSERT.
I can see a few Jiras around CQL 3 supporti
25 matches
Mail list logo