Skip to content

Commit 96ebba3

Browse files
committed
Fix athena issue where it could not connect
1 parent 6d02766 commit 96ebba3

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

config.yml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ jobs:
128128
interval: '5m'
129129
connections:
130130
# see https://godoc.org/github.com/segmentio/go-athena#Driver.Open
131-
- 'athena://HOST_VALUE_IGNORED/<DB_NAME>?db=<DB_NAME>&region=<AWS_REGION>&output_location=s3://aws-athena-query-results-<ACCOUNT_ID>-<REGION>'
131+
- 'athena://?db=<DB_NAME>&region=<AWS_REGION>&output_location=s3://aws-athena-query-results-<ACCOUNT_ID>-<REGION>'
132132
queries:
133133
- name: "athena_query_rows"
134134
help: "Number of rows..."

job.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ func (j *Job) updateConnections() {
444444
// call go-athena's Open() to ensure conn.db is set,
445445
// otherwise API calls will complain about an empty database field:
446446
// "InvalidParameter: 1 validation error(s) found. - minimum field size of 1, StartQueryExecutionInput.QueryExecutionContext.Database."
447-
newConn.conn, err = sqlx.Open("athena", u.String())
447+
newConn.conn, err = sqlx.Open("athena", u.RawQuery)
448448
if err != nil {
449449
level.Error(j.log).Log("msg", "Failed to open Athena connection", "connection", conn, "err", err)
450450
continue

0 commit comments

Comments
 (0)