chore: sync deploy/gen_warehouse_workflow_draft.js
This commit is contained in:
1 parent
c64eebfd69
commit
16f16822a0
1 file changed
+4
-2
@@ -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"):
|
||||
|
||||
Reference in new issue
Block a user