How to export data to a text file in Apache phoenix?

I am new to HBase and Phoenix.

But is there a way so that I can upload / export data to a text file? It would be very helpful if I could specify a field terminator, for example ',', '| > ', etc ..

Thanks.

+8
hbase phoenix
source share
3 answers

Another solution.

After connecting to phoenix using sqlline.py:

  • ! outputformat csv
  • ! record data.csv
  • select * from system.catalog limit 10;
  • ! Record
  • ! Give up
+17
source share

You can do this with Apache Pherf . Arguments Pherf: -export Exports query results to CSV files in the CSV_EXPORT directory

+1
source share

A workaround is to use sed after dumping. In my case, I need a \t de-limiter. However, the column values ​​looked like "A", "B", "C", "D", a simple s/','/'\t'/g helped.

0
source share

All Articles