How to export data to text file in Apache phoenix?

dehiker picture dehiker · Nov 23, 2015 · Viewed 10.2k times · Source

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.

Answer

IgorekPotworek picture IgorekPotworek · Nov 25, 2015

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