2

I need some data out of my hypertable. I can inspect the data with the hypertable shell and was curios whether it is possible to pipe the result of a HQL query into a file. This would be useful for further investigations when the result set is large and one wants to format it or something else.

Any ideas?

Matthias Kricke
  • 4,931
  • 4
  • 29
  • 43

1 Answers1

4

sure:

SELECT * FROM table INTO FILE "file.txt";

You can even compress the file:

SELECT * FROM table INTO FILE "file.txt.gz";

Type help select in the shell and you will get more info.

cruppstahl
  • 2,447
  • 1
  • 19
  • 25
  • 1
    worked fine, it seems that i miss this in the description. thanks! – Matthias Kricke Sep 25 '12 at 05:59
  • You can also use 'ht shell --config config_file --namespace xyz < query.hql > /tmp/store_in_this_file.dat' to accomplish the same thing. query.hql will have your SELECT statement. – NullException Jul 30 '13 at 19:55