fix 2918: Added Error Handling in policy tags (#2933)

This commit is contained in:
Ayush Shah 2022-02-24 00:56:14 +05:30 committed by GitHub
parent b570d520ac
commit fab36fe1b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,13 +55,15 @@ def get_columns(bq_schema):
"raw_data_type": str(_get_sqla_column_type(field)),
"policy_tags": None,
}
if field.policy_tags:
col_obj["policy_tags"] = (
PolicyTagManagerClient()
.get_policy_tag(name=field.policy_tags.names[0])
.display_name
)
try:
if field.policy_tags:
col_obj["policy_tags"] = (
PolicyTagManagerClient()
.get_policy_tag(name=field.policy_tags.names[0])
.display_name
)
except Exception as err:
logger.info(f"Skipping Policy Tag: {err}")
col_list.append(col_obj)
return col_list