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.
This commit is contained in:
mo
2026-06-27 15:17:02 +00:00
parent 28821e8b04
commit b8a5b10bc4
3 changed files with 157 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
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]))