Tomme / dbt-athena

The athena adapter plugin for dbt (https://getdbt.com)
Apache License 2.0
140 stars 79 forks source link

Respect configured AWS profile when calling boto3 #121

Closed cstruct closed 1 year ago

cstruct commented 1 year ago

Use a shared boto3.session.Session between pyathena and manual boto3 calls. This fixes #120

owenprough-sift commented 1 year ago

How similar is this PR to #56 ?

cstruct commented 1 year ago

Aah, I obviously don't know how to search. This PR is very similar, where it differs is that it shares one session with pyathena and that the bug is fixed for newly introduced usages of boto3. I can close this in favor of the old one if that is preferable and it is updated to cover the new places that boto3 is used.

w0rks74710n commented 1 year ago

125 leverages this approach and introduces a global variable that holds the boto3_session that can be retrieve at any point in time via get_boto3_session(). Happy to decline that PR in favour of this one. As I mention #125, #56 has been lying around for quite some time (outdated version of the code) and #124 addresses the issue in only one instance of the adapter i.e. clean_up_table.