Sign inSign up

kos59125/local-presto

By kos59125

•Updated over 8 years ago

Run Presto on your local machine

Image
1

277

kos59125/local-presto repository overview

⁠Setup

⁠Pull Docker image
$ docker pull kos59125/local-presto
⁠Create your own connection setting

Create your own properties file. See Connectors on Presto Documentation⁠ for your help.

For example, if you would like to connect MySQL hosted on db.example.com, you create mysql.properties as the following:

connector.name=mysql
connection-url=jdbc:mysql://db.example.com:3306
connection-user=dbuser
connection-password=dbpassword

⁠Run container

You must mount your properties file onto /opt/presto/etc/catalog at startup.

Example:

$ docker run -v /path/to/mysql.properties:/opt/presto/etc/catalog/mysql.properties:ro -it kos59125/local-presto

The entrypoint shell script of Presto is same as the Presto CLI. You can specify options of Presto CLI like --catalog and --output-format.

Examples:

$ docker run -v ... -it kos59125/local-presto --catalog mysql --schema mydb
$ docker run -v ... kos59125/local-presto --execute "SELECT * FROM mysql.mydb.table LIMIT 100" --output-format CSV_HEADER >out.csv

Tag summary

Content type

Image

Digest

Size

663.7 MB

Last updated

over 8 years ago

docker pull kos59125/local-presto