Files
atc-agents/deploy/openmetadata/enrich/di_trigger.py
T
mo b8a5b10bc4 feat(openmetadata): populate Data Insights dashboard
Assign owners to all 177 tables and descriptions + tier tags to the 18
business tables, then trigger SearchIndexing + DataInsights apps so the
platform Data Insights page shows real totals, description coverage and
tier distribution instead of empty plots.
2026-06-27 15:17:02 +00:00

23 lines
843 B
Python

import json, os, time, urllib.request, urllib.error
OM = "http://openmetadata-server:8585/api"
H = {"Authorization": "Bearer " + os.environ["OM_TOKEN"]}
def req(method, path, body=None):
data = json.dumps(body).encode() if body is not None else None
h = dict(H)
if data is not None:
h["Content-Type"] = "application/json"
r = urllib.request.Request(OM + path, data=data, headers=h, method=method)
try:
with urllib.request.urlopen(r, timeout=60) as resp:
return resp.status, (json.loads(resp.read().decode() or "{}"))
except urllib.error.HTTPError as e:
return e.code, e.read().decode()[:250]
for app in ["SearchIndexingApplication", "DataInsightsApplication"]:
st, r = req("POST", "/v1/apps/trigger/" + app, {})
print("trigger %-30s -> %s %s" % (app, st, str(r)[:120]))