@finos/legend-graph 32.1.66 → 32.1.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/graph/metamodel/pure/lineage/LineageModel.d.ts +59 -0
- package/lib/graph/metamodel/pure/lineage/LineageModel.d.ts.map +1 -1
- package/lib/graph/metamodel/pure/lineage/LineageModel.js +187 -1
- package/lib/graph/metamodel/pure/lineage/LineageModel.js.map +1 -1
- package/lib/package.json +1 -1
- package/package.json +1 -1
- package/src/graph/metamodel/pure/lineage/LineageModel.ts +242 -1
|
@@ -81,5 +81,64 @@ export declare class LineageModel {
|
|
|
81
81
|
classLineage: Graph;
|
|
82
82
|
functionTrees: PropertyPathTree[];
|
|
83
83
|
reportLineage: ReportLineage;
|
|
84
|
+
propertyLineage?: PropertyLineageReport;
|
|
85
|
+
}
|
|
86
|
+
export declare class PropertyLineageReport {
|
|
87
|
+
propertyOwner: PropertyLineageNode[];
|
|
88
|
+
ownerLink: OwnerLink[];
|
|
89
|
+
}
|
|
90
|
+
export declare class PropertyLineageNode {
|
|
91
|
+
id: string;
|
|
92
|
+
name: string;
|
|
93
|
+
}
|
|
94
|
+
export declare class StorePropertyLineageNode extends PropertyLineageNode {
|
|
95
|
+
}
|
|
96
|
+
export declare class PropertyOwnerNode extends PropertyLineageNode {
|
|
97
|
+
properties: LineageProperty[];
|
|
98
|
+
}
|
|
99
|
+
export declare class RootQuery extends PropertyOwnerNode {
|
|
100
|
+
}
|
|
101
|
+
export declare class LineageQuery extends PropertyOwnerNode {
|
|
102
|
+
}
|
|
103
|
+
export declare class RelationalPropertyOwner extends PropertyOwnerNode {
|
|
104
|
+
namedRelation: string;
|
|
105
|
+
relationType: string;
|
|
106
|
+
relationName: string;
|
|
107
|
+
schemaName: string;
|
|
108
|
+
relationOwnerPath: string;
|
|
109
|
+
}
|
|
110
|
+
export declare class MappedSetOwner extends PropertyOwnerNode {
|
|
111
|
+
setImplementationID: string;
|
|
112
|
+
}
|
|
113
|
+
export declare class MappedClassOwner extends PropertyOwnerNode {
|
|
114
|
+
mapping?: string;
|
|
115
|
+
setImplementationID?: string;
|
|
116
|
+
_class: string;
|
|
117
|
+
}
|
|
118
|
+
export declare class OwnerLink {
|
|
119
|
+
source: string;
|
|
120
|
+
target: string;
|
|
121
|
+
}
|
|
122
|
+
export declare class LineageProperty {
|
|
123
|
+
name: string;
|
|
124
|
+
dataType?: string;
|
|
125
|
+
sourceInfo?: SourceInformation;
|
|
126
|
+
scope?: string;
|
|
127
|
+
propertyType: string;
|
|
128
|
+
ownerID: string;
|
|
129
|
+
sourceProperties: LineageProperty[];
|
|
130
|
+
annotations: Annotation[];
|
|
131
|
+
}
|
|
132
|
+
export declare class LineageModelProperty extends LineageProperty {
|
|
133
|
+
propertyTree: PropertyPathTree;
|
|
134
|
+
}
|
|
135
|
+
export declare class SourceInformation {
|
|
136
|
+
sourceId: string;
|
|
137
|
+
startLine: number;
|
|
138
|
+
startColumn: number;
|
|
139
|
+
endLine: number;
|
|
140
|
+
endColumn: number;
|
|
141
|
+
}
|
|
142
|
+
export declare class Annotation {
|
|
84
143
|
}
|
|
85
144
|
//# sourceMappingURL=LineageModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LineageModel.d.ts","sourceRoot":"","sources":["../../../../../src/graph/metamodel/pure/lineage/LineageModel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"LineageModel.d.ts","sourceRoot":"","sources":["../../../../../src/graph/metamodel/pure/lineage/LineageModel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAWH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AAErC,qBAAa,KAAK;IAChB,KAAK,EAAE,WAAW,EAAE,CAAM;IAC1B,KAAK,EAAE,WAAW,EAAE,CAAM;CAC3B;AAED,qBAAa,WAAW;IACtB,IAAI,EAAG,QAAQ,CAAC;CACjB;AA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AAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,EAAG,MAAM,CAAC;IACtB,OAAO,EAAG,MAAM,CAAC;IACjB,gBAAgB,EAAE,eAAe,EAAE,CAAM;IACzC,WAAW,EAAE,UAAU,EAAE,CAAM;CAChC;AAED,qBAAa,oBAAqB,SAAQ,eAAe;IACvD,YAAY,EAAG,gBAAgB,CAAC;CACjC;AAED,qBAAa,iBAAiB;IAC5B,QAAQ,EAAG,MAAM,CAAC;IAClB,SAAS,EAAG,MAAM,CAAC;IACnB,WAAW,EAAG,MAAM,CAAC;IACrB,OAAO,EAAG,MAAM,CAAC;IACjB,SAAS,EAAG,MAAM,CAAC;CACpB;AACD,qBAAa,UAAU;CAAG"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { createModelSchema, primitive, list, object, custom } from 'serializr';
|
|
16
|
+
import { createModelSchema, primitive, list, object, custom, optional, } from 'serializr';
|
|
17
17
|
export class Graph {
|
|
18
18
|
nodes = [];
|
|
19
19
|
edges = [];
|
|
@@ -82,7 +82,110 @@ export class LineageModel {
|
|
|
82
82
|
classLineage;
|
|
83
83
|
functionTrees = [];
|
|
84
84
|
reportLineage;
|
|
85
|
+
propertyLineage;
|
|
85
86
|
}
|
|
87
|
+
// --- Property Lineage Model Classes ---
|
|
88
|
+
export class PropertyLineageReport {
|
|
89
|
+
propertyOwner = [];
|
|
90
|
+
ownerLink = [];
|
|
91
|
+
}
|
|
92
|
+
export class PropertyLineageNode {
|
|
93
|
+
id;
|
|
94
|
+
name;
|
|
95
|
+
}
|
|
96
|
+
export class StorePropertyLineageNode extends PropertyLineageNode {
|
|
97
|
+
}
|
|
98
|
+
export class PropertyOwnerNode extends PropertyLineageNode {
|
|
99
|
+
properties = [];
|
|
100
|
+
}
|
|
101
|
+
export class RootQuery extends PropertyOwnerNode {
|
|
102
|
+
}
|
|
103
|
+
export class LineageQuery extends PropertyOwnerNode {
|
|
104
|
+
}
|
|
105
|
+
export class RelationalPropertyOwner extends PropertyOwnerNode {
|
|
106
|
+
namedRelation; // NamedRelation[1] as string
|
|
107
|
+
relationType;
|
|
108
|
+
relationName;
|
|
109
|
+
schemaName;
|
|
110
|
+
relationOwnerPath;
|
|
111
|
+
}
|
|
112
|
+
export class MappedSetOwner extends PropertyOwnerNode {
|
|
113
|
+
setImplementationID;
|
|
114
|
+
}
|
|
115
|
+
export class MappedClassOwner extends PropertyOwnerNode {
|
|
116
|
+
mapping;
|
|
117
|
+
setImplementationID;
|
|
118
|
+
_class;
|
|
119
|
+
}
|
|
120
|
+
export class OwnerLink {
|
|
121
|
+
source; // reference by id
|
|
122
|
+
target; // reference by id
|
|
123
|
+
}
|
|
124
|
+
export class LineageProperty {
|
|
125
|
+
name;
|
|
126
|
+
dataType;
|
|
127
|
+
sourceInfo;
|
|
128
|
+
scope;
|
|
129
|
+
propertyType;
|
|
130
|
+
ownerID;
|
|
131
|
+
sourceProperties = [];
|
|
132
|
+
annotations = [];
|
|
133
|
+
}
|
|
134
|
+
export class LineageModelProperty extends LineageProperty {
|
|
135
|
+
propertyTree;
|
|
136
|
+
}
|
|
137
|
+
export class SourceInformation {
|
|
138
|
+
sourceId;
|
|
139
|
+
startLine;
|
|
140
|
+
startColumn;
|
|
141
|
+
endLine;
|
|
142
|
+
endColumn;
|
|
143
|
+
}
|
|
144
|
+
export class Annotation {
|
|
145
|
+
}
|
|
146
|
+
// Helper for __TYPE-based subtyping
|
|
147
|
+
function subtypeFactory(typeMap, fallbackType) {
|
|
148
|
+
return custom((value) => value, // serialization: just return as is
|
|
149
|
+
(value) => {
|
|
150
|
+
if (value &&
|
|
151
|
+
typeof value === 'object' &&
|
|
152
|
+
typeof value.__TYPE === 'string') {
|
|
153
|
+
const ctor = typeMap[value.__TYPE];
|
|
154
|
+
if (ctor) {
|
|
155
|
+
const instance = Object.create(ctor.prototype);
|
|
156
|
+
Object.assign(instance, value);
|
|
157
|
+
return instance;
|
|
158
|
+
}
|
|
159
|
+
const fallback = Object.create(PropertyOwnerNode.prototype);
|
|
160
|
+
Object.assign(fallback, value);
|
|
161
|
+
return fallback;
|
|
162
|
+
}
|
|
163
|
+
if (fallbackType) {
|
|
164
|
+
const instance = Object.create(fallbackType.prototype);
|
|
165
|
+
Object.assign(instance, value);
|
|
166
|
+
return instance;
|
|
167
|
+
}
|
|
168
|
+
return value;
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
// Subtype maps for deserialization
|
|
172
|
+
const propertyLineageNodeTypeMap = {
|
|
173
|
+
'meta::analytics::lineage::property::PropertyLineageNode': PropertyLineageNode,
|
|
174
|
+
'meta::analytics::lineage::property::StorePropertyLineageNode': StorePropertyLineageNode,
|
|
175
|
+
'meta::analytics::lineage::property::PropertyOwnerNode': PropertyOwnerNode,
|
|
176
|
+
'meta::analytics::lineage::property::RootQuery': RootQuery,
|
|
177
|
+
'meta::analytics::lineage::property::Query': LineageQuery,
|
|
178
|
+
'meta::analytics::lineage::property::RelationalPropertyOwner': RelationalPropertyOwner,
|
|
179
|
+
'meta::analytics::lineage::property::MappedSetOwner': MappedSetOwner,
|
|
180
|
+
'meta::analytics::lineage::property::MappedClassOwner': MappedClassOwner,
|
|
181
|
+
// Add other subtypes as needed
|
|
182
|
+
// Add other subtypes as needed
|
|
183
|
+
};
|
|
184
|
+
const lineagePropertyTypeMap = {
|
|
185
|
+
'meta::analytics::lineage::property::LineageProperty': LineageProperty,
|
|
186
|
+
'meta::analytics::lineage::property::LineageModelProperty': LineageModelProperty,
|
|
187
|
+
// Add other subtypes as needed
|
|
188
|
+
};
|
|
86
189
|
// Serialization schemas
|
|
87
190
|
createModelSchema(NodeData, {
|
|
88
191
|
id: primitive(),
|
|
@@ -150,5 +253,88 @@ createModelSchema(LineageModel, {
|
|
|
150
253
|
classLineage: object(Graph),
|
|
151
254
|
functionTrees: list(object(PropertyPathTree)),
|
|
152
255
|
reportLineage: object(ReportLineage),
|
|
256
|
+
propertyLineage: object(PropertyLineageReport),
|
|
257
|
+
});
|
|
258
|
+
createModelSchema(PropertyLineageReport, {
|
|
259
|
+
propertyOwner: list(subtypeFactory(propertyLineageNodeTypeMap, PropertyLineageNode)),
|
|
260
|
+
ownerLink: list(object(OwnerLink)),
|
|
261
|
+
});
|
|
262
|
+
createModelSchema(PropertyLineageNode, {
|
|
263
|
+
id: primitive(),
|
|
264
|
+
name: primitive(),
|
|
265
|
+
});
|
|
266
|
+
createModelSchema(StorePropertyLineageNode, {
|
|
267
|
+
id: primitive(),
|
|
268
|
+
name: primitive(),
|
|
269
|
+
});
|
|
270
|
+
createModelSchema(PropertyOwnerNode, {
|
|
271
|
+
id: primitive(),
|
|
272
|
+
name: primitive(),
|
|
273
|
+
properties: list(subtypeFactory(lineagePropertyTypeMap, LineageProperty)),
|
|
274
|
+
});
|
|
275
|
+
createModelSchema(RootQuery, {
|
|
276
|
+
id: primitive(),
|
|
277
|
+
name: primitive(),
|
|
278
|
+
properties: list(subtypeFactory(lineagePropertyTypeMap, LineageProperty)),
|
|
279
|
+
});
|
|
280
|
+
createModelSchema(LineageQuery, {
|
|
281
|
+
id: primitive(),
|
|
282
|
+
name: primitive(),
|
|
283
|
+
properties: list(subtypeFactory(lineagePropertyTypeMap, LineageProperty)),
|
|
284
|
+
});
|
|
285
|
+
createModelSchema(RelationalPropertyOwner, {
|
|
286
|
+
id: primitive(),
|
|
287
|
+
name: primitive(),
|
|
288
|
+
properties: list(subtypeFactory(lineagePropertyTypeMap, LineageProperty)),
|
|
289
|
+
namedRelation: primitive(),
|
|
290
|
+
relationType: primitive(),
|
|
291
|
+
relationName: primitive(),
|
|
292
|
+
schemaName: primitive(),
|
|
293
|
+
relationOwnerPath: primitive(),
|
|
294
|
+
});
|
|
295
|
+
createModelSchema(MappedSetOwner, {
|
|
296
|
+
id: primitive(),
|
|
297
|
+
name: primitive(),
|
|
298
|
+
properties: list(subtypeFactory(lineagePropertyTypeMap, LineageProperty)),
|
|
299
|
+
setImplementationID: primitive(),
|
|
300
|
+
});
|
|
301
|
+
createModelSchema(MappedClassOwner, {
|
|
302
|
+
id: primitive(),
|
|
303
|
+
name: primitive(),
|
|
304
|
+
properties: list(subtypeFactory(lineagePropertyTypeMap, LineageProperty)),
|
|
305
|
+
mapping: optional(primitive()),
|
|
306
|
+
setImplementationID: optional(primitive()),
|
|
307
|
+
_class: primitive(),
|
|
308
|
+
});
|
|
309
|
+
createModelSchema(OwnerLink, {
|
|
310
|
+
source: primitive(),
|
|
311
|
+
target: primitive(),
|
|
312
|
+
});
|
|
313
|
+
createModelSchema(LineageProperty, {
|
|
314
|
+
name: primitive(),
|
|
315
|
+
dataType: optional(primitive()),
|
|
316
|
+
sourceInfo: optional(object(SourceInformation)),
|
|
317
|
+
scope: optional(primitive()),
|
|
318
|
+
propertyType: primitive(), // as string
|
|
319
|
+
ownerID: primitive(),
|
|
320
|
+
sourceProperties: list(subtypeFactory(lineagePropertyTypeMap, LineageProperty)),
|
|
321
|
+
annotations: list(object(Annotation)),
|
|
322
|
+
});
|
|
323
|
+
createModelSchema(LineageModelProperty, {
|
|
324
|
+
name: primitive(),
|
|
325
|
+
dataType: optional(primitive()),
|
|
326
|
+
sourceInfo: optional(object(SourceInformation)),
|
|
327
|
+
scope: optional(primitive()),
|
|
328
|
+
propertyType: primitive(),
|
|
329
|
+
ownerID: primitive(),
|
|
330
|
+
sourceProperties: list(subtypeFactory(lineagePropertyTypeMap, LineageProperty)),
|
|
331
|
+
annotations: list(object(Annotation)),
|
|
332
|
+
propertyTree: object(PropertyPathTree),
|
|
333
|
+
});
|
|
334
|
+
createModelSchema(SourceInformation, {
|
|
335
|
+
// ...define as needed...
|
|
336
|
+
});
|
|
337
|
+
createModelSchema(Annotation, {
|
|
338
|
+
// ...define as needed...
|
|
153
339
|
});
|
|
154
340
|
//# sourceMappingURL=LineageModel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LineageModel.js","sourceRoot":"","sources":["../../../../../src/graph/metamodel/pure/lineage/LineageModel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"LineageModel.js","sourceRoot":"","sources":["../../../../../src/graph/metamodel/pure/lineage/LineageModel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,IAAI,EACJ,MAAM,EACN,MAAM,EACN,QAAQ,GACT,MAAM,WAAW,CAAC;AAInB,MAAM,OAAO,KAAK;IAChB,KAAK,GAAkB,EAAE,CAAC;IAC1B,KAAK,GAAkB,EAAE,CAAC;CAC3B;AAED,MAAM,OAAO,WAAW;IACtB,IAAI,CAAY;CACjB;AAED,MAAM,OAAO,QAAQ;IACnB,EAAE,CAAU;IACZ,IAAI,CAAU;IACd,IAAI,CAAU;IACd,WAAW,CAAU;CACtB;AAED,MAAM,OAAO,WAAW;IACtB,IAAI,CAAY;CACjB;AAED,MAAM,OAAO,QAAQ;IACnB,EAAE,CAAU;IACZ,IAAI,CAAU;IACd,IAAI,CAAU;IACd,MAAM,CAAe;IACrB,MAAM,CAAe;CACtB;AAED,MAAM,OAAO,gBAAgB;IAC3B,OAAO,CAAU;IACjB,KAAK,CAAU;IACf,QAAQ,GAAuB,EAAE,CAAC;IAClC,gBAAgB,CAAoB;CACrC;AAED,MAAM,OAAO,YAAY;IACvB,IAAI,CAAU;IACd,YAAY,CAAoB;IAChC,OAAO,GAAwB,EAAE,CAAC;IAClC,eAAe,GAAoB,EAAE,CAAC;CACvC;AAED,MAAM,OAAO,iBAAiB;IAC5B,MAAM,CAAiB;IACvB,OAAO,CAAU;CAClB;AAED,MAAM,OAAO,aAAa;IACxB,IAAI,CAAU;IACd,QAAQ,CAAmB;CAC5B;AACD,MAAM,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B;CAC1B,CAAC,CAAC"}
|
package/lib/package.json
CHANGED
package/package.json
CHANGED
|
@@ -14,7 +14,14 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
createModelSchema,
|
|
19
|
+
primitive,
|
|
20
|
+
list,
|
|
21
|
+
object,
|
|
22
|
+
custom,
|
|
23
|
+
optional,
|
|
24
|
+
} from 'serializr';
|
|
18
25
|
|
|
19
26
|
export type RawLineageModel = object;
|
|
20
27
|
|
|
@@ -98,8 +105,139 @@ export class LineageModel {
|
|
|
98
105
|
classLineage!: Graph;
|
|
99
106
|
functionTrees: PropertyPathTree[] = [];
|
|
100
107
|
reportLineage!: ReportLineage;
|
|
108
|
+
propertyLineage?: PropertyLineageReport;
|
|
101
109
|
}
|
|
102
110
|
|
|
111
|
+
// --- Property Lineage Model Classes ---
|
|
112
|
+
|
|
113
|
+
export class PropertyLineageReport {
|
|
114
|
+
propertyOwner: PropertyLineageNode[] = [];
|
|
115
|
+
ownerLink: OwnerLink[] = [];
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export class PropertyLineageNode {
|
|
119
|
+
id!: string;
|
|
120
|
+
name!: string;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export class StorePropertyLineageNode extends PropertyLineageNode {}
|
|
124
|
+
|
|
125
|
+
export class PropertyOwnerNode extends PropertyLineageNode {
|
|
126
|
+
properties: LineageProperty[] = [];
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export class RootQuery extends PropertyOwnerNode {}
|
|
130
|
+
|
|
131
|
+
export class LineageQuery extends PropertyOwnerNode {}
|
|
132
|
+
|
|
133
|
+
export class RelationalPropertyOwner extends PropertyOwnerNode {
|
|
134
|
+
namedRelation!: string; // NamedRelation[1] as string
|
|
135
|
+
relationType!: string;
|
|
136
|
+
relationName!: string;
|
|
137
|
+
schemaName!: string;
|
|
138
|
+
relationOwnerPath!: string;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export class MappedSetOwner extends PropertyOwnerNode {
|
|
142
|
+
setImplementationID!: string;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export class MappedClassOwner extends PropertyOwnerNode {
|
|
146
|
+
mapping?: string;
|
|
147
|
+
setImplementationID?: string;
|
|
148
|
+
_class!: string;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export class OwnerLink {
|
|
152
|
+
source!: string; // reference by id
|
|
153
|
+
target!: string; // reference by id
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export class LineageProperty {
|
|
157
|
+
name!: string;
|
|
158
|
+
dataType?: string;
|
|
159
|
+
sourceInfo?: SourceInformation;
|
|
160
|
+
scope?: string;
|
|
161
|
+
propertyType!: string;
|
|
162
|
+
ownerID!: string;
|
|
163
|
+
sourceProperties: LineageProperty[] = [];
|
|
164
|
+
annotations: Annotation[] = [];
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export class LineageModelProperty extends LineageProperty {
|
|
168
|
+
propertyTree!: PropertyPathTree;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export class SourceInformation {
|
|
172
|
+
sourceId!: string;
|
|
173
|
+
startLine!: number;
|
|
174
|
+
startColumn!: number;
|
|
175
|
+
endLine!: number;
|
|
176
|
+
endColumn!: number;
|
|
177
|
+
}
|
|
178
|
+
export class Annotation {}
|
|
179
|
+
|
|
180
|
+
// Helper for __TYPE-based subtyping
|
|
181
|
+
function subtypeFactory<T>(
|
|
182
|
+
typeMap: Record<string, new () => T>,
|
|
183
|
+
fallbackType?: new () => T,
|
|
184
|
+
) {
|
|
185
|
+
return custom(
|
|
186
|
+
(value) => value, // serialization: just return as is
|
|
187
|
+
(value): unknown => {
|
|
188
|
+
if (
|
|
189
|
+
value &&
|
|
190
|
+
typeof value === 'object' &&
|
|
191
|
+
typeof value.__TYPE === 'string'
|
|
192
|
+
) {
|
|
193
|
+
const ctor = typeMap[value.__TYPE];
|
|
194
|
+
if (ctor) {
|
|
195
|
+
const instance = Object.create(ctor.prototype as object) as object;
|
|
196
|
+
Object.assign(instance, value);
|
|
197
|
+
return instance;
|
|
198
|
+
}
|
|
199
|
+
const fallback = Object.create(
|
|
200
|
+
PropertyOwnerNode.prototype,
|
|
201
|
+
) as PropertyOwnerNode;
|
|
202
|
+
Object.assign(fallback, value);
|
|
203
|
+
return fallback;
|
|
204
|
+
}
|
|
205
|
+
if (fallbackType) {
|
|
206
|
+
const instance = Object.create(
|
|
207
|
+
fallbackType.prototype as object,
|
|
208
|
+
) as object;
|
|
209
|
+
Object.assign(instance, value);
|
|
210
|
+
return instance;
|
|
211
|
+
}
|
|
212
|
+
return value;
|
|
213
|
+
},
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// Subtype maps for deserialization
|
|
218
|
+
const propertyLineageNodeTypeMap = {
|
|
219
|
+
'meta::analytics::lineage::property::PropertyLineageNode':
|
|
220
|
+
PropertyLineageNode,
|
|
221
|
+
'meta::analytics::lineage::property::StorePropertyLineageNode':
|
|
222
|
+
StorePropertyLineageNode,
|
|
223
|
+
'meta::analytics::lineage::property::PropertyOwnerNode': PropertyOwnerNode,
|
|
224
|
+
'meta::analytics::lineage::property::RootQuery': RootQuery,
|
|
225
|
+
'meta::analytics::lineage::property::Query': LineageQuery,
|
|
226
|
+
'meta::analytics::lineage::property::RelationalPropertyOwner':
|
|
227
|
+
RelationalPropertyOwner,
|
|
228
|
+
'meta::analytics::lineage::property::MappedSetOwner': MappedSetOwner,
|
|
229
|
+
'meta::analytics::lineage::property::MappedClassOwner': MappedClassOwner,
|
|
230
|
+
// Add other subtypes as needed
|
|
231
|
+
// Add other subtypes as needed
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
const lineagePropertyTypeMap = {
|
|
235
|
+
'meta::analytics::lineage::property::LineageProperty': LineageProperty,
|
|
236
|
+
'meta::analytics::lineage::property::LineageModelProperty':
|
|
237
|
+
LineageModelProperty,
|
|
238
|
+
// Add other subtypes as needed
|
|
239
|
+
};
|
|
240
|
+
|
|
103
241
|
// Serialization schemas
|
|
104
242
|
createModelSchema(NodeData, {
|
|
105
243
|
id: primitive(),
|
|
@@ -183,4 +321,107 @@ createModelSchema(LineageModel, {
|
|
|
183
321
|
classLineage: object(Graph),
|
|
184
322
|
functionTrees: list(object(PropertyPathTree)),
|
|
185
323
|
reportLineage: object(ReportLineage),
|
|
324
|
+
propertyLineage: object(PropertyLineageReport),
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
createModelSchema(PropertyLineageReport, {
|
|
328
|
+
propertyOwner: list(
|
|
329
|
+
subtypeFactory(propertyLineageNodeTypeMap, PropertyLineageNode),
|
|
330
|
+
),
|
|
331
|
+
ownerLink: list(object(OwnerLink)),
|
|
332
|
+
});
|
|
333
|
+
|
|
334
|
+
createModelSchema(PropertyLineageNode, {
|
|
335
|
+
id: primitive(),
|
|
336
|
+
name: primitive(),
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
createModelSchema(StorePropertyLineageNode, {
|
|
340
|
+
id: primitive(),
|
|
341
|
+
name: primitive(),
|
|
342
|
+
});
|
|
343
|
+
|
|
344
|
+
createModelSchema(PropertyOwnerNode, {
|
|
345
|
+
id: primitive(),
|
|
346
|
+
name: primitive(),
|
|
347
|
+
properties: list(subtypeFactory(lineagePropertyTypeMap, LineageProperty)),
|
|
348
|
+
});
|
|
349
|
+
|
|
350
|
+
createModelSchema(RootQuery, {
|
|
351
|
+
id: primitive(),
|
|
352
|
+
name: primitive(),
|
|
353
|
+
properties: list(subtypeFactory(lineagePropertyTypeMap, LineageProperty)),
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
createModelSchema(LineageQuery, {
|
|
357
|
+
id: primitive(),
|
|
358
|
+
name: primitive(),
|
|
359
|
+
properties: list(subtypeFactory(lineagePropertyTypeMap, LineageProperty)),
|
|
360
|
+
});
|
|
361
|
+
|
|
362
|
+
createModelSchema(RelationalPropertyOwner, {
|
|
363
|
+
id: primitive(),
|
|
364
|
+
name: primitive(),
|
|
365
|
+
properties: list(subtypeFactory(lineagePropertyTypeMap, LineageProperty)),
|
|
366
|
+
namedRelation: primitive(),
|
|
367
|
+
relationType: primitive(),
|
|
368
|
+
relationName: primitive(),
|
|
369
|
+
schemaName: primitive(),
|
|
370
|
+
relationOwnerPath: primitive(),
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
createModelSchema(MappedSetOwner, {
|
|
374
|
+
id: primitive(),
|
|
375
|
+
name: primitive(),
|
|
376
|
+
properties: list(subtypeFactory(lineagePropertyTypeMap, LineageProperty)),
|
|
377
|
+
setImplementationID: primitive(),
|
|
378
|
+
});
|
|
379
|
+
|
|
380
|
+
createModelSchema(MappedClassOwner, {
|
|
381
|
+
id: primitive(),
|
|
382
|
+
name: primitive(),
|
|
383
|
+
properties: list(subtypeFactory(lineagePropertyTypeMap, LineageProperty)),
|
|
384
|
+
mapping: optional(primitive()),
|
|
385
|
+
setImplementationID: optional(primitive()),
|
|
386
|
+
_class: primitive(),
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
createModelSchema(OwnerLink, {
|
|
390
|
+
source: primitive(),
|
|
391
|
+
target: primitive(),
|
|
392
|
+
});
|
|
393
|
+
|
|
394
|
+
createModelSchema(LineageProperty, {
|
|
395
|
+
name: primitive(),
|
|
396
|
+
dataType: optional(primitive()),
|
|
397
|
+
sourceInfo: optional(object(SourceInformation)),
|
|
398
|
+
scope: optional(primitive()),
|
|
399
|
+
propertyType: primitive(), // as string
|
|
400
|
+
ownerID: primitive(),
|
|
401
|
+
sourceProperties: list(
|
|
402
|
+
subtypeFactory(lineagePropertyTypeMap, LineageProperty),
|
|
403
|
+
),
|
|
404
|
+
annotations: list(object(Annotation)),
|
|
405
|
+
});
|
|
406
|
+
|
|
407
|
+
createModelSchema(LineageModelProperty, {
|
|
408
|
+
name: primitive(),
|
|
409
|
+
dataType: optional(primitive()),
|
|
410
|
+
sourceInfo: optional(object(SourceInformation)),
|
|
411
|
+
scope: optional(primitive()),
|
|
412
|
+
propertyType: primitive(),
|
|
413
|
+
ownerID: primitive(),
|
|
414
|
+
sourceProperties: list(
|
|
415
|
+
subtypeFactory(lineagePropertyTypeMap, LineageProperty),
|
|
416
|
+
),
|
|
417
|
+
annotations: list(object(Annotation)),
|
|
418
|
+
propertyTree: object(PropertyPathTree),
|
|
419
|
+
});
|
|
420
|
+
|
|
421
|
+
createModelSchema(SourceInformation, {
|
|
422
|
+
// ...define as needed...
|
|
423
|
+
});
|
|
424
|
+
|
|
425
|
+
createModelSchema(Annotation, {
|
|
426
|
+
// ...define as needed...
|
|
186
427
|
});
|