-
Notifications
You must be signed in to change notification settings - Fork 101
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
fix: cross account catalog_id glue client function calls #370
fix: cross account catalog_id glue client function calls #370
Conversation
I've noticed potentially redundant sections due to the repeated calls to:
I'm not familiar with the detailed structure of DBT's objects and classes. I'm uncertain whether it's feasible to directly incorporate |
@brunofaustino I've a similar setup - I use account B (consumer) to query data from a table in account A (producer) - and all works fine for me. Did you create a resource link for your database in lakeformation? I'm not 100% sure that this changes are needed. |
@nicor88 I'm write and read tables in account A (producer), performing these operations through account B (consumer). Due to specific characteristics of the project I'm working on, I'm not using Lakeformation (where I would use use resource link). As a result, we use Athena in account B (consumer) to register the catalog that originates from account A (producer), thereby enabling Athena to execute cross-account queries. In this scenario, the execution of dbt-athena fails when calling the |
@brunofaustino thanks. I believe that your implementation should work, please fix the CI. |
@nicor88 Could you please validate this? |
@brunofaustino the issue is most probably due to the fact that the mock calls on aws are not mocked as they should - therefore the unit tests must be re-adapted I believe. |
@svdimchenko @Jrmyy do you want to have another look? |
I tried this PR with the setup that I currently use, where I access cross account tables via resource links and lakeformation sharing - all still worked good. |
…370) (#467) Co-authored-by: nicor88 <[email protected]>
Description
Using Athena with Glue in cross-account environments results in the error bellow:
Context: Currently, I'm using the Athena service within an AWS account (Account A) to query data hosted in a Glue Catalog situated in another AWS account (Account B). The glue client typically infers this information from the active account's ID. However, I have identified an error that occurs due to an account ID parameter that needs adjustment to reflect the account ID where the tables reside (Account B, in this case).
In this scenario, it is advisable to provide the catalog_id when invoking the Glue client function.
Models used to test - Optional
Checklist