Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to export data to text file in Apache phoenix?

Tags:

hbase

phoenix

I'm quite new to HBase and Phoenix.

But is there a way I can dump/export data to a text file? It would be highly appreciable if I can specify the field terminator, such as ',', '|>' etc.

Thanks.

like image 924
dehiker Avatar asked Nov 23 '15 02:11

dehiker


Video Answer


2 Answers

Another Solution.
After connecting to phoenix with sqlline.py:

  1. !outputformat csv
  2. !record data.csv
  3. select * from system.catalog limit 10;
  4. !record
  5. !quit
like image 115
IgorekPotworek Avatar answered Oct 25 '22 07:10

IgorekPotworek


You can do it with Apache Pherf. Pherf arguments: -export Exports query results to CSV files in CSV_EXPORT directory

like image 26
Ramin Darvishov Avatar answered Oct 25 '22 05:10

Ramin Darvishov