Hi everyone! I have created a new aspect for the ...
# advice-metadata-modeling
a
Hi everyone! I have created a new aspect for the Dataset entity, and I would like to show it on the UI, as a tab in the entity page! I followed the guide (attached a picture), and added the autoRender and renderSpec to the aspect annotation, I have included the new aspect in the registry also. I have redeployed the backend and the frontend. I tried, the new aspect is connected to the Dataset entity/aspect, through the OpenAPI I can modify and retrieve the values within. On the UI, unfortunately, I cannot find it on the UI as an auto renderable tab. Maybe I am missing something or, leaving out some necessary steps. Could you help me understand this autoRender feature, and how to debug the problem? Thanks in advance! Marcell
1
a
Hi @agreeable-army-26750, please try to avoid copy-pasting a message to multiple channels as it’s against our community guidelines, instead share a link to the original message
b
You can view our Slack Gluidelines here: https://datahubproject.io/docs/slack/
a
Hi @astonishing-answer-96712! Thanks for replying, sorry for copy pasting!
f
While I’m also newbie to this topic, one first thing you could try is to open the browser devtools, refresh the dataset page and inspect the GraphQL request, which is the one with “getDataset” in its request payload. If the backend works properly, you should see in its response the field
dataset.autoRenderAspects
carrying your custom aspect data.
If your custom aspect data are there but you can’t see it in the UI, my suggestion would be check if there are any console error logs in the browser devtools relevant to the rendering. Further than that, you could even spin up the datahub-web-react application, dive into the rendering logic, and add breakpoints to go through it and see what goes wrong.
a
Thanks @fierce-guitar-16421! Checking it right away!
Unfortunately it is not coming through, even though it is present when I am getting it from openAPI. This is how my aspect looks like, attached to Dataset, updated entity-registry, rebuilt and deployed backend!
Copy code
namespace com.linkedin.common

/**
 * Related edc entities information
 */
@Aspect = {
   "name": "edcEntities",
   "autoRender": true,
   "renderSpec": {
     "displayType": "tabular", // or properties, markdown, syntax
     "key": "relatedDatasetMetadata",
     "displayName": "EDC Entities"
   }
}
record EdcEntities {

  /**
   * The related dataset metadata
   */
  relatedDatasetMetadata: array[DatasetMetadataAssociation]

  /**
   * Audit stamp containing who reported the related dataset metadata
   */
  auditStamp: AuditStamp
}
f
@agreeable-army-26750 Do you see the “EDC Entities” tab containing no data, or do you not see such a tab at all?
a
I dont see any tabs at all, the graph response shows no auto renderable aspects 😞
f
Wondering if the custom models are loaded properly. Did you see such a line in the
datahub-gms
pod logs when it starts:
Copy code
Loading custom config entity file: ...
a
Let me check it!
Could that be an issue that based on the doc attached, i followed the open source fork method to introduce new aspects, not the custom one? https://datahubproject.io/docs/metadata-modeling/extending-the-metadata-model/#-step-4-choose-a-place-to-store-your-model-extension
f
Ah ok, you are not going with the custom repo approach. Then I cannot yet justify if something might be missing, although I believe the model registration and rendering should work roughly the same way. I’ll also try this approach in the next days. Maybe later on I can see if I’ll have the same problem. 🙂
a
Thanks @fierce-guitar-16421 for your help! Please if you find something, notify me!
f
@agreeable-army-26750 Adding the custom aspect into the package of of built-in aspects seems to work for me. Would you probably briefly recap what changes you did? For example which files you added and updated. Maybe we can figure out what is missing.
a
Hi @fierce-guitar-16421 You are absolutely right! I managed to solve the issue, my docker was badly configured 😞
f
Cool to hear it’s solved!