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
  • Loading branch information
Tim Costa committed Jul 18, 2022
1 parent 65a308a commit 30c585e
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 30c585e

Please sign in to comment.