Skip to content

Commit

Permalink
fix(ingest/glue): handle error when generating s3 tags for virtual vi…
Browse files Browse the repository at this point in the history
…ew tables (#5398)

Co-authored-by: Tim Costa <timcosta@amazon.com>
Co-authored-by: Shirshanka Das <shirshanka@apache.org>
  • Loading branch information
3 people authored Jul 20, 2022
1 parent 76133c6 commit d065553
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions metadata-ingestion/src/datahub/ingestion/source/aws/glue.py
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,10 @@ def get_dataset_properties() -> DatasetPropertiesClass:
)

def get_s3_tags() -> Optional[GlobalTagsClass]:
# when TableType=VIRTUAL_VIEW the Location can be empty and we should
# return no tags rather than fail the entire ingestion
if table.get("StorageDescriptor", {}).get("Location") is None:
return None
bucket_name = s3_util.get_bucket_name(
table["StorageDescriptor"]["Location"]
)
Expand Down

0 comments on commit d065553

Please sign in to comment.