Skip to content

Commit da6e0ac

Browse files
author
HenryAtUber
committed
prepare for v1.1.6
1 parent c282e5e commit da6e0ac

File tree

10 files changed

+30
-144
lines changed

10 files changed

+30
-144
lines changed

ChangeLog.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
v1.1.6 - Pseudo commands, bug fix and more document and sample code (May 25, 2020)
3+
4+
- Introduce pseudo commands: get_query_id, get_query_id_status, stop_query_id, get_driver_version (doc: https://github.com/uber/athenadriver#pseudo-commands, Sample code: https://github.com/uber/athenadriver/tree/master/examples)
5+
- Enable AWS profile manual setup for authentication (Sample code: https://github.com/uber/athenadriver/blob/master/examples/auth.go)
6+
- Query Athena with athenadriver in AWS Lambda (https://github.com/uber/athenadriver/tree/master/examples/lambda/Go)
7+
- One bug fix (https://github.com/uber/athenadriver/commit/8618706818a8db7abc8f1bd344ac0eca50d38959)

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Except the basic features provided by Go `database/sql` like error handling, dat
4747
- Read-Only mode - disable database write in driver level
4848
- Moneywise mode :moneybag: - print out query cost(USD) for each query
4949
- Query with Athena Query ID(QID)
50-
- Pseudo commands from database/sql interface: `get_query_id`, `get_query_id_status`, `stop_query_id`, `get_workgroup`, `list_workgroups`, `update_workgroup`, `get_cost`, `get_execution_report` etc
50+
- Pseudo commands from database/sql interface: `get_query_id`, `get_query_id_status`, `stop_query_id`, `get_workgroup`, `list_workgroups`, `update_workgroup`, `get_cost`, `get_execution_report` etc [:link:](#pseudo-commands)
5151

5252
`athenadriver` can extremely simplify your code. Check [athenareader](https://github.com/uber/athenadriver/tree/master/athenareader) out as an example and a convenient tool for your Athena query in command line.
5353

@@ -785,6 +785,10 @@ The syntax is `pc:pseudo_command parameter`.
785785

786786
`pc:stop_query_id Query_ID` - To stop the Query corresponding the Query ID. If there is no error, a one row string with `OK` will be returned. Example: [pc_stop_query_id.go](https://github.com/uber/athenadriver/blob/master/examples/pc_stop_query_id.go).
787787

788+
### get_driver_version
789+
790+
`pc:get_driver_version` - To return the version of athenadriver. Example: [pc_get_driver_version.go](https://github.com/uber/athenadriver/blob/master/examples/pc_get_driver_version.go).
791+
788792

789793
## Limitations of Go/Athena SDK's and `athenadriver`'s Solution
790794

@@ -972,7 +976,7 @@ For the contributors, the following is `athenadriver` Package's UML Class Diagra
972976
[cov-img]: https://codecov.io/gh/henrywu2019/athenasql/branch/uber/graph/badge.svg
973977
[cov]: https://codecov.io/gh/uber/athenadriver
974978

975-
[release-img]: https://img.shields.io/badge/release-v1.1.4-red
979+
[release-img]: https://img.shields.io/badge/release-v1.1.6-red
976980
[release]: https://github.com/uber/athenadriver/releases
977981

978982
[ci-img]: https://api.travis-ci.com/uber/athenadriver.svg?token=e2usf1UJEGmsFDHzV61y&branch=master

athenareader/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ module github.com/uber/athenadriver/athenareader
22

33
go 1.13
44

5-
require github.com/uber/athenadriver v1.1.4
5+
require github.com/uber/athenadriver v1.1.6

athenareader/go.sum

Lines changed: 0 additions & 136 deletions
This file was deleted.

athenareader/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import (
3434
var commandLine = flag.NewFlagSet(os.Args[0], flag.ExitOnError)
3535

3636
func printVersion() {
37-
println("Current build version: v1.1.4")
37+
println("Current build version: v1.1.6")
3838
}
3939

4040
// main will query Athena and print all columns and rows information in csv format

examples/lambda/Go/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
## Example
44

5-
build and package locally:
5+
First, install `aws-lambda-go`:
6+
7+
```go
8+
go get github.com/aws/aws-lambda-go/lambda
9+
```
10+
11+
Build and package locally:
612
```go
713
go mod init lambda-test
814
go build main.go && zip function.zip main

examples/lambda/Go/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ go 1.13
44

55
require (
66
github.com/aws/aws-lambda-go v1.17.0
7-
github.com/uber/athenadriver v1.1.4
7+
github.com/uber/athenadriver v1.1.6
88
)

examples/pc_get_driver_version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@ func main() {
5555
/*
5656
Sample Output:
5757
_col0
58-
1.1.5
58+
1.1.6
5959
*/

go/connection_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,4 +750,9 @@ func Test_PseudoCommand(t *testing.T) {
750750
dr, er = c.ExecContext(context.Background(), query, []driver.NamedValue{})
751751
assert.NotNil(t, er)
752752
assert.Nil(t, dr)
753+
754+
query = "pc:get_driver_version"
755+
dr, er = c.ExecContext(context.Background(), query, []driver.NamedValue{})
756+
assert.Nil(t, er)
757+
assert.NotNil(t, dr)
753758
}

go/constants.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,4 @@ const PCStopQID = "stop_query_id"
107107
// PCGetDriverVersion is the pseudo command to get the version of athenadriver
108108
const PCGetDriverVersion = "get_driver_version"
109109

110-
const driverVersion = "1.1.5"
110+
const driverVersion = "1.1.6"

0 commit comments

Comments
 (0)