Skip to content

kos59125/local-presto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CircleCI

local-presto

Run Presto on your local machine

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

Releases

No releases published

Packages

No packages published

Languages