cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Will Zhang <>
Subject Materialized View: can the view's partition key change due to changes to the underlying table?
Date Tue, 15 Dec 2015 23:30:56 GMT
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 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 column is updated?




View raw message