Is it possible to save results of a Hypertable shell query into a file?

StackOverflow https://stackoverflow.com/questions/12561346

  •  03-07-2021
  •  | 
  •  

Вопрос

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?

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top