Monday, 14 December 2015

Load CSV data to Hbase Using Pig


  1. Open hbase-shell
  2. Create a table:
    • create 'mydata1','mycf'
  3. Open pig shell
  4. A = LOAD '/lokesh/hbasetest.txt' USING PigStorage(',') as (strdata:chararray, intdata:long);
  5. STORE A INTO 'hbase://mydata1' USING org.apache.pig.backend.hadoop.hbase.HBaseStorage('mycf:intdata');
  6. Done!!!!!!


No comments:

Post a Comment