Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

athena-driver #3014

Merged
merged 46 commits into from
Sep 26, 2023
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
2ee73b7
athena-driver
Sep 1, 2023
328f2ae
athena-driver
Sep 1, 2023
a047f82
athena-driver
Sep 4, 2023
dbba228
athena-driver
Sep 4, 2023
985f195
athena-driver review
Sep 5, 2023
3db7655
athena-driver review
Sep 5, 2023
5c66737
athena-driver review
Sep 5, 2023
605b791
athena-driver review
Sep 5, 2023
2008155
athena-driver review
Sep 5, 2023
00d3ec0
athena-driver review
Sep 5, 2023
dc52056
athena-driver review
Sep 6, 2023
d7e774b
athena-driver review
Sep 6, 2023
e68b2af
Merge remote-tracking branch 'origin/main' into athena-connector
Sep 6, 2023
29b816e
Merge remote-tracking branch 'origin/main' into athena-connector
Sep 6, 2023
e5f1794
Merge remote-tracking branch 'origin/main' into athena-connector
Sep 6, 2023
549cf67
Run go mod tidy
begelundmuller Sep 7, 2023
e040606
athena-driver review
Sep 11, 2023
804f03e
athena-driver review
Sep 11, 2023
844877f
athena-driver review
Sep 12, 2023
f0bbee9
athena-driver review
Sep 12, 2023
8d4b69b
Merge remote-tracking branch 'origin/main' into athena-connector
Sep 13, 2023
03d5c42
Merge remote-tracking branch 'origin/main' into athena-connector
Sep 13, 2023
a5a5146
Merge remote-tracking branch 'origin/main' into athena-connector
Sep 13, 2023
b7fc59d
athena-driver review
Sep 13, 2023
28606aa
athena-driver review
Sep 13, 2023
c6af926
athena-driver review
Sep 13, 2023
163788c
Merge remote-tracking branch 'origin/main' into athena-connector
Sep 14, 2023
6d04765
Merge remote-tracking branch 'origin/main' into athena-connector
Sep 14, 2023
45efd9a
Merge remote-tracking branch 'origin/main' into athena-connector
Sep 14, 2023
b594ed4
athena-driver review
Sep 21, 2023
7ab90bc
Merge remote-tracking branch 'origin/main' into athena-connector
esevastyanov Sep 22, 2023
bf2f044
Auto-determine AWS region
esevastyanov Sep 23, 2023
28f3e6e
Athena icon
esevastyanov Sep 23, 2023
18b423d
Removed the auto-resolving of AWS region
esevastyanov Sep 25, 2023
679e85d
Simplified a clean-up process
esevastyanov Sep 25, 2023
7e320ac
Merge remote-tracking branch 'origin/main' into athena-connector
esevastyanov Sep 25, 2023
3ab245d
Updated according to previously merged changes
esevastyanov Sep 25, 2023
804de57
Dash vs underscore
esevastyanov Sep 25, 2023
591a4ef
A new line after a query
esevastyanov Sep 25, 2023
bc7f95d
Non-nil NextContinuationToken
esevastyanov Sep 25, 2023
af69414
ctx cancellation instead of a hardcoded timer
esevastyanov Sep 25, 2023
0bd4d25
Format for FileIterator
esevastyanov Sep 25, 2023
a0d18da
deferred cleanupFn()
esevastyanov Sep 25, 2023
a1d0eb9
Aligned Athena query with a source config
esevastyanov Sep 25, 2023
6d72df9
Merge remote-tracking branch 'origin/main' into athena-connector
esevastyanov Sep 25, 2023
480aa95
Fixed a merge conflict
esevastyanov Sep 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
athena-driver
  • Loading branch information
Egor Ryashin committed Sep 4, 2023
commit a047f82cbbfd19043d82803599169f4b28ad659e
11 changes: 3 additions & 8 deletions runtime/drivers/athena/athena.go
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ import (

"github.com/aws/aws-sdk-go-v2/aws"

"github.com/aws/aws-sdk-go-v2/config"
awsconfig "github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/athena"
"github.com/aws/aws-sdk-go-v2/service/athena/types"
s3v2 "github.com/aws/aws-sdk-go-v2/service/s3"
@@ -26,8 +26,6 @@ import (
"gocloud.dev/blob/s3blob"
)

const defaultPageSize = 20

func init() {
drivers.Register("athena", driver{})
drivers.RegisterAsConnector("athena", driver{})
@@ -237,10 +235,7 @@ func (c *Connection) DownloadFiles(ctx context.Context, source *drivers.BucketSo
}

func (c *Connection) openBucket(ctx context.Context, conf *sourceProperties, bucket string) (*blob.Bucket, error) {
cfg, err := config.LoadDefaultConfig(context.TODO(), func(o *config.LoadOptions) error {
// o.Region = conf.Region
return nil
}, config.WithSharedConfigProfile(conf.ProfileName))
cfg, err := awsconfig.LoadDefaultConfig(context.TODO(), awsconfig.WithSharedConfigProfile(conf.ProfileName))
if err != nil {
return nil, err
}
@@ -252,7 +247,7 @@ func (c *Connection) openBucket(ctx context.Context, conf *sourceProperties, buc
func (c *Connection) unload(ctx context.Context, conf *sourceProperties, path string) error {
finalSQL := fmt.Sprintf("UNLOAD (%s) TO '%s' WITH (format = 'PARQUET')", conf.SQL, path)
begelundmuller marked this conversation as resolved.
Show resolved Hide resolved

cfg, err := config.LoadDefaultConfig(context.TODO(), config.WithSharedConfigProfile(conf.ProfileName))
cfg, err := awsconfig.LoadDefaultConfig(context.TODO(), awsconfig.WithSharedConfigProfile(conf.ProfileName))
if err != nil {
return err
}