lib

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccountID

func AccountID() string

AccountID returns the current AWS Account ID

func CleanCache added in v0.0.2

func CleanCache(fileName string)

CleanCache deletes any tmp files used

func Partition added in v0.1.0

func Partition(daysback int, databaseName, tableName, tmplate string, partitionsMap []string)

Partition partitions the things

func Region

func Region() string

Region returns the current region

func RenderAsCSV added in v0.0.8

func RenderAsCSV(i interface{}) error

RenderAsCSV will render an interfact to table

func RenderAsJSON added in v0.0.8

func RenderAsJSON(i interface{}) error

RenderAsJSON will render an interface as json

func RenderAsTable added in v0.0.8

func RenderAsTable(i interface{}) error

RenderAsTable will render an interfact to table.

func RenderHistoryResults added in v0.0.8

func RenderHistoryResults(h []HistoricalExecution, outputFormat string) error

RenderHistoryResults ..

func RenderQueryResults added in v0.0.8

func RenderQueryResults(outputFormat string, query string, file *os.File) error

RenderQueryResults formats query results a in the desired format and sends to stdout

Types

type Format added in v0.0.2

type Format int

Format is an enumeration of available query output formats ENUM( json, csv, table )

type HistoricalExecution added in v0.0.8

type HistoricalExecution struct {
	Query                      string
	Catalog                    string
	Database                   string
	QueryExecutionID           string
	OutputLocation             string
	State                      string
	WorkGroup                  string
	TotalExecutionTimeInMillis int64
	DataScannedInBytes         int64
	Cost                       float64
	SubmissionDateTime         time.Time
}

HistoricalExecution ..

func ListHistory added in v0.0.8

func ListHistory(maxResults int, historyCmdWorkgroup string) (h []HistoricalExecution, err error)

ListHistory returns query results per workgroup

type Query

type Query struct {
	OutputBucket string
	OutputPrefix string
	Database     string
	SQL          string
	Format       string
	JMESPath     string
	Statistics   bool
}

Query ...

func (*Query) Execute

func (q *Query) Execute() (*os.File, error)

Execute a SQL query against Athena

func (*Query) ExecuteToStdout

func (q *Query) ExecuteToStdout() error

ExecuteToStdout executes the query and returns the results to stdout

Jump to

Keyboard shortcuts

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