In the build.gradle
file, we can observe that the core models are imported.
dependencies {
implementation spec.product.pegasus.data
// Uncomment these if you want to depend on models defined in core datahub
// DataQualityRuleEvent in this example uses Urn and TimeseriesAspectBase
implementation project(':li-utils')
dataModel project(':li-utils')
implementation project(':metadata-models')
dataModel project(':metadata-models')
// Required for custom code plugins
implementation project(':entity-registry')
// Required for MCL/MCP hooks
implementation project (':metadata-io')
}
I defined a custom entity, but encountered an issue where institutionalMemory
could not be found during the import process.
id: mycompany-dq-model
entities:
- name: dataset
aspects:
- customDataQualityRules
- customDataQualityRuleEvent
- name: container
aspects:
- customDataQualityRules
- name: eventAttribute
category: core
keyAspect: eventAttributeKey
aspects:
- institutionalMemory
- ownership
- status
- browsePaths
{
"models" : {
"mycompany-dq-model" : {
"0.0.2" : {
"loadResult" : "FAILURE",
"registryLocation" : "/etc/datahub/plugins/models/mycompany-dq-model/0.0.2",
"failureReason" : "java.lang.IllegalArgumentException: Aspect institutionalMemory does not exist\n\tat com.linkedin.metadata.models.registry.PatchEntityRegistry.buildAspectSpec(PatchEntityRegistry.java:276)\n\tat com.linkedin.metadata.models.registry.PatchEntityRegistry.lambda$new$5(PatchEntityRegistry.java:195)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1541)\n\tat com.linkedin.metadata.models.registry.PatchEntityRegistry.<init>(PatchEntityRegistry.java:192)\n\tat com.linkedin.metadata.models.registry.PatchEntityRegistry.<init>(PatchEntityRegistry.java:145)\n\tat com.linkedin.metadata.models.registry.PatchEntityRegistry.<init>(PatchEntityRegistry.java:91)\n\tat com.linkedin.metadata.models.registry.PatchEntityRegistry.<init>(PatchEntityRegistry.java:101)\n\tat com.linkedin.metadata.models.registry.PluginEntityRegistryLoader.loadOneRegistry(PluginEntityRegistryLoader.java:181)\n\tat com.linkedin.metadata.models.registry.PluginEntityRegistryLoader.lambda$start$5(PluginEntityRegistryLoader.java:122)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1541)\n\tat com.linkedin.metadata.models.registry.PluginEntityRegistryLoader.lambda$start$6(PluginEntityRegistryLoader.java:120)\n\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)\n\tat java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)\n\tat java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base/java.lang.Thread.run(Thread.java:829)\n",
"failureCount" : 5
}
}
},
"patchCapable" : true,
"versions" : {
"linkedin/datahub" : {
"version" : "v0.12.1",
"commit" : "159a013b0515f8a94b88d62e4ad20aad228fac9d"
}
},
"managedIngestion" : {
"defaultCliVersion" : "0.12.1",
"enabled" : true
},
"statefulIngestionCapable" : true,
"supportsImpactAnalysis" : true,
"timeZone" : "GMT",
"telemetry" : {
"enabledCli" : true,
"enabledIngestion" : false
},
"datasetUrnNameCasing" : false,
"retention" : "true",
"datahub" : {
"serverType" : "prod"
},
"noCode" : "true"
}