From 16f16822a07f51e1320e4333f8c356c7f3951da9 Mon Sep 17 00:00:00 2001 From: admin <2775444633@qq.com> Date: Tue, 24 Nov 2026 17:18:11 +0000 Subject: [PATCH] chore: sync deploy/gen_warehouse_workflow_draft.js --- deploy/gen_warehouse_workflow_draft.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deploy/gen_warehouse_workflow_draft.js b/deploy/gen_warehouse_workflow_draft.js index c1c5cf4..fc02e27 100644 --- a/deploy/gen_warehouse_workflow_draft.js +++ b/deploy/gen_warehouse_workflow_draft.js @@ -252,7 +252,8 @@ def type_union(t): return {"com.linkedin.schema.StringType": {}} def propose(aspect_name, urn, value): - body = {"proposal": {"entityType": "dataset", "entityUrn": urn, "changeType": "UPSERT", "aspectName": aspect_name, + etype = "schemaField" if urn.startswith("urn:li:schemaField:") else "dataset" + body = {"proposal": {"entityType": etype, "entityUrn": urn, "changeType": "UPSERT", "aspectName": aspect_name, "aspect": {"contentType": "application/json", "value": json.dumps(value)}}} r = requests.post(DH + "/aspects?action=ingestProposal", headers=HDRS, json=body, timeout=25) return ("ok" if r.status_code == 200 and "success" in r.text else "err", r.text[:100]) @@ -292,7 +293,8 @@ def main(item: str): r6 = ("skip", "") if op.get("term_fields"): r6 = propose("editableSchemaMetadata", urn, { - "editableSchemaFieldInfo": [{"fieldPath": f["field"], "glossaryTerms": [f["term_urn"]]} for f in op["term_fields"]], + "editableSchemaFieldInfo": [{"fieldPath": f["field"], + "glossaryTerms": {"auditStamp": who, "terms": [{"urn": f["term_urn"]}]}} for f in op["term_fields"]], "created": who, "lastModified": who}) r7 = ("skip", "") if op.get("sensitive_fields"):