@finos/legend-graph 32.3.6 → 32.3.8
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/Core_HashUtils.d.ts +2 -1
- package/lib/graph/Core_HashUtils.d.ts.map +1 -1
- package/lib/graph/Core_HashUtils.js +1 -0
- package/lib/graph/Core_HashUtils.js.map +1 -1
- package/lib/graph/DependencyManager.js +1 -1
- package/lib/graph/DependencyManager.js.map +1 -1
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.d.ts +11 -2
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.d.ts.map +1 -1
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.js +25 -5
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.js.map +1 -1
- package/lib/graph-manager/action/changeDetection/DataProductObserveHelper.d.ts +2 -1
- package/lib/graph-manager/action/changeDetection/DataProductObserveHelper.d.ts.map +1 -1
- package/lib/graph-manager/action/changeDetection/DataProductObserveHelper.js +12 -0
- package/lib/graph-manager/action/changeDetection/DataProductObserveHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineServerClient.d.ts +3 -1
- package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineServerClient.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineServerClient.js +3 -1
- package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineServerClient.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/lakehouse/deploy/V1_DataProductArtifact.d.ts +55 -26
- package/lib/graph-manager/protocol/pure/v1/lakehouse/deploy/V1_DataProductArtifact.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/lakehouse/deploy/V1_DataProductArtifact.js +105 -30
- package/lib/graph-manager/protocol/pure/v1/lakehouse/deploy/V1_DataProductArtifact.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/lakehouse/helpers/V1_CoreLakehouseHelper.d.ts +20 -0
- package/lib/graph-manager/protocol/pure/v1/lakehouse/helpers/V1_CoreLakehouseHelper.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/lakehouse/helpers/V1_CoreLakehouseHelper.js +33 -0
- package/lib/graph-manager/protocol/pure/v1/lakehouse/helpers/V1_CoreLakehouseHelper.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.d.ts +8 -0
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.js +15 -0
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.js +8 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.js +4 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.d.ts +3 -2
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.js +22 -5
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DatabaseBuilderHelper.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DatabaseBuilderHelper.js +5 -4
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DatabaseBuilderHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.d.ts +4 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.js +26 -3
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.js.map +1 -1
- package/lib/index.d.ts +4 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -1
- package/package.json +1 -1
- package/src/graph/Core_HashUtils.ts +1 -0
- package/src/graph/DependencyManager.ts +1 -1
- package/src/graph/metamodel/pure/dataProduct/DataProduct.ts +27 -4
- package/src/graph-manager/action/changeDetection/DataProductObserveHelper.ts +16 -0
- package/src/graph-manager/protocol/pure/v1/engine/V1_EngineServerClient.ts +6 -1
- package/src/graph-manager/protocol/pure/v1/lakehouse/deploy/V1_DataProductArtifact.ts +154 -53
- package/src/graph-manager/protocol/pure/v1/lakehouse/helpers/V1_CoreLakehouseHelper.ts +40 -0
- package/src/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.ts +17 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.ts +9 -1
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.ts +6 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.ts +33 -3
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DatabaseBuilderHelper.ts +7 -1
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.ts +31 -0
- package/src/index.ts +13 -10
- package/tsconfig.json +1 -1
- package/lib/graph-manager/action/generation/dataProduct/DataProductArtifactGeneration.d.ts +0 -28
- package/lib/graph-manager/action/generation/dataProduct/DataProductArtifactGeneration.d.ts.map +0 -1
- package/lib/graph-manager/action/generation/dataProduct/DataProductArtifactGeneration.js +0 -38
- package/lib/graph-manager/action/generation/dataProduct/DataProductArtifactGeneration.js.map +0 -1
- package/src/graph-manager/action/generation/dataProduct/DataProductArtifactGeneration.ts +0 -53
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
type DataProductRuntimeInfo,
|
|
32
32
|
LakehouseAccessPoint,
|
|
33
33
|
UnknownDataProductIcon,
|
|
34
|
+
type Expertise,
|
|
34
35
|
} from '../../../graph/metamodel/pure/dataProduct/DataProduct.js';
|
|
35
36
|
import {
|
|
36
37
|
observe_Abstract_PackageableElement,
|
|
@@ -47,6 +48,7 @@ export const observe_AccessPoint = skipObserved(
|
|
|
47
48
|
if (metamodel instanceof LakehouseAccessPoint) {
|
|
48
49
|
makeObservable(metamodel, {
|
|
49
50
|
id: observable,
|
|
51
|
+
title: observable,
|
|
50
52
|
targetEnvironment: observable,
|
|
51
53
|
classification: observable,
|
|
52
54
|
func: observable.ref,
|
|
@@ -139,6 +141,7 @@ export const observe_AccessPointGroup = skipObserved(
|
|
|
139
141
|
makeObservable(metamodel, {
|
|
140
142
|
id: observable,
|
|
141
143
|
description: observable,
|
|
144
|
+
title: observable,
|
|
142
145
|
accessPoints: observable,
|
|
143
146
|
stereotypes: observable,
|
|
144
147
|
taggedValues: observable,
|
|
@@ -200,6 +203,16 @@ export const observe_DataProductIcon = skipObserved(
|
|
|
200
203
|
},
|
|
201
204
|
);
|
|
202
205
|
|
|
206
|
+
export const observe_Expertise = skipObserved(
|
|
207
|
+
(metamodel: Expertise): Expertise => {
|
|
208
|
+
makeObservable(metamodel, {
|
|
209
|
+
description: observable,
|
|
210
|
+
expertIds: observable,
|
|
211
|
+
});
|
|
212
|
+
return metamodel;
|
|
213
|
+
},
|
|
214
|
+
);
|
|
215
|
+
|
|
203
216
|
export const observe_DataProduct = skipObserved(
|
|
204
217
|
(metamodel: DataProduct): DataProduct => {
|
|
205
218
|
observe_Abstract_PackageableElement(metamodel);
|
|
@@ -211,6 +224,8 @@ export const observe_DataProduct = skipObserved(
|
|
|
211
224
|
description: observable,
|
|
212
225
|
supportInfo: observable,
|
|
213
226
|
icon: observable,
|
|
227
|
+
type: observable,
|
|
228
|
+
expertise: observable,
|
|
214
229
|
});
|
|
215
230
|
|
|
216
231
|
if (metamodel.supportInfo) {
|
|
@@ -219,6 +234,7 @@ export const observe_DataProduct = skipObserved(
|
|
|
219
234
|
if (metamodel.icon) {
|
|
220
235
|
observe_DataProductIcon(metamodel.icon);
|
|
221
236
|
}
|
|
237
|
+
metamodel.expertise?.forEach(observe_Expertise);
|
|
222
238
|
metamodel.accessPointGroups.forEach(observe_APG);
|
|
223
239
|
return metamodel;
|
|
224
240
|
},
|
|
@@ -703,12 +703,17 @@ export class V1_EngineServerClient extends AbstractServerClient {
|
|
|
703
703
|
|
|
704
704
|
lambdaRelationType = (
|
|
705
705
|
input: PlainObject<V1_LambdaReturnTypeInput>,
|
|
706
|
+
options?: {
|
|
707
|
+
abortController?: AbortController | undefined;
|
|
708
|
+
},
|
|
706
709
|
): Promise<PlainObject<V1_RelationType>> =>
|
|
707
710
|
this.postWithTracing(
|
|
708
711
|
this.getTraceData(CORE_ENGINE_ACTIVITY_TRACE.GET_LAMBDA_RETURN_TYPE),
|
|
709
712
|
`${this._pure()}/compilation/lambdaRelationType`,
|
|
710
713
|
input,
|
|
711
|
-
{
|
|
714
|
+
{
|
|
715
|
+
signal: options?.abortController?.signal ?? null,
|
|
716
|
+
},
|
|
712
717
|
undefined,
|
|
713
718
|
undefined,
|
|
714
719
|
{ enableCompression: true },
|
|
@@ -14,113 +14,214 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {
|
|
18
|
-
|
|
17
|
+
import {
|
|
18
|
+
SerializationFactory,
|
|
19
|
+
UnsupportedOperationError,
|
|
20
|
+
usingConstantValueSchema,
|
|
21
|
+
usingModelSchema,
|
|
22
|
+
type PlainObject,
|
|
23
|
+
} from '@finos/legend-shared';
|
|
24
|
+
import {
|
|
25
|
+
createModelSchema,
|
|
26
|
+
custom,
|
|
27
|
+
list,
|
|
28
|
+
optional,
|
|
29
|
+
primitive,
|
|
30
|
+
serialize,
|
|
31
|
+
} from 'serializr';
|
|
32
|
+
import type { V1_GenericType } from '../../model/packageableElements/type/V1_GenericType.js';
|
|
33
|
+
import {
|
|
34
|
+
V1_deserializeGenericType,
|
|
35
|
+
V1_genericTypeModelSchema,
|
|
36
|
+
} from '../../transformation/pureProtocol/serializationHelpers/V1_TypeSerializationHelper.js';
|
|
19
37
|
|
|
20
|
-
export
|
|
38
|
+
export enum V1_DataProductTypeEnum {
|
|
39
|
+
INTERNAL = 'internalDataProductType',
|
|
40
|
+
EXTERNAL = 'externalDataProductType',
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export enum V1_ResourceBuilderType {
|
|
44
|
+
DATABASE_DDL = 'databaseDDL',
|
|
45
|
+
FUNCTION_ACCESS_POINT = 'functionAccessPoint',
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export enum V1_DatabaseDDLImplementationType {
|
|
49
|
+
VIEW = 'VIEW',
|
|
50
|
+
TABLE = 'TABLE',
|
|
51
|
+
PROCEDURE = 'PROCEDURE',
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export abstract class V1_DataProductType {}
|
|
55
|
+
|
|
56
|
+
export class V1_ExternalDataProductType extends V1_DataProductType {
|
|
57
|
+
link: string | undefined;
|
|
58
|
+
|
|
59
|
+
static readonly serialization = new SerializationFactory(
|
|
60
|
+
createModelSchema(V1_ExternalDataProductType, {
|
|
61
|
+
_type: usingConstantValueSchema(V1_DataProductTypeEnum.EXTERNAL),
|
|
62
|
+
link: optional(primitive()),
|
|
63
|
+
}),
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export class V1_InternalDataProductType extends V1_DataProductType {
|
|
68
|
+
static readonly serialization = new SerializationFactory(
|
|
69
|
+
createModelSchema(V1_InternalDataProductType, {
|
|
70
|
+
_type: usingConstantValueSchema(V1_DataProductTypeEnum.INTERNAL),
|
|
71
|
+
}),
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export const V1_serializeDataProductType = (
|
|
76
|
+
DataProductType: V1_DataProductType,
|
|
77
|
+
): PlainObject<V1_DataProductType> => {
|
|
78
|
+
if (DataProductType instanceof V1_ExternalDataProductType) {
|
|
79
|
+
return V1_ExternalDataProductType.serialization.toJson(DataProductType);
|
|
80
|
+
} else if (DataProductType instanceof V1_InternalDataProductType) {
|
|
81
|
+
return V1_InternalDataProductType.serialization.toJson(DataProductType);
|
|
82
|
+
}
|
|
83
|
+
throw new UnsupportedOperationError();
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export const V1_deserializeDataProductType = (
|
|
87
|
+
json: PlainObject<V1_DataProductType>,
|
|
88
|
+
): V1_DataProductType => {
|
|
89
|
+
switch (json._type) {
|
|
90
|
+
case V1_DataProductTypeEnum.EXTERNAL:
|
|
91
|
+
return V1_ExternalDataProductType.serialization.fromJson(json);
|
|
92
|
+
case V1_DataProductTypeEnum.INTERNAL:
|
|
93
|
+
return V1_InternalDataProductType.serialization.fromJson(json);
|
|
94
|
+
default:
|
|
95
|
+
throw new Error(`Unknown V1_DataProductType type: ${json._type}`);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export class V1_DataProductInfo {
|
|
21
100
|
path!: string;
|
|
22
|
-
deploymentId
|
|
101
|
+
deploymentId: string | undefined;
|
|
23
102
|
description: string | undefined;
|
|
24
103
|
title: string | undefined;
|
|
104
|
+
dataProductType: V1_DataProductType | undefined;
|
|
25
105
|
|
|
26
106
|
static readonly serialization = new SerializationFactory(
|
|
27
|
-
createModelSchema(
|
|
107
|
+
createModelSchema(V1_DataProductInfo, {
|
|
28
108
|
path: primitive(),
|
|
29
109
|
deploymentId: primitive(),
|
|
30
110
|
description: optional(primitive()),
|
|
31
111
|
title: optional(primitive()),
|
|
112
|
+
dataProductType: custom(
|
|
113
|
+
(val) => (val ? V1_serializeDataProductType(val) : undefined),
|
|
114
|
+
(val) => (val ? V1_deserializeDataProductType(val) : undefined),
|
|
115
|
+
),
|
|
32
116
|
}),
|
|
33
117
|
);
|
|
34
118
|
}
|
|
35
119
|
|
|
36
|
-
export class
|
|
120
|
+
export abstract class V1_ResourceBuilder {}
|
|
121
|
+
|
|
122
|
+
export class V1_DatabaseDDL extends V1_ResourceBuilder {
|
|
37
123
|
reproducible!: boolean;
|
|
38
124
|
targetEnvironment!: string;
|
|
39
125
|
script!: string;
|
|
126
|
+
classification: string | undefined;
|
|
127
|
+
resourceType!: V1_DatabaseDDLImplementationType;
|
|
40
128
|
|
|
41
129
|
static readonly serialization = new SerializationFactory(
|
|
42
|
-
createModelSchema(
|
|
130
|
+
createModelSchema(V1_DatabaseDDL, {
|
|
131
|
+
_type: usingConstantValueSchema(V1_ResourceBuilderType.DATABASE_DDL),
|
|
43
132
|
reproducible: primitive(),
|
|
44
133
|
targetEnvironment: primitive(),
|
|
45
134
|
script: primitive(),
|
|
135
|
+
classification: optional(primitive()),
|
|
136
|
+
resourceType: primitive(),
|
|
46
137
|
}),
|
|
47
138
|
);
|
|
48
139
|
}
|
|
49
140
|
|
|
50
|
-
export class
|
|
51
|
-
|
|
52
|
-
resourceBuilder!: V1_DataProductArtifactResourceBuilder;
|
|
141
|
+
export class V1_FunctionAccessPoint extends V1_ResourceBuilder {
|
|
142
|
+
functionGrammar!: string;
|
|
53
143
|
|
|
54
144
|
static readonly serialization = new SerializationFactory(
|
|
55
|
-
createModelSchema(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
V1_DataProductArtifactResourceBuilder.serialization.schema,
|
|
145
|
+
createModelSchema(V1_FunctionAccessPoint, {
|
|
146
|
+
_type: usingConstantValueSchema(
|
|
147
|
+
V1_ResourceBuilderType.FUNCTION_ACCESS_POINT,
|
|
59
148
|
),
|
|
149
|
+
functionGrammar: primitive(),
|
|
60
150
|
}),
|
|
61
151
|
);
|
|
62
152
|
}
|
|
63
153
|
|
|
64
|
-
export
|
|
154
|
+
export const V1_serializeResourceBuilder = (
|
|
155
|
+
resourceBuilder: V1_ResourceBuilder,
|
|
156
|
+
): PlainObject<V1_ResourceBuilder> => {
|
|
157
|
+
if (resourceBuilder instanceof V1_DatabaseDDL) {
|
|
158
|
+
return V1_DatabaseDDL.serialization.toJson(resourceBuilder);
|
|
159
|
+
} else if (resourceBuilder instanceof V1_FunctionAccessPoint) {
|
|
160
|
+
return V1_FunctionAccessPoint.serialization.toJson(resourceBuilder);
|
|
161
|
+
}
|
|
162
|
+
throw new UnsupportedOperationError();
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
export const V1_deserializeResourceBuilder = (
|
|
166
|
+
json: PlainObject<V1_ResourceBuilder>,
|
|
167
|
+
): V1_ResourceBuilder => {
|
|
168
|
+
switch (json._type) {
|
|
169
|
+
case V1_ResourceBuilderType.DATABASE_DDL:
|
|
170
|
+
return V1_DatabaseDDL.serialization.fromJson(json);
|
|
171
|
+
case V1_ResourceBuilderType.FUNCTION_ACCESS_POINT:
|
|
172
|
+
return V1_FunctionAccessPoint.serialization.fromJson(json);
|
|
173
|
+
default:
|
|
174
|
+
throw new Error(`Unknown V1_ResourceBuilder type: ${json._type}`);
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
export class V1_AccessPointImplementation {
|
|
65
179
|
id!: string;
|
|
66
180
|
description: string | undefined;
|
|
67
|
-
|
|
68
|
-
|
|
181
|
+
resourceBuilder!: V1_ResourceBuilder;
|
|
182
|
+
lambdaGenericType: V1_GenericType | undefined;
|
|
69
183
|
|
|
70
184
|
static readonly serialization = new SerializationFactory(
|
|
71
|
-
createModelSchema(
|
|
185
|
+
createModelSchema(V1_AccessPointImplementation, {
|
|
72
186
|
id: primitive(),
|
|
73
187
|
description: optional(primitive()),
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
),
|
|
78
|
-
),
|
|
79
|
-
}),
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export class V1_DataProductArtifactGeneration {
|
|
84
|
-
dataProduct!: V1_DataProductArtifactDataProduct;
|
|
85
|
-
accessPointGroups: V1_DataProductArtifactAccessPointGroup[] = [];
|
|
86
|
-
|
|
87
|
-
static readonly serialization = new SerializationFactory(
|
|
88
|
-
createModelSchema(V1_DataProductArtifactGeneration, {
|
|
89
|
-
dataProduct: usingModelSchema(
|
|
90
|
-
V1_DataProductArtifactDataProduct.serialization.schema,
|
|
188
|
+
resourceBuilder: custom(
|
|
189
|
+
V1_serializeResourceBuilder,
|
|
190
|
+
V1_deserializeResourceBuilder,
|
|
91
191
|
),
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
),
|
|
192
|
+
lambdaGenericType: custom(
|
|
193
|
+
(val) => serialize(V1_genericTypeModelSchema, val),
|
|
194
|
+
(val) => V1_deserializeGenericType(val),
|
|
96
195
|
),
|
|
97
196
|
}),
|
|
98
197
|
);
|
|
99
198
|
}
|
|
100
199
|
|
|
101
|
-
export class
|
|
102
|
-
|
|
103
|
-
|
|
200
|
+
export class V1_AccessPointGroupInfo {
|
|
201
|
+
id!: string;
|
|
202
|
+
description: string | undefined;
|
|
203
|
+
accessPointImplementations: V1_AccessPointImplementation[] = [];
|
|
104
204
|
|
|
105
205
|
static readonly serialization = new SerializationFactory(
|
|
106
|
-
createModelSchema(
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
206
|
+
createModelSchema(V1_AccessPointGroupInfo, {
|
|
207
|
+
id: primitive(),
|
|
208
|
+
description: optional(primitive()),
|
|
209
|
+
accessPointImplementations: list(
|
|
210
|
+
usingModelSchema(V1_AccessPointImplementation.serialization.schema),
|
|
110
211
|
),
|
|
111
212
|
}),
|
|
112
213
|
);
|
|
113
214
|
}
|
|
114
215
|
|
|
115
|
-
export class
|
|
116
|
-
|
|
216
|
+
export class V1_DataProductArtifact {
|
|
217
|
+
dataProduct!: V1_DataProductInfo;
|
|
218
|
+
accessPointGroups: V1_AccessPointGroupInfo[] = [];
|
|
117
219
|
|
|
118
220
|
static readonly serialization = new SerializationFactory(
|
|
119
|
-
createModelSchema(
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
),
|
|
221
|
+
createModelSchema(V1_DataProductArtifact, {
|
|
222
|
+
dataProduct: usingModelSchema(V1_DataProductInfo.serialization.schema),
|
|
223
|
+
accessPointGroups: list(
|
|
224
|
+
usingModelSchema(V1_AccessPointGroupInfo.serialization.schema),
|
|
124
225
|
),
|
|
125
226
|
}),
|
|
126
227
|
);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { V1_IngestEnvironmentClassification } from '../ingest/V1_LakehouseIngestEnvironment.js';
|
|
18
|
+
import { V1_EntitlementsLakehouseEnvironmentType } from '../entitlements/V1_EntitlementsDataProduct.js';
|
|
19
|
+
|
|
20
|
+
export const V1_getEntitlementsEnvFromIngestEnv = (
|
|
21
|
+
ingestEnv: V1_IngestEnvironmentClassification,
|
|
22
|
+
): V1_EntitlementsLakehouseEnvironmentType => {
|
|
23
|
+
switch (ingestEnv) {
|
|
24
|
+
case V1_IngestEnvironmentClassification.DEV:
|
|
25
|
+
return V1_EntitlementsLakehouseEnvironmentType.DEVELOPMENT;
|
|
26
|
+
case V1_IngestEnvironmentClassification.PROD_PARALLEL:
|
|
27
|
+
return V1_EntitlementsLakehouseEnvironmentType.PRODUCTION_PARALLEL;
|
|
28
|
+
case V1_IngestEnvironmentClassification.PROD:
|
|
29
|
+
return V1_EntitlementsLakehouseEnvironmentType.PRODUCTION;
|
|
30
|
+
default:
|
|
31
|
+
return V1_EntitlementsLakehouseEnvironmentType.PRODUCTION;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const V1_isIngestEnvsCompatibleWithEntitlements = (
|
|
36
|
+
ingestEnv: V1_IngestEnvironmentClassification,
|
|
37
|
+
entitlementEnv: V1_EntitlementsLakehouseEnvironmentType,
|
|
38
|
+
): boolean => {
|
|
39
|
+
return V1_getEntitlementsEnvFromIngestEnv(ingestEnv) === entitlementEnv;
|
|
40
|
+
};
|
package/src/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.ts
CHANGED
|
@@ -41,6 +41,7 @@ export enum V1_DataProductTypeValue {
|
|
|
41
41
|
|
|
42
42
|
export abstract class V1_AccessPoint implements Hashable {
|
|
43
43
|
id!: string;
|
|
44
|
+
title: string | undefined;
|
|
44
45
|
description: string | undefined;
|
|
45
46
|
|
|
46
47
|
get hashCode(): string {
|
|
@@ -98,6 +99,7 @@ export class V1_FunctionAccessPoint extends V1_AccessPoint implements Hashable {
|
|
|
98
99
|
|
|
99
100
|
export class V1_AccessPointGroup implements Hashable {
|
|
100
101
|
id!: string;
|
|
102
|
+
title: string | undefined;
|
|
101
103
|
description: string | undefined;
|
|
102
104
|
stereotypes: V1_StereotypePtr[] = [];
|
|
103
105
|
accessPoints: V1_AccessPoint[] = [];
|
|
@@ -302,6 +304,19 @@ export class V1_ExternalDataProductType extends V1_DataProductType {
|
|
|
302
304
|
}
|
|
303
305
|
}
|
|
304
306
|
|
|
307
|
+
export class V1_Expertise implements Hashable {
|
|
308
|
+
description: string | undefined;
|
|
309
|
+
expertIds: string[] | undefined;
|
|
310
|
+
|
|
311
|
+
get hashCode(): string {
|
|
312
|
+
return hashArray([
|
|
313
|
+
CORE_HASH_STRUCTURE.DATA_PRODUCT_EXPERTISE,
|
|
314
|
+
this.description ?? '',
|
|
315
|
+
hashArray(this.expertIds ?? []),
|
|
316
|
+
]);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
305
320
|
export class V1_DataProduct extends V1_PackageableElement implements Hashable {
|
|
306
321
|
title: string | undefined;
|
|
307
322
|
description: string | undefined;
|
|
@@ -313,6 +328,7 @@ export class V1_DataProduct extends V1_PackageableElement implements Hashable {
|
|
|
313
328
|
type: V1_DataProductType | undefined;
|
|
314
329
|
stereotypes: V1_StereotypePtr[] = [];
|
|
315
330
|
taggedValues: V1_TaggedValue[] = [];
|
|
331
|
+
expertise: V1_Expertise[] | undefined;
|
|
316
332
|
|
|
317
333
|
override get hashCode(): string {
|
|
318
334
|
return hashArray([
|
|
@@ -327,6 +343,7 @@ export class V1_DataProduct extends V1_PackageableElement implements Hashable {
|
|
|
327
343
|
this.type ?? '',
|
|
328
344
|
hashArray(this.stereotypes),
|
|
329
345
|
hashArray(this.taggedValues),
|
|
346
|
+
hashArray(this.expertise ?? []),
|
|
330
347
|
]);
|
|
331
348
|
}
|
|
332
349
|
|
|
@@ -50,6 +50,7 @@ import {
|
|
|
50
50
|
V1_InternalDataProductType,
|
|
51
51
|
V1_ExternalDataProductType,
|
|
52
52
|
V1_FunctionAccessPoint,
|
|
53
|
+
type V1_Expertise,
|
|
53
54
|
} from '../../../model/packageableElements/dataProduct/V1_DataProduct.js';
|
|
54
55
|
import { V1_initPackageableElement } from './V1_CoreTransformerHelper.js';
|
|
55
56
|
import { V1_transformRawLambda } from './V1_RawValueSpecificationTransformer.js';
|
|
@@ -72,17 +73,21 @@ const transformAccessPoint = (
|
|
|
72
73
|
lake.classification = ap.classification;
|
|
73
74
|
lake.reproducible = ap.reproducible;
|
|
74
75
|
lake.description = ap.description;
|
|
76
|
+
lake.title = ap.title;
|
|
75
77
|
return lake;
|
|
76
78
|
} else if (ap instanceof FunctionAccessPoint) {
|
|
77
79
|
const func = new V1_FunctionAccessPoint();
|
|
78
80
|
func.id = ap.id;
|
|
79
81
|
func.description = ap.description;
|
|
80
|
-
func.
|
|
82
|
+
func.title = func.title;
|
|
83
|
+
func.query = V1_transformRawLambda(ap.query, context);
|
|
81
84
|
return func;
|
|
82
85
|
} else if (ap instanceof UnknownAccessPoint) {
|
|
83
86
|
const un = new V1_UnknownAccessPoint();
|
|
84
87
|
un.content = ap.content;
|
|
85
88
|
un.id = ap.id;
|
|
89
|
+
un.description = ap.title;
|
|
90
|
+
un.title = ap.title;
|
|
86
91
|
return un;
|
|
87
92
|
}
|
|
88
93
|
throw new UnsupportedOperationError(
|
|
@@ -126,6 +131,7 @@ export const V1_transformDataProduct = (
|
|
|
126
131
|
product.coverageRegions = element.coverageRegions as
|
|
127
132
|
| V1_DataProductRegion[]
|
|
128
133
|
| undefined;
|
|
134
|
+
product.expertise = element.expertise as V1_Expertise[] | undefined;
|
|
129
135
|
if (element.type instanceof InternalDataProductType) {
|
|
130
136
|
product.type = new V1_InternalDataProductType();
|
|
131
137
|
} else if (element.type instanceof ExternalDataProductType) {
|
|
@@ -162,6 +168,7 @@ export const V1_transformDataProduct = (
|
|
|
162
168
|
if (metamodelGroup instanceof ModelAccessPointGroup) {
|
|
163
169
|
const modelGroup = new V1_ModelAccessPointGroup();
|
|
164
170
|
modelGroup.id = metamodelGroup.id;
|
|
171
|
+
modelGroup.title = metamodelGroup.title;
|
|
165
172
|
modelGroup.description = metamodelGroup.description;
|
|
166
173
|
modelGroup.stereotypes = metamodelGroup.stereotypes.map(
|
|
167
174
|
V1_transformStereotype,
|
|
@@ -214,6 +221,7 @@ export const V1_transformDataProduct = (
|
|
|
214
221
|
}
|
|
215
222
|
const group = new V1_AccessPointGroup();
|
|
216
223
|
group.id = metamodelGroup.id;
|
|
224
|
+
group.title = metamodelGroup.title;
|
|
217
225
|
group.description = metamodelGroup.description;
|
|
218
226
|
group.stereotypes = metamodelGroup.stereotypes.map(
|
|
219
227
|
V1_transformStereotype,
|
|
@@ -141,6 +141,7 @@ import {
|
|
|
141
141
|
} from '../../../../../../../graph/metamodel/pure/dataProduct/DataProduct.js';
|
|
142
142
|
import {
|
|
143
143
|
V1_buildAccessPointGroup,
|
|
144
|
+
V1_buildDataProductExpertise,
|
|
144
145
|
V1_buildDataProductIcon,
|
|
145
146
|
V1_buildDataProductLink,
|
|
146
147
|
} from './helpers/V1_DataProductBuilder.js';
|
|
@@ -779,6 +780,11 @@ export class V1_ElementSecondPassBuilder
|
|
|
779
780
|
dataProductType.link = element.type.link;
|
|
780
781
|
dataProduct.type = dataProductType;
|
|
781
782
|
}
|
|
783
|
+
if (element.expertise) {
|
|
784
|
+
dataProduct.expertise = element.expertise.map((expertise) =>
|
|
785
|
+
V1_buildDataProductExpertise(expertise),
|
|
786
|
+
);
|
|
787
|
+
}
|
|
782
788
|
dataProduct.deliveryFrequency = element.deliveryFrequency as
|
|
783
789
|
| DataProduct_DeliveryFrequency
|
|
784
790
|
| undefined;
|
|
@@ -29,6 +29,8 @@ import {
|
|
|
29
29
|
DataProductLibraryIcon,
|
|
30
30
|
DataProductLink,
|
|
31
31
|
DataProductRuntimeInfo,
|
|
32
|
+
Expertise,
|
|
33
|
+
FunctionAccessPoint,
|
|
32
34
|
LakehouseAccessPoint,
|
|
33
35
|
ModelAccessPointGroup,
|
|
34
36
|
UnknownAccessPoint,
|
|
@@ -41,6 +43,8 @@ import {
|
|
|
41
43
|
type V1_DataProductLink,
|
|
42
44
|
V1_DataProductEmbeddedImageIcon,
|
|
43
45
|
V1_DataProductLibraryIcon,
|
|
46
|
+
type V1_Expertise,
|
|
47
|
+
V1_FunctionAccessPoint,
|
|
44
48
|
V1_LakehouseAccessPoint,
|
|
45
49
|
V1_ModelAccessPointGroup,
|
|
46
50
|
V1_UnknownAccessPoint,
|
|
@@ -80,11 +84,26 @@ export const V1_buildAccessPoint = (
|
|
|
80
84
|
lakeAccessPoint.reproducible = ap.reproducible;
|
|
81
85
|
lakeAccessPoint.classification = ap.classification;
|
|
82
86
|
lakeAccessPoint.description = ap.description;
|
|
87
|
+
lakeAccessPoint.title = ap.title;
|
|
83
88
|
return lakeAccessPoint;
|
|
89
|
+
} else if (ap instanceof V1_FunctionAccessPoint) {
|
|
90
|
+
const functionAccessPoint = new FunctionAccessPoint(
|
|
91
|
+
ap.id,
|
|
92
|
+
V1_buildRawLambdaWithResolvedPaths(
|
|
93
|
+
ap.query.parameters,
|
|
94
|
+
ap.query.body,
|
|
95
|
+
context,
|
|
96
|
+
),
|
|
97
|
+
);
|
|
98
|
+
functionAccessPoint.description = ap.description;
|
|
99
|
+
functionAccessPoint.title = ap.title;
|
|
100
|
+
return functionAccessPoint;
|
|
84
101
|
} else if (ap instanceof V1_UnknownAccessPoint) {
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
102
|
+
const unknown = new UnknownAccessPoint(ap.id);
|
|
103
|
+
unknown.description = ap.description;
|
|
104
|
+
unknown.title = ap.title;
|
|
105
|
+
unknown.content = ap.content;
|
|
106
|
+
return unknown;
|
|
88
107
|
}
|
|
89
108
|
throw new UnsupportedOperationError(
|
|
90
109
|
`Unsupported data product access type ${ap}`,
|
|
@@ -106,6 +125,15 @@ export const V1_buildDataProductIcon = (
|
|
|
106
125
|
);
|
|
107
126
|
};
|
|
108
127
|
|
|
128
|
+
export const V1_buildDataProductExpertise = (
|
|
129
|
+
v1Expertise: V1_Expertise,
|
|
130
|
+
): Expertise => {
|
|
131
|
+
const expertise = new Expertise();
|
|
132
|
+
expertise.description = v1Expertise.description;
|
|
133
|
+
expertise.expertIds = v1Expertise.expertIds;
|
|
134
|
+
return expertise;
|
|
135
|
+
};
|
|
136
|
+
|
|
109
137
|
export const V1_buildAccessPointGroup = (
|
|
110
138
|
elementGroup: V1_AccessPointGroup,
|
|
111
139
|
context: V1_GraphBuilderContext,
|
|
@@ -113,6 +141,7 @@ export const V1_buildAccessPointGroup = (
|
|
|
113
141
|
if (elementGroup instanceof V1_ModelAccessPointGroup) {
|
|
114
142
|
const group = new ModelAccessPointGroup();
|
|
115
143
|
group.id = elementGroup.id;
|
|
144
|
+
group.title = elementGroup.title;
|
|
116
145
|
group.description = elementGroup.description;
|
|
117
146
|
group.accessPoints = elementGroup.accessPoints.map((ep) =>
|
|
118
147
|
V1_buildAccessPoint(ep, context),
|
|
@@ -165,6 +194,7 @@ export const V1_buildAccessPointGroup = (
|
|
|
165
194
|
} else {
|
|
166
195
|
const group = new AccessPointGroup();
|
|
167
196
|
group.id = elementGroup.id;
|
|
197
|
+
group.title = elementGroup.title;
|
|
168
198
|
group.description = elementGroup.description;
|
|
169
199
|
group.accessPoints = elementGroup.accessPoints.map((ep) =>
|
|
170
200
|
V1_buildAccessPoint(ep, context),
|
|
@@ -641,8 +641,10 @@ const buildViewSecondPass = (
|
|
|
641
641
|
srcView: V1_View,
|
|
642
642
|
context: V1_GraphBuilderContext,
|
|
643
643
|
schema: Schema,
|
|
644
|
+
database: Database,
|
|
644
645
|
): View => {
|
|
645
646
|
const view = getView(schema, srcView.name);
|
|
647
|
+
const generatedIndex = buildGeneratedIndex(database);
|
|
646
648
|
const columnMappings = srcView.columnMappings.map(
|
|
647
649
|
(columnMapping) =>
|
|
648
650
|
new ColumnMapping(
|
|
@@ -652,6 +654,8 @@ const buildViewSecondPass = (
|
|
|
652
654
|
context,
|
|
653
655
|
new Map<string, TableAlias>(),
|
|
654
656
|
[],
|
|
657
|
+
generatedIndex,
|
|
658
|
+
true,
|
|
655
659
|
),
|
|
656
660
|
),
|
|
657
661
|
);
|
|
@@ -661,6 +665,8 @@ const buildViewSecondPass = (
|
|
|
661
665
|
context,
|
|
662
666
|
new Map<string, TableAlias>(),
|
|
663
667
|
[],
|
|
668
|
+
generatedIndex,
|
|
669
|
+
true,
|
|
664
670
|
),
|
|
665
671
|
);
|
|
666
672
|
if (srcView.filter) {
|
|
@@ -699,7 +705,7 @@ export const V1_buildDatabaseSchemaViewsSecondPass = (
|
|
|
699
705
|
): Schema => {
|
|
700
706
|
const schema = getSchema(database, srcSchema.name);
|
|
701
707
|
schema.views = srcSchema.views.map((view) =>
|
|
702
|
-
buildViewSecondPass(view, context, schema),
|
|
708
|
+
buildViewSecondPass(view, context, schema, database),
|
|
703
709
|
);
|
|
704
710
|
return schema;
|
|
705
711
|
};
|