Skip to content

Instantly share code, notes, and snippets.

@simonw
Created May 29, 2018 18:16
Show Gist options
  • Save simonw/09c277b6a97724e53de399a3b0cc6fe8 to your computer and use it in GitHub Desktop.
Save simonw/09c277b6a97724e53de399a3b0cc6fe8 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