Support AWS Managed Output Buckets in AthenaDriver Configuration #78
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Key Changes
Config API Enhancements:
Added a new optional flag to the configuration allowing users to enable AWS managed output buckets during setup instead of specifying a custom S3 output bucket.
Updated the NewDefaultConfig function and added SetManagedBucket/GetManagedBucket logic.
Query Execution Logic:
The QueryContext was refactored to conditionally set the ResultConfiguration in Athena queries.
If the AWS managed bucket feature is enabled, the ResultConfiguration.OutputLocation is omitted, aligning with best practices for Athena workgroups that use managed buckets.
Documentation and Example Updates:
The README.md and code examples now include documentation on configuring AthenaDriver to use AWS managed output buckets.
Provided a new example function: useAthenaDriverConfigForAuthWithManagedBucket, demonstrating authentication and connection with managed buckets in examples/auth.go.
Why
This enhancement simplifies configuration for users leveraging AWS managed buckets and avoids conflicts with workgroups that already have managed output buckets enabled in AWS.