/
SchemaField.pdl
137 lines (120 loc) · 3.25 KB
/
SchemaField.pdl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
namespace com.linkedin.schema
import com.linkedin.dataset.SchemaFieldPath
import com.linkedin.common.GlobalTags
import com.linkedin.common.GlossaryTerms
import com.linkedin.common.AuditStamp
/**
* SchemaField to describe metadata related to dataset schema.
*/
record SchemaField {
/**
* Flattened name of the field. Field is computed from jsonPath field.
*/
@Searchable = {
"fieldName": "fieldPaths",
"fieldType": "TEXT",
"boostScore": 5.0,
"queryByDefault": "true"
}
fieldPath: SchemaFieldPath
/**
* Flattened name of a field in JSON Path notation.
*/
@Deprecated
jsonPath: optional string
/**
* Indicates if this field is optional or nullable
*/
nullable: boolean = false
/**
* Description
*/
@Searchable = {
"fieldName": "fieldDescriptions",
"fieldType": "TEXT",
"boostScore": 0.1
}
description: optional string
/**
* Label of the field. Provides a more human-readable name for the field than field path. Some sources will
* provide this metadata but not all sources have the concept of a label. If just one string is associated with
* a field in a source, that is most likely a description.
*
* Note that this field is deprecated and is not surfaced in the UI.
*/
@Searchable = {
"fieldName": "fieldLabels",
"fieldType": "TEXT",
"boostScore": 0.2
}
@Deprecated
label: optional string
/**
* An AuditStamp corresponding to the creation of this schema field.
*/
created: optional AuditStamp
/**
* An AuditStamp corresponding to the last modification of this schema field.
*/
lastModified: optional AuditStamp
/**
* Platform independent field type of the field.
*/
type: SchemaFieldDataType
/**
* The native type of the field in the dataset's platform as declared by platform schema.
*/
nativeDataType: string
/**
* There are use cases when a field in type B references type A. A field in A references field of type B. In such cases, we will mark the first field as recursive.
*/
recursive: boolean = false
/**
* Tags associated with the field
*/
@Relationship = {
"/tags/*/tag": {
"name": "SchemaFieldTaggedWith",
"entityTypes": [ "tag" ]
}
}
@Searchable = {
"/tags/*/tag": {
"fieldName": "fieldTags",
"fieldType": "URN",
"boostScore": 0.5
}
}
globalTags: optional GlobalTags
/**
* Glossary terms associated with the field
*/
@Relationship = {
"/terms/*/urn": {
"name": "SchemaFieldWithGlossaryTerm",
"entityTypes": [ "glossaryTerm" ]
}
}
@Searchable = {
"/terms/*/urn": {
"fieldName": "fieldGlossaryTerms",
"fieldType": "URN",
"boostScore": 0.5
}
}
glossaryTerms: optional GlossaryTerms
/**
* For schema fields that are part of complex keys, set this field to true
* We do this to easily distinguish between value and key fields
*/
isPartOfKey: boolean = false
/**
* For Datasets which are partitioned, this determines the partitioning key.
*/
isPartitioningKey: optional boolean
/**
* For schema fields that have other properties that are not modeled explicitly,
* use this field to serialize those properties into a JSON string
*/
jsonProps: optional string
}