go-presto

command module
v1.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2020 License: MIT Imports: 16 Imported by: 0

README

Presto for Go

This is a tiny golang client for Facebook's Presto SQL Tool.

Getting Started Example:

go get github.com/tmickleydoyle/go-presto

go-presto -in query_one.sql -out query_one.json -json true

go-presto -in query_one.sql -out query_one.csv -json false

go-presto -in query_one.sql -out query_one.csv

go-presto -in query_one.sql

go-presto -in "SELECT * FROM table" -out query_one.csv

# Renders markdown table
go-presto -in "SELECT * FROM table"

Database connection objects should be included in the ~/.bash_profile:

export PRESTO_USERNAME='username'
export PRESTO_HOST='presto.coordinator.net'
export PRESTO_PORT=8080

Help:

go-presto --help

Usage of go-presto:
  -in string
        input SQL file name
  -json
        indicate if the output should be json
  -out string
        output file name

Go can be installed with Homebrew.

Install Go:

brew install go

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL