From 2072bf8f84eda3c742b60a2c4b8660d5213067c6 Mon Sep 17 00:00:00 2001 From: grufino Date: Sat, 20 Aug 2022 16:21:10 -0300 Subject: [PATCH] use same aws profile as connection profile in clean_up_table boto3 client --- dbt/adapters/athena/impl.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dbt/adapters/athena/impl.py b/dbt/adapters/athena/impl.py index 165c77b2..2e71d72d 100755 --- a/dbt/adapters/athena/impl.py +++ b/dbt/adapters/athena/impl.py @@ -87,6 +87,7 @@ def clean_up_table( conn = self.connections.get_thread_connection() client = conn.handle with boto3_client_lock: + boto3.setup_default_session(profile_name=conn.credentials.aws_profile_name) glue_client = boto3.client('glue', region_name=client.region_name) try: table = glue_client.get_table(