skatsuta / athenai Goto Github PK
View Code? Open in Web Editor NEWHave fun with Amazon Athena from command line! ๐
License: Apache License 2.0
Have fun with Amazon Athena from command line! ๐
License: Apache License 2.0
Check whether the length of ColumnInfo
is 0.
athenai run file://sample.sql
Create all-in-one array and append it to the table using AppendBulk.
athenai show
See 7ee9eac
type safeBuffer struct {
mu sync.Mutex
bytes.Buffer
}
func (b *safeBuffer) String() string {
b.mu.Lock()
defer b.mu.Unlock()
return b.Buffer.String()
}
Split multiple statements by ;
, run them concurrently and show the results in the original order.
goreleaser/goreleaser: Deliver Go binaries as fast and easily as possible
https://github.com/goreleaser/goreleaser
athenai run --output file
By default, concurrency limits on your account allow you to run five concurrent queries at a time.
Add a flag to configure this: --parallel
or --concurrent
Read from stdin only if no argument is given.
$ athenai run < file.sql
2017/06/22 00:00:00.000 file.go [Query #1 uuid] ...
Scan ColumnInfo at first and then skip the first row if it's same as the header.
Add a badge to README.
athenai run --no-wait "QUERY..."
skatsuta/homebrew-athenai
repo and place Formula in it.Queued:
[QUEUED] QUERY;
Running:
[RUNNING] QUERY;
Succeeded:
[SUCCEEDED] QUERY;
athenai named create
athenai named list
athenai named run
athenai named delete
Use peco to select.
See log package
$ athenai run
athenai>
$ athenai run --encrypt SSE_KMS --kms <KMS_KEY_ARN> ...
--encrypt/-e
: specify the type of encryption for query results.
SSE_S3
, SSE_KMS
or CSE_KMS
--kms/-k
: KMS key ARN or ID. Only used for SSE_KMS
and CSE_KMS
.Reference: EncryptionConfiguration - Amazon Athena API Reference
--encrypt
and --kms
--help
usage description on run
subcommandathenai run --format csv "QUERY..."
TestShowResults
sometimes panics by index out of range
.
Investigate and fix the cause.
--- FAIL: TestShowResults (0.00s)
panic: runtime error: index out of range [recovered]
panic: runtime error: index out of range
goroutine 118 [running]:
testing.tRunner.func1(0xc42029fad0)
/usr/local/go/src/testing/testing.go:622 +0x55f
panic(0xadd680, 0xea0b00)
/usr/local/go/src/runtime/panic.go:489 +0x2f0
github.com/skatsuta/athenai/core.(*stubFilter).Run(0xc42025d800, 0xe76f60, 0xc420086d68, 0xb622be, 0x1)
/go/src/github.com/skatsuta/athenai/core/athenai_test.go:547 +0x330
github.com/skatsuta/athenai/core.(*Athenai).filterQueryExecutions(0xc4201ca4d0, 0xc42025fa00, 0x0, 0x32, 0x0, 0x32, 0x0, 0x0, 0x0)
github.com/skatsuta/athenai/core/_test/_obj_test/athenai.go:517 +0x95e
github.com/skatsuta/athenai/core.(*Athenai).selectQueryExecutions(0xc4201ca4d0, 0xe76f20, 0xc4201b5cc0, 0x0, 0x0, 0x0, 0x0, 0x0)
github.com/skatsuta/athenai/core/_test/_obj_test/athenai.go:568 +0x289
github.com/skatsuta/athenai/core.(*Athenai).ShowResults(0xc4201ca4d0)
github.com/skatsuta/athenai/core/_test/_obj_test/athenai.go:613 +0x227
github.com/skatsuta/athenai/core.TestShowResults(0xc42029fad0)
/go/src/github.com/skatsuta/athenai/core/athenai_test.go:751 +0x2928
testing.tRunner(0xc42029fad0, 0xb81100)
/usr/local/go/src/testing/testing.go:657 +0x108
created by testing.(*T).Run
/usr/local/go/src/testing/testing.go:697 +0x544
FAIL github.com/skatsuta/athenai/core 0.170s
After open source.
The location is $HOME/.athenai/config
.
And add --silent flag to disable this
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.