feat(governance): dynamic OpenMetadata registration with domains, owners, tiers, and certification (zero hardcoding)

This commit is contained in:
2026-10-19 02:40:31 +07:00
parent d52768f6bf
commit b125f65351
5 changed files with 200 additions and 24 deletions
+11 -2
View File
@@ -352,9 +352,17 @@ class GreatExpectationsLakehouseOperator(BaseLakehouseOperator):
try:
# Login to get token
om_user = os.getenv("OPENMETADATA_USERNAME", "admin@open-metadata.org")
om_pass = os.getenv("OPENMETADATA_PASSWORD", "admin")
if om_pass == "admin":
b64_pass = "YWRtaW4="
else:
import base64
b64_pass = base64.b64encode(om_pass.encode("utf-8")).decode("utf-8")
login_req = urllib.request.Request(
f"{om_host}/api/v1/users/login",
data=json.dumps({"email": "admin@open-metadata.org", "password": "YWRtaW4="}).encode("utf-8"),
data=json.dumps({"email": om_user, "password": b64_pass}).encode("utf-8"),
headers={"Content-Type": "application/json"},
method="POST"
)
@@ -364,7 +372,8 @@ class GreatExpectationsLakehouseOperator(BaseLakehouseOperator):
if not token:
return
fqn = f"dlh_airflow_service.{self.dag_id or 'lakehouse_pipeline'}.{self.task_id}"
pipeline_svc = os.getenv("OPENMETADATA_PIPELINE_SERVICE_NAME", "dlh_airflow_service")
fqn = f"{pipeline_svc}.{self.dag_id or 'lakehouse_pipeline'}.{self.task_id}"
payload = {
"timestamp": int(time.time() * 1000),
"testCaseStatus": "Success" if summary["overall_success"] else "Failed",