I'm using drill in embedded mode, and I can't figure out how to save query output other than copy and pasting it.
If you're using sqlline, you can create a new table as CSV as follows:
use dfs.tmp;
alter session set `store.format`='csv';
create table dfs.tmp.my_output as select * from cp.`employee.json`;
Your CSV file(s) will appear in /tmp/my_output.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With