fix(ingest/dbt): allow custom owner types for dbt meta (#11460)

This commit is contained in:
Harshal Sheth 2024-09-23 19:57:30 -07:00 committed by GitHub
parent fe12395e8c
commit 32c870244e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -415,15 +415,7 @@ class DBTCommonConfig(
if v["operation"] == "add_owner": if v["operation"] == "add_owner":
owner_category = v["config"].get("owner_category") owner_category = v["config"].get("owner_category")
if owner_category: if owner_category:
allowed_categories = [ mce_builder.validate_ownership_type(owner_category)
value
for name, value in vars(OwnershipTypeClass).items()
if not name.startswith("_")
]
if (owner_category.upper()) not in allowed_categories:
raise ValueError(
f"Owner category {owner_category} is not one of {allowed_categories}"
)
return meta_mapping return meta_mapping
@validator("include_column_lineage") @validator("include_column_lineage")