community: make AthenaLoader profile_name optional and fix type hint (#24958)

- **Description:** This PR makes the AthenaLoader profile_name optional
and fixes the type hint which says the type is `str` but it should be
`str` or `None` as None is handled in the loader init. This is a minor
problem but it just confused me when I was using the Athena Loader to
why we had to use a Profile, as I want that for local but not
production.
- **Issue:** #24957 
- **Dependencies:** None.
This commit is contained in:
Jim Baldwin 2024-08-06 00:28:58 +10:00 committed by GitHub
parent 335894893b
commit 6890daa90c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -35,15 +35,16 @@ class AthenaLoader(BaseLoader):
query: str,
database: str,
s3_output_uri: str,
profile_name: str,
profile_name: Optional[str] = None,
metadata_columns: Optional[List[str]] = None,
):
"""Initialize Athena document loader.
Args:
query: The query to run in Athena.
database: Athena database
s3_output_uri: Athena output path
database: Athena database.
s3_output_uri: Athena output path.
profile_name: Optional. AWS credential profile, if profiles are being used.
metadata_columns: Optional. Columns written to Document `metadata`.
"""
self.query = query