I need to store the result of an Impala query in a text file with no other information but the data itself.
For example: select distinct yrmth from test.abc
It should write:
201705
201706 etc.
in a text file line by line.
Any leads?
I need to store the result of an Impala query in a text file with no other information but the data itself.
For example: select distinct yrmth from test.abc
It should write:
201705
201706 etc.
in a text file line by line.
Any leads?
impala-shell is well documented. You should try reading the help manual first. Anyway, here is your answer.
impala-shell -q 'select distinct yrmth from test.abc' -B -o res.txt