-1

I m trying to export all the data from HBase Shell to a text file using shell script

I am wanting to look into a particular column in hbase and do a count of transactions that occurred and print the number in the shell script .

I am currently using the following command for exporting the data,

echo "scan 'registration',{COLUMNS=>'registration:status'}" | hbase shell | grep "^ " > registration.txt

I want to know how to do for all the columns in the particular RowID and only the values of the column

PS: I have already went thru the link below for doing for a single column, I would like to know how I can do it for all the columns in a single command
Export data from HBase shell

Community
  • 1
  • 1
Gokul
  • 13
  • 7
  • Looks like you don't want any restriction on column filter then you can simply remove {COLUMNS=>'registration:status'} part from you query and just do a simple scan . It will scan all columns for row id's or if you want to do for particular row id then Get option is more suitable for you. – Shashi Aug 21 '15 at 07:42
  • Thanks Shashi, that Worked perfectly – Gokul Aug 21 '15 at 13:14
  • Can you please accept answer if is working fine for you?... – Shashi Aug 21 '15 at 13:30
  • There would be check sign just below my answer. Just click on it. – Shashi Aug 21 '15 at 13:34
  • thanks again for ur help – Gokul Aug 21 '15 at 13:44

1 Answers1

-1

For working with particular row id with all columns , you can use below commnad

echo "get 'tablename','rowid'" | hbase shell | grep "^ " > registration.txt

Shashi
  • 2,686
  • 7
  • 35
  • 67