I tried to create a dashboard in superset to monit...
# troubleshoot
s
I tried to create a dashboard in superset to monitor what all tags are present in datahub
Copy code
SELECT urn AS urn,
       count(*) AS count
FROM
  (SELECT urn
   from metadata_aspect_v2
   where aspect = 'tagKey') AS expr_qry
GROUP BY urn
ORDER BY count DESC
But it is missing some tags which I know are applied on datasets. What am I doing wrong?
Basically I am trying to find out what how many entities have what tag applied
something like
Copy code
tag1 datasets 3
tag1 tasks    1
tag2 datasets 5
Basically trying to get a tag usage overview
m
@square-activity-64562: may not be very scalable to hit mysql for this
you probably want to use the elastic index for these queries
also: it is a bit fragile to run these queries against the raw storage / index layers to get this stuff out
since that could change in a future upgrade
take a look at how the metadata analytics endpoint is built... and maybe extend it to add these features : we can figure out a generic design together
you can still connect superset to it to visualize I guess
it would require writing a "datahub source" for superset I guess