Skip to content

Pass WorkGroup parameter to GetTableMetadata and ListTableMetadata APIs#646

Merged
laughingman7743 merged 2 commits intomasterfrom
feature/workgroup-table-metadata
Jan 16, 2026
Merged

Pass WorkGroup parameter to GetTableMetadata and ListTableMetadata APIs#646
laughingman7743 merged 2 commits intomasterfrom
feature/workgroup-table-metadata

Conversation

@laughingman7743
Copy link
Member

@laughingman7743 laughingman7743 commented Jan 16, 2026

Summary

  • Added WorkGroup parameter to GetTableMetadata API call
  • Added WorkGroup parameter to ListTableMetadata API call
  • Added WorkGroup parameter to ListDatabases API call

When using PyAthena with a configured work_group, these metadata API calls now include the WorkGroup parameter. This allows IAM policies to use specific workgroup ARNs instead of wildcards, improving security posture.

This is particularly important for IAM Identity Center enabled Glue Data Catalogs where the WorkGroup parameter is required.

Changes

  • _get_table_metadata(): Now includes WorkGroup in the request when self._work_group is set
  • _build_list_table_metadata_request(): Now includes WorkGroup in the request when self._work_group is set
  • _build_list_databases_request(): Now includes WorkGroup in the request when self._work_group is set

Test plan

  • CI tests should pass
  • Manual testing can verify CloudTrail shows workGroup parameter in API calls

Fixes #645

laughingman7743 and others added 2 commits January 16, 2026 14:13
When using PyAthena with a configured work_group, the GetTableMetadata
and ListTableMetadata API calls now include the WorkGroup parameter.
This allows IAM policies to use specific workgroup ARNs instead of
wildcards, improving security posture.

Fixes #645

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Similar to GetTableMetadata and ListTableMetadata, the ListDatabases
API also supports the WorkGroup parameter for IAM Identity Center
enabled Glue Data Catalogs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@laughingman7743 laughingman7743 marked this pull request as ready for review January 16, 2026 06:29
@laughingman7743 laughingman7743 merged commit 41ff63e into master Jan 16, 2026
5 checks passed
@laughingman7743 laughingman7743 deleted the feature/workgroup-table-metadata branch January 16, 2026 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GetTableMetadata (AWS Athena) should pass configured work_group parameter

1 participant