Skip to content

Instantly share code, notes, and snippets.

@vdparikh
Last active July 9, 2018 20:23
Show Gist options
  • Save vdparikh/b79e6c39a0b6988ae69c4e2fea34eb3e to your computer and use it in GitHub Desktop.
Save vdparikh/b79e6c39a0b6988ae69c4e2fea34eb3e to your computer and use it in GitHub Desktop.
Presto On Mac

Installing Presto for Mac

Presto is a “Distributed SQL Query Engine for Big Data” that gives you the ability to join across data stores! 🎉

Server

The easiest way to install Presto is with Homebrew.

brew install presto

Next, add a connector. Here’s the list of available ones.

For PostgreSQL, create /usr/local/Cellar/presto/0.205/libexec/etc/catalog/mydb.properties (replace 0.205 with version number installed by brew) with:

connector.name=postgresql
connection-url=jdbc:postgresql://localhost:5432/mydbname
connection-user=myuser
connection-password=mysecret

And start the server with:

presto-server run

Client

Presto comes with a CLI

presto --catalog mydb --schema public

And run:

SHOW TABLES;

Try one of your tables with:

SELECT * FROM mytable;

There are also clients in many different languages you can use.

🐰 🎩 ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment