dbt-labs / dbt-labs/dbt-adapters

allow setting lakeformation tags in cross account catalogs

Open
#410 0 comments 0 reactions 0 assignees View on GitHub
pkg:dbt-athena
Dominant language
Python
Stars
233
Forks
362
Avg merge
3d 22h
Merged PRs (30d)
9

Description

### Is this your first time submitting a feature request?

- [X] I have searched the existing issues, and I could not find an existing issue for this feature

### Describe the feature

I have a use case where i want to set Lake Formation Tags on a table which is part of a database in a different account.

As far as I understand, the adapter always assumes that glue databases and catalog are located in the account from which the query is executed. For me this leads to a LakeFormation error as the adapter creates a database in the query account and attempts to apply LF-Tags the tags to this local Database.

I assume that my usecase should work if the catalogId can be added to the table resource in

https://github.com/dbt-labs/dbt-athena/blob/5db80c7e0017f2e83eead4a3378cb882fd72c2a1/dbt-athena/src/dbt/adapters/athena/lakeformation.py#L50

https://github.com/dbt-labs/dbt-adapters/issues/452
Describes a similar issue.

### Describe alternatives you've considered

_No response_

### Who will this benefit?

Makes the athena adapter more useful for data lake and data mesh applications with multi-account setups.

### Are you interested in contributing this feature?

Sure, if the change isn't too much effort. Let me know if you're open to a PR.

### Anything else?

Schema for the underlying boto3 call:
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/lakeformation/client/add_lf_tags_to_resource.html

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.