I had to install Java to get presto working
brew cask install java
From https://prestodb.io/docs/current/installation/cli.html I did:
wget https://repo1.maven.org/maven2/com/facebook/presto/presto-cli/0.202/presto-cli-0.202-executable.jar
mv presto-cli-0.202-executable.jar presto
chmod +x presto
and then...
./presto --server myserver:8080 --catalog hive \
--execute "SELECT ..." \
--output-format CSV_HEADER > data.csv
I did this for progress:
watch 'wc -l data.csv && ls -lah data.csv && tail -n 10 data.csv'