cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Laing, Michael" <michael.la...@nytimes.com>
Subject Re: Materialized View: can the view's partition key change due to changes to the underlying table?
Date Tue, 15 Dec 2015 23:41:34 GMT
why don't you just try it?

On Tue, Dec 15, 2015 at 6:30 PM, Will Zhang <weiliang.zhang@gmail.com>
wrote:

> Hi all,
>
> I originally raised this on SO, but not really getting any answer there,
> thought I give it a try here.
>
>
> Just thinking about this so please correct my understanding if any of this
> isn't right.
>
> Environment: Apache Cassandra v3.0.0
>
> Say you have a table and a materialized view created on it:
>
> create table source(
> id text, field text, stamp timestamp, data text,
> primary key(id, field))
>
> create materialized view myview as
> select * from source
> where data is not null and id is not null and field is not null
> primary key (data, field, id)
>
> My understanding is that myview.data would essentially be the partition
> key for the view here (and data in source is automatically replicated by
> the server into myview?).
>
> *If that is true, what happens internally when a table update is performed
> on source table and the source.data column is updated?*
>
> SO:
> http://stackoverflow.com/questions/33943960/apache-cassandra-3-0-0-materialized-view-can-the-views-partition-key-change-du
>
> Thanks,
>
> Will
>
>
>
>

Mime
View raw message