refactor: Migrate WithAthena mixin to use AWS Wrangler for Athena I/O#89
Draft
Christos-Hadjinikolis wants to merge 17 commits intornd-13624from
Draft
refactor: Migrate WithAthena mixin to use AWS Wrangler for Athena I/O#89Christos-Hadjinikolis wants to merge 17 commits intornd-13624from
Christos-Hadjinikolis wants to merge 17 commits intornd-13624from
Conversation
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## rnd-13624 #89 +/- ##
=============================================
- Coverage 89.40% 89.31% -0.09%
=============================================
Files 16 16
Lines 1321 1310 -11
Branches 153 154 +1
=============================================
- Hits 1181 1170 -11
Misses 98 98
Partials 42 42
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
9cb7282 to
ab0030a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Summary
This PR refactors the
WithAthenamixin to use[awswrangler.athena.read_sql_query](https://aws-sdk-pandas.readthedocs.io/en/stable/stubs/awswrangler.athena.read_sql_query.html)for all Athena reads, replacing the previous PyAthena-based implementation.✅ What's changed
WithAthena_run_query→_run_wr_athena_query_wrapped@allow_optionsdirectly on the Wrangler readerAthenaDataSubSectionschema:s3_staging_dir→s3_outputregion_namesince it's optional for Wranglerpyathena.connecttowr.athena.read_sql_queryallow_options(...)usage across mixins💡 Why this matters
regionandboto3_sessionare now not mandatory fields;s3_additional_kwargsandpyarrow_additional_kwargsare handled properly via@allow_options.