Skip to content

Instantly share code, notes, and snippets.

@realfirst
Forked from simonw/installing-presto-cli.md
Created August 1, 2018 01:27
Show Gist options
  • Save realfirst/e4603df962ec72d9e0cc9b1f17cabfba to your computer and use it in GitHub Desktop.
Save realfirst/e4603df962ec72d9e0cc9b1f17cabfba to your computer and use it in GitHub Desktop.
Installing the Presto command-line tool

Installing the Presto command-line tool

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'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment