Tuesday, 15 April 2014

cassandra 2.0 - Moving data from one table to other -



cassandra 2.0 - Moving data from one table to other -

i working on cassandra. have 2 tables. table a , b. in table there 2 columns id, name. in table b there 2 columns id , personname. need migrate info table a b info name in table a should go personname in table b. help me on this.

my approach is:

create table b; get resultset of tablea dump row contents (when dump row contents id , name) write captured fields table b (when capturing info name doesnot exist here. ? work here.) drop table a getresult set table b dump out row contents

assuming id primary key in both tables, can followings cqlsh:

copy 'a.csv'; re-create b 'a.csv';

hope helps.

cassandra-2.0

No comments:

Post a Comment