Skip to content

Instantly share code, notes, and snippets.

@wizardxz
Created September 3, 2022 02:14
Show Gist options
  • Save wizardxz/858b1ffb658f089d53a382e42e4f9d29 to your computer and use it in GitHub Desktop.
Save wizardxz/858b1ffb658f089d53a382e42e4f9d29 to your computer and use it in GitHub Desktop.
namespace com.linkedin.schema
import com.linkedin.common.GlobalTags
import com.linkedin.common.GlossaryTerms
import com.linkedin.pinterest.GenericDataElement
import com.linkedin.pinterest.DataElements
/**
* SchemaField to describe metadata related to dataset schema.
*/
record EditableSchemaFieldInfo {
/**
* FieldPath uniquely identifying the SchemaField this metadata is associated with
*/
fieldPath: string
/**
* Description
*/
@Searchable = {
"fieldName": "editedFieldDescriptions",
"fieldType": "TEXT",
"boostScore": 0.1
}
description: optional string
/**
* Tags associated with the field
*/
@Relationship = {
"/tags/*/tag": {
"name": "EditableSchemaFieldTaggedWith",
"entityTypes": [ "tag" ]
}
}
@Searchable = {
"/tags/*/tag": {
"fieldName": "editedFieldTags",
"fieldType": "URN",
"boostScore": 0.5
}
}
globalTags: optional GlobalTags
/**
* Glossary terms associated with the field
*/
@Relationship = {
"/terms/*/urn": {
"name": "EditableSchemaFieldWithGlossaryTerm",
"entityTypes": [ "glossaryTerm" ]
}
}
@Searchable = {
"/terms/*/urn": {
"fieldName": "editedFieldGlossaryTerms",
"fieldType": "URN",
"boostScore": 0.5
}
}
glossaryTerms: optional GlossaryTerms
dataElement: optional GenericDataElement
/**
* Data elements associated with the field
*/
@Relationship = {
"/DataElements/*/urn": {
"name": "EditableSchemaFieldWithDataElement",
"entityTypes": [ "dataElement" ]
}
}
@Searchable = {
"/DataElements/*/urn": {
"fieldName": "editedFieldDataElements",
"fieldType": "URN",
"boostScore": 0.5
}
}
dataElements: optional DataElements
}
@wizardxz
Copy link
Author

wizardxz commented Sep 3, 2022

If L74-L80 exist, aspectSpecs will be wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment