title: Cassandra pig store
body: <p>I have a cassandra table like   </p>
  
  <pre><code> CREATE COLUMN FAMILY users
  WITH comparator = UTF8Type
  AND key_validation_class=UTF8Type
  AND column_metadata = [
  {column_name: full_name, validation_class: UTF8Type}
  {column_name: email, validation_class: UTF8Type}
  {column_name: state, validation_class: UTF8Type}
  {column_name: gender, validation_class: UTF8Type}
  {column_name: birth_year, validation_class: LongType}
  ];
  </code></pre>
  
  <p>and have a pig script as below </p>
  
  <pre><code>rows = LOAD 'cassandra://hwh_tracking/users' USING org.apache.cassandra.hadoop.pig.CassandraStorage();
  emailgroup = group rows by email;
  dump emailgroup;
  </code></pre>
  
  <p>now the output is something like this </p>
  
  <pre><code>    ((email,r@gmail.com),{(rrr24,(full_name,rachana),email,(state,ca),(birth_year,2013),(gender,female),{}),(rrr,(full_name,rachana),email,(state,ca),(birth_year,2013),(gender,female),{}),(rrr10,(full_name,rachana),email,(state,ca),(birth_year,2013),(gender,female),{}),(rrr20,(full_name,rachana),email,(state,ca),(birth_year,2013),(gender,female),{}),(rrr23,(full_name,rachana),email,(state,ca),(birth_year,2013),(gender,female),{}),(rrr9,(full_name,rachana),email,(state,ca),(birth_year,2013),(gender,female),{}),(rrr8,(full_name,rachana),email,(state,ca),(birth_year,2013),(gender,female),{}),(rrr22,(full_name,rachana),email,(state,ca),(birth_year,2013),(gender,female),{}),(rrr21,(full_name,rachana),email,(state,ca),(birth_year,2013),(gender,female),{})})
  ((email,zzzz@gmail.com),{(rrr0,(full_name,rachana),email,(state,ca),(birth_year,2013),(gender,female),{}),(rrr6,(full_name,rachana),email,(state,ca),(birth_year,2013),(gender,female),{}),(rrr7,(full_name,rachana),email,(state,ca),(birth_year,2013),(gender,female),{}),(rrr3,(full_name,rachana),email,(state,ca),(birth_year,2013),(gender,female),{}),(rrr1,(full_name,rachana),email,(state,ca),(birth_year,2013),(gender,female),{}),(rrr5,(full_name,rachana),email,(state,ca),(birth_year,2013),(gender,female),{}),(rrr4,(full_name,rachana),email,(state,ca),(birth_year,2013),(gender,female),{}),(rrr2,(full_name,rachana),email,(state,ca),(birth_year,2013),(gender,female),{})})
  </code></pre>
  
  <p>now I want to store the output back to cassandra but clue less how to do. </p>
  
  <p>Any help is appreciated.</p>