@finos/legend-graph 32.3.29 → 32.3.32
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/BasicModel.d.ts +1 -1
- package/lib/graph/BasicModel.d.ts.map +1 -1
- package/lib/graph/BasicModel.js +2 -2
- package/lib/graph/BasicModel.js.map +1 -1
- package/lib/graph/DependencyManager.d.ts +3 -1
- package/lib/graph/DependencyManager.d.ts.map +1 -1
- package/lib/graph/DependencyManager.js +3 -0
- package/lib/graph/DependencyManager.js.map +1 -1
- package/lib/graph/MetaModelUtils.d.ts +2 -0
- package/lib/graph/MetaModelUtils.d.ts.map +1 -1
- package/lib/graph/MetaModelUtils.js +26 -1
- package/lib/graph/MetaModelUtils.js.map +1 -1
- package/lib/graph/PureModel.d.ts +1 -0
- package/lib/graph/PureModel.d.ts.map +1 -1
- package/lib/graph/PureModel.js +9 -0
- package/lib/graph/PureModel.js.map +1 -1
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.d.ts +5 -1
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.d.ts.map +1 -1
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.js +2 -2
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.js.map +1 -1
- package/lib/graph/metamodel/pure/packageableElements/function/test/FunctionTest.d.ts.map +1 -1
- package/lib/graph/metamodel/pure/packageableElements/function/test/FunctionTest.js +1 -0
- package/lib/graph/metamodel/pure/packageableElements/function/test/FunctionTest.js.map +1 -1
- package/lib/graph-manager/action/changeDetection/DSL_Data_ObserverHelper.d.ts +3 -0
- package/lib/graph-manager/action/changeDetection/DSL_Data_ObserverHelper.d.ts.map +1 -1
- package/lib/graph-manager/action/changeDetection/DSL_Data_ObserverHelper.js +11 -0
- package/lib/graph-manager/action/changeDetection/DSL_Data_ObserverHelper.js.map +1 -1
- package/lib/graph-manager/action/changeDetection/GraphObserverHelper.js +1 -1
- package/lib/graph-manager/action/changeDetection/GraphObserverHelper.js.map +1 -1
- package/lib/graph-manager/action/query/Query.d.ts +8 -0
- package/lib/graph-manager/action/query/Query.d.ts.map +1 -1
- package/lib/graph-manager/action/query/Query.js +8 -0
- package/lib/graph-manager/action/query/Query.js.map +1 -1
- package/lib/graph-manager/helpers/DataProductHelper.d.ts +25 -0
- package/lib/graph-manager/helpers/DataProductHelper.d.ts.map +1 -0
- package/lib/graph-manager/helpers/DataProductHelper.js +73 -0
- package/lib/graph-manager/helpers/DataProductHelper.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineHelper.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineHelper.js +9 -2
- package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/engine/query/V1_Query.d.ts +8 -1
- package/lib/graph-manager/protocol/pure/v1/engine/query/V1_Query.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/engine/query/V1_Query.js +19 -0
- package/lib/graph-manager/protocol/pure/v1/engine/query/V1_Query.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/function/test/V1_FunctionTest.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/function/test/V1_FunctionTest.js +1 -0
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/function/test/V1_FunctionTest.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.js +1 -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/helpers/V1_DataProductBuilder.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.js +1 -2
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.js.map +1 -1
- package/lib/index.d.ts +4 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -3
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -1
- package/package.json +2 -2
- package/src/graph/BasicModel.ts +2 -2
- package/src/graph/DependencyManager.ts +5 -0
- package/src/graph/MetaModelUtils.ts +30 -0
- package/src/graph/PureModel.ts +9 -0
- package/src/graph/metamodel/pure/dataProduct/DataProduct.ts +8 -3
- package/src/graph/metamodel/pure/packageableElements/function/test/FunctionTest.ts +1 -0
- package/src/graph-manager/action/changeDetection/DSL_Data_ObserverHelper.ts +23 -0
- package/src/graph-manager/action/changeDetection/GraphObserverHelper.ts +1 -1
- package/src/graph-manager/action/query/Query.ts +11 -0
- package/src/graph-manager/helpers/DataProductHelper.ts +113 -0
- package/src/graph-manager/protocol/pure/v1/engine/V1_EngineHelper.ts +8 -0
- package/src/graph-manager/protocol/pure/v1/engine/query/V1_Query.ts +31 -0
- package/src/graph-manager/protocol/pure/v1/model/packageableElements/function/test/V1_FunctionTest.ts +1 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.ts +1 -1
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.ts +6 -2
- package/src/index.ts +6 -2
- package/tsconfig.json +1 -0
package/src/graph/PureModel.ts
CHANGED
|
@@ -302,6 +302,15 @@ export class PureModel extends BasicModel {
|
|
|
302
302
|
...this.generationModel.ownFunctions,
|
|
303
303
|
];
|
|
304
304
|
}
|
|
305
|
+
get dataProducts(): DataProduct[] {
|
|
306
|
+
return [
|
|
307
|
+
...this.coreModel.ownDataProducts,
|
|
308
|
+
...this.systemModel.ownDataProducts,
|
|
309
|
+
...this.dependencyManager.dataProducts,
|
|
310
|
+
...this.ownDataProducts,
|
|
311
|
+
...this.generationModel.ownDataProducts,
|
|
312
|
+
];
|
|
313
|
+
}
|
|
305
314
|
get functionActivators(): FunctionActivator[] {
|
|
306
315
|
return [
|
|
307
316
|
...this.coreModel.ownFunctionActivators,
|
|
@@ -139,6 +139,11 @@ export class DataProductRuntimeInfo {
|
|
|
139
139
|
|
|
140
140
|
export type DataProductElement = Package | Class | Enumeration | Association;
|
|
141
141
|
|
|
142
|
+
export interface ElementScope {
|
|
143
|
+
element: PackageableElementReference<DataProductElement>;
|
|
144
|
+
exclude?: boolean | undefined;
|
|
145
|
+
}
|
|
146
|
+
|
|
142
147
|
export class DataProductElementScope implements Hashable {
|
|
143
148
|
exclude: boolean | undefined;
|
|
144
149
|
element!: PackageableElementReference<DataProductElement>;
|
|
@@ -222,8 +227,8 @@ export class NativeModelExecutionContext implements Hashable {
|
|
|
222
227
|
|
|
223
228
|
export class NativeModelAccess implements Hashable {
|
|
224
229
|
featuredElements: DataProductElementScope[] = [];
|
|
225
|
-
nativeModelExecutionContexts
|
|
226
|
-
defaultExecutionContext!:
|
|
230
|
+
nativeModelExecutionContexts: NativeModelExecutionContext[] = [];
|
|
231
|
+
defaultExecutionContext!: NativeModelExecutionContext;
|
|
227
232
|
diagrams: DataProductDiagram[] = [];
|
|
228
233
|
sampleQueries: SampleQuery[] = [];
|
|
229
234
|
|
|
@@ -234,7 +239,7 @@ export class NativeModelAccess implements Hashable {
|
|
|
234
239
|
hashArray(this.featuredElements),
|
|
235
240
|
hashArray(this.diagrams),
|
|
236
241
|
hashArray(this.sampleQueries),
|
|
237
|
-
this.defaultExecutionContext,
|
|
242
|
+
this.defaultExecutionContext.key,
|
|
238
243
|
]);
|
|
239
244
|
}
|
|
240
245
|
}
|
|
@@ -44,6 +44,10 @@ import {
|
|
|
44
44
|
observe_TaggedValue,
|
|
45
45
|
} from './DomainObserverHelper.js';
|
|
46
46
|
import { INTERNAL__UnknownEmbeddedData } from '../../../graph/metamodel/pure/data/INTERNAL__UnknownEmbeddedData.js';
|
|
47
|
+
import type {
|
|
48
|
+
RelationTypeColumnMetadata,
|
|
49
|
+
RelationTypeMetadata,
|
|
50
|
+
} from '../relation/RelationTypeMetadata.js';
|
|
47
51
|
|
|
48
52
|
export const observe_ExternalFormatData = skipObserved(
|
|
49
53
|
(metamodel: ExternalFormatData): ExternalFormatData => {
|
|
@@ -234,3 +238,22 @@ export const observe_DataElement = skipObservedWithContext(
|
|
|
234
238
|
return metamodel;
|
|
235
239
|
},
|
|
236
240
|
);
|
|
241
|
+
|
|
242
|
+
export const observe_RelationTypeColumnMetadata = skipObserved(
|
|
243
|
+
(column: RelationTypeColumnMetadata): RelationTypeColumnMetadata =>
|
|
244
|
+
makeObservable(column, {
|
|
245
|
+
type: observable,
|
|
246
|
+
name: observable,
|
|
247
|
+
}),
|
|
248
|
+
);
|
|
249
|
+
|
|
250
|
+
export const observe_RelationTypeMetadata = skipObserved(
|
|
251
|
+
(relationTypeMetadata: RelationTypeMetadata): RelationTypeMetadata => {
|
|
252
|
+
makeObservable(relationTypeMetadata, {
|
|
253
|
+
columns: observable,
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
relationTypeMetadata.columns.forEach(observe_RelationTypeColumnMetadata);
|
|
257
|
+
return relationTypeMetadata;
|
|
258
|
+
},
|
|
259
|
+
);
|
|
@@ -86,7 +86,7 @@ const observe_Abstract_BasicModel = (metamodel: BasicModel): void => {
|
|
|
86
86
|
ownFunctions: computed,
|
|
87
87
|
ownFunctionActivators: computed,
|
|
88
88
|
ownStores: computed,
|
|
89
|
-
|
|
89
|
+
ownDataProducts: computed,
|
|
90
90
|
ownIngests: computed,
|
|
91
91
|
ownFlatDatas: computed,
|
|
92
92
|
ownDatabases: computed,
|
|
@@ -46,6 +46,11 @@ export class QueryDataSpaceExecutionContext extends QueryExecutionContext {
|
|
|
46
46
|
executionKey: string | undefined;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
export class QueryDataProductExecutionContext extends QueryExecutionContext {
|
|
50
|
+
dataProductPath!: string;
|
|
51
|
+
executionKey: string | undefined;
|
|
52
|
+
}
|
|
53
|
+
|
|
49
54
|
export interface QueryGridConfig {
|
|
50
55
|
columns: object[];
|
|
51
56
|
isPivotModeEnabled: boolean | undefined;
|
|
@@ -154,6 +159,12 @@ export class QueryDataSpaceExecutionContextInfo extends QueryExecutionContextInf
|
|
|
154
159
|
dataSpacePath!: string;
|
|
155
160
|
executionKey: string | undefined;
|
|
156
161
|
}
|
|
162
|
+
|
|
163
|
+
export class QueryDataProductNativeExecutionContextInfo extends QueryExecutionContextInfo {
|
|
164
|
+
dataProductPath!: string;
|
|
165
|
+
executionKey: string | undefined;
|
|
166
|
+
}
|
|
167
|
+
|
|
157
168
|
export interface QueryInfo {
|
|
158
169
|
name: string;
|
|
159
170
|
id: string;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-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 { assertTrue, uniq, guaranteeNonNullable } from '@finos/legend-shared';
|
|
18
|
+
import {
|
|
19
|
+
ModelAccessPointGroup,
|
|
20
|
+
type NativeModelAccess,
|
|
21
|
+
type DataProduct,
|
|
22
|
+
type DataProductElement,
|
|
23
|
+
type ElementScope,
|
|
24
|
+
} from '../../graph/metamodel/pure/dataProduct/DataProduct.js';
|
|
25
|
+
import type { Mapping } from '../../graph/metamodel/pure/packageableElements/mapping/Mapping.js';
|
|
26
|
+
import type { GraphManagerState } from '../GraphManagerState.js';
|
|
27
|
+
import type { MappingModelCoverageAnalysisResult } from '../action/analytics/MappingModelCoverageAnalysis.js';
|
|
28
|
+
import { getMappingCompatibleClasses } from '../../graph/helpers/DSL_Mapping_Helper.js';
|
|
29
|
+
import type { Class } from '../../graph/metamodel/pure/packageableElements/domain/Class.js';
|
|
30
|
+
import { elementBelongsToPackage } from '../../graph/helpers/DomainHelper.js';
|
|
31
|
+
import { Package } from '../../graph/metamodel/pure/packageableElements/domain/Package.js';
|
|
32
|
+
|
|
33
|
+
export const isDataProductNative = (dataProduct: DataProduct): boolean => {
|
|
34
|
+
return dataProduct.nativeModelAccess !== undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const isDataProductModeled = (dataProduct: DataProduct): boolean => {
|
|
38
|
+
const groups = dataProduct.accessPointGroups;
|
|
39
|
+
if (groups.length === 1) {
|
|
40
|
+
const group = groups[0];
|
|
41
|
+
if (group instanceof ModelAccessPointGroup) {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return false;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const getModelGroupFromNativeDataProduct = (
|
|
49
|
+
dataProduct: DataProduct,
|
|
50
|
+
): NativeModelAccess => {
|
|
51
|
+
assertTrue(isDataProductNative(dataProduct), 'Data product is not native');
|
|
52
|
+
return guaranteeNonNullable(
|
|
53
|
+
dataProduct.nativeModelAccess,
|
|
54
|
+
'Native access point group is expected',
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const matchesDataElement = (
|
|
59
|
+
_class: Class,
|
|
60
|
+
element: DataProductElement,
|
|
61
|
+
): boolean => {
|
|
62
|
+
if (_class === element) {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
if (element instanceof Package) {
|
|
66
|
+
return elementBelongsToPackage(_class, element);
|
|
67
|
+
}
|
|
68
|
+
return false;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export const resolveUsableDataProductClasses = (
|
|
72
|
+
elements: ElementScope[] | undefined,
|
|
73
|
+
mapping: Mapping,
|
|
74
|
+
graphManagerState: GraphManagerState,
|
|
75
|
+
mappingModelCoverageAnalysisResult?: MappingModelCoverageAnalysisResult,
|
|
76
|
+
): Class[] => {
|
|
77
|
+
let compatibleClasses = getMappingCompatibleClasses(
|
|
78
|
+
mapping,
|
|
79
|
+
graphManagerState.usableClasses,
|
|
80
|
+
);
|
|
81
|
+
if (
|
|
82
|
+
// This check is to make sure that we have `info` field present in `MappedEntity` which
|
|
83
|
+
// contains information about the mapped class path
|
|
84
|
+
mappingModelCoverageAnalysisResult?.mappedEntities.some(
|
|
85
|
+
(m) => m.info !== undefined,
|
|
86
|
+
)
|
|
87
|
+
) {
|
|
88
|
+
const uniqueCompatibleClasses = uniq(
|
|
89
|
+
mappingModelCoverageAnalysisResult.mappedEntities
|
|
90
|
+
// is root entity filters out mapped classes
|
|
91
|
+
.filter((e) => e.info?.isRootEntity)
|
|
92
|
+
.map((e) => e.info?.classPath),
|
|
93
|
+
);
|
|
94
|
+
compatibleClasses = graphManagerState.graph.classes.filter((c) =>
|
|
95
|
+
uniqueCompatibleClasses.includes(c.path),
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
if (elements?.length) {
|
|
99
|
+
return compatibleClasses.filter((_class) => {
|
|
100
|
+
const _classElements = elements
|
|
101
|
+
.filter((e) => matchesDataElement(_class, e.element.value))
|
|
102
|
+
// we sort because we respect the closest definition to the element.
|
|
103
|
+
.sort(
|
|
104
|
+
(a, b) => b.element.value.path.length - a.element.value.path.length,
|
|
105
|
+
);
|
|
106
|
+
if (!_classElements.length) {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
return !_classElements[0]?.exclude;
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
return compatibleClasses;
|
|
113
|
+
};
|
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
type QueryExecutionContextInfo,
|
|
33
33
|
QueryExplicitExecutionContextInfo,
|
|
34
34
|
QueryDataSpaceExecutionContextInfo,
|
|
35
|
+
QueryDataProductExecutionContext,
|
|
35
36
|
} from '../../../../../graph-manager/action/query/Query.js';
|
|
36
37
|
import {
|
|
37
38
|
type V1_LightQuery,
|
|
@@ -40,6 +41,7 @@ import {
|
|
|
40
41
|
V1_QueryExplicitExecutionContext,
|
|
41
42
|
V1_QueryDataSpaceExecutionContext,
|
|
42
43
|
type V1_QueryExecutionContext,
|
|
44
|
+
V1_QueryDataProductExecutionContext,
|
|
43
45
|
} from './query/V1_Query.js';
|
|
44
46
|
import type { PureModel } from '../../../../../graph/PureModel.js';
|
|
45
47
|
import { DEPRECATED__ServiceTestResult } from '../../../../../graph-manager/action/service/DEPRECATED__ServiceTestResult.js';
|
|
@@ -124,6 +126,7 @@ export const V1_buildLightQuery = (
|
|
|
124
126
|
`Query 'artifactId' field is missing`,
|
|
125
127
|
);
|
|
126
128
|
metamodel.owner = protocol.owner;
|
|
129
|
+
metamodel.description = protocol.description;
|
|
127
130
|
metamodel.lastUpdatedAt = protocol.lastUpdatedAt;
|
|
128
131
|
metamodel.createdAt = protocol.createdAt;
|
|
129
132
|
metamodel.lastOpenAt = protocol.lastOpenAt;
|
|
@@ -337,6 +340,11 @@ export const V1_transformQueryExecutionContext = (
|
|
|
337
340
|
protocol.dataSpacePath = execContext.dataSpacePath;
|
|
338
341
|
protocol.executionKey = execContext.executionKey;
|
|
339
342
|
return protocol;
|
|
343
|
+
} else if (execContext instanceof QueryDataProductExecutionContext) {
|
|
344
|
+
const protocol = new V1_QueryDataProductExecutionContext();
|
|
345
|
+
protocol.dataProductPath = execContext.dataProductPath;
|
|
346
|
+
protocol.executionKey = execContext.executionKey;
|
|
347
|
+
return protocol;
|
|
340
348
|
}
|
|
341
349
|
throw new UnsupportedOperationError('Unsupported query execution context');
|
|
342
350
|
};
|
|
@@ -65,6 +65,7 @@ export class V1_QueryExecutionContext {}
|
|
|
65
65
|
export enum V1_QueryExecutionContextType {
|
|
66
66
|
QUERY_EXPLICIT_EXECUTION_CONTEXT = 'explicitExecutionContext',
|
|
67
67
|
QUERY_DATASAPCE_EXECUTION_CONTEXT = 'dataSpaceExecutionContext',
|
|
68
|
+
QUERY_DATAPRODUCT_EXECUTION_CONTEXT = 'dataProductExecutionContext',
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
export class V1_QueryExplicitExecutionContext extends V1_QueryExecutionContext {
|
|
@@ -103,6 +104,24 @@ export class V1_QueryDataSpaceExecutionContext extends V1_QueryExecutionContext
|
|
|
103
104
|
);
|
|
104
105
|
}
|
|
105
106
|
|
|
107
|
+
export class V1_QueryDataProductExecutionContext extends V1_QueryExecutionContext {
|
|
108
|
+
dataProductPath!: string;
|
|
109
|
+
executionKey: string | undefined;
|
|
110
|
+
|
|
111
|
+
static readonly serialization = new SerializationFactory(
|
|
112
|
+
createModelSchema(V1_QueryDataProductExecutionContext, {
|
|
113
|
+
_type: usingConstantValueSchema(
|
|
114
|
+
V1_QueryExecutionContextType.QUERY_DATAPRODUCT_EXECUTION_CONTEXT,
|
|
115
|
+
),
|
|
116
|
+
dataProductPath: primitive(),
|
|
117
|
+
executionKey: optional(primitive()),
|
|
118
|
+
}),
|
|
119
|
+
{
|
|
120
|
+
deserializeNullAsUndefined: true,
|
|
121
|
+
},
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
106
125
|
export const V1_deserializeQueryExecutionContext = (
|
|
107
126
|
json: PlainObject<V1_QueryExecutionContext>,
|
|
108
127
|
): V1_QueryExecutionContext => {
|
|
@@ -117,6 +136,11 @@ export const V1_deserializeQueryExecutionContext = (
|
|
|
117
136
|
V1_QueryDataSpaceExecutionContext.serialization.schema,
|
|
118
137
|
json,
|
|
119
138
|
);
|
|
139
|
+
case V1_QueryExecutionContextType.QUERY_DATAPRODUCT_EXECUTION_CONTEXT:
|
|
140
|
+
return deserialize(
|
|
141
|
+
V1_QueryDataProductExecutionContext.serialization.schema,
|
|
142
|
+
json,
|
|
143
|
+
);
|
|
120
144
|
default: {
|
|
121
145
|
throw new UnsupportedOperationError(
|
|
122
146
|
`Can't deserialize authentication strategy of type '${json._type}': no compatible deserializer available from plugins`,
|
|
@@ -138,6 +162,11 @@ export const V1_serializeQueryExecutionContext = (
|
|
|
138
162
|
V1_QueryDataSpaceExecutionContext.serialization.schema,
|
|
139
163
|
protocol,
|
|
140
164
|
);
|
|
165
|
+
} else if (protocol instanceof V1_QueryDataProductExecutionContext) {
|
|
166
|
+
return serialize(
|
|
167
|
+
V1_QueryDataProductExecutionContext.serialization.schema,
|
|
168
|
+
protocol,
|
|
169
|
+
);
|
|
141
170
|
}
|
|
142
171
|
throw new UnsupportedOperationError(
|
|
143
172
|
`Can't serialize authentication strategy: no compatible serializer available from plugins`,
|
|
@@ -217,6 +246,7 @@ export class V1_LightQuery {
|
|
|
217
246
|
artifactId!: string;
|
|
218
247
|
versionId!: string;
|
|
219
248
|
originalVersionId?: string | undefined;
|
|
249
|
+
description?: string | undefined;
|
|
220
250
|
lastUpdatedAt?: number | undefined;
|
|
221
251
|
createdAt?: number | undefined;
|
|
222
252
|
lastOpenAt?: number | undefined;
|
|
@@ -231,6 +261,7 @@ export class V1_LightQuery {
|
|
|
231
261
|
lastOpenAt: optional(primitive()),
|
|
232
262
|
name: primitive(),
|
|
233
263
|
owner: optional(primitive()),
|
|
264
|
+
description: optional(primitive()),
|
|
234
265
|
versionId: primitive(),
|
|
235
266
|
originalVersionId: optional(primitive()),
|
|
236
267
|
}),
|
|
@@ -167,7 +167,7 @@ export const V1_transformDataProduct = (
|
|
|
167
167
|
);
|
|
168
168
|
}
|
|
169
169
|
nativeModelAccess.defaultExecutionContext =
|
|
170
|
-
metamodelNativeModelAccess.defaultExecutionContext;
|
|
170
|
+
metamodelNativeModelAccess.defaultExecutionContext.key;
|
|
171
171
|
nativeModelAccess.nativeModelExecutionContexts =
|
|
172
172
|
metamodelNativeModelAccess.nativeModelExecutionContexts.map(
|
|
173
173
|
(executionContext) => {
|
|
@@ -310,12 +310,16 @@ export const V1_buildNativeModelAccess = (
|
|
|
310
310
|
context: V1_GraphBuilderContext,
|
|
311
311
|
): NativeModelAccess => {
|
|
312
312
|
const metamodelNativeModelAccess = new NativeModelAccess();
|
|
313
|
-
metamodelNativeModelAccess.defaultExecutionContext =
|
|
314
|
-
nativeModelAccess.defaultExecutionContext;
|
|
315
313
|
metamodelNativeModelAccess.nativeModelExecutionContexts =
|
|
316
314
|
nativeModelAccess.nativeModelExecutionContexts.map((executionContext) =>
|
|
317
315
|
V1_buildNativeModelExecutionContext(executionContext, context),
|
|
318
316
|
);
|
|
317
|
+
metamodelNativeModelAccess.defaultExecutionContext = guaranteeNonNullable(
|
|
318
|
+
metamodelNativeModelAccess.nativeModelExecutionContexts.find(
|
|
319
|
+
(e) => e.key === nativeModelAccess.defaultExecutionContext,
|
|
320
|
+
),
|
|
321
|
+
`Default execution context ${nativeModelAccess.defaultExecutionContext} not found among native model execution contexts`,
|
|
322
|
+
);
|
|
319
323
|
if (nativeModelAccess.sampleQueries) {
|
|
320
324
|
metamodelNativeModelAccess.sampleQueries =
|
|
321
325
|
nativeModelAccess.sampleQueries.map((sampleQuery) =>
|
package/src/index.ts
CHANGED
|
@@ -399,6 +399,7 @@ export {
|
|
|
399
399
|
} from './graph-manager/protocol/pure/v1/lakehouse/subscriptions/V1_ConsumerSubscriptions.js';
|
|
400
400
|
export {
|
|
401
401
|
V1_DataProductArtifact,
|
|
402
|
+
V1_NativeModelExecutionContextInfo,
|
|
402
403
|
V1_AccessPointImplementation,
|
|
403
404
|
V1_AccessPointGroupInfo,
|
|
404
405
|
V1_SampleQueryInfo,
|
|
@@ -781,8 +782,6 @@ export {
|
|
|
781
782
|
SupportInfo,
|
|
782
783
|
ModelAccessPointGroup,
|
|
783
784
|
InLineSampleQuery,
|
|
784
|
-
NativeModelAccess,
|
|
785
|
-
NativeModelExecutionContext,
|
|
786
785
|
PackageableElementSampleQuery,
|
|
787
786
|
SampleQuery,
|
|
788
787
|
DataProductRuntimeInfo,
|
|
@@ -794,6 +793,8 @@ export {
|
|
|
794
793
|
Expertise,
|
|
795
794
|
ExternalDataProductType,
|
|
796
795
|
type DataProductElement,
|
|
796
|
+
NativeModelAccess,
|
|
797
|
+
NativeModelExecutionContext,
|
|
797
798
|
DataProductOperationalMetadata,
|
|
798
799
|
} from './graph/metamodel/pure/dataProduct/DataProduct.js';
|
|
799
800
|
export * from './graph-manager/action/changeDetection/DataProductObserveHelper.js';
|
|
@@ -839,6 +840,8 @@ export {
|
|
|
839
840
|
observe_RelationElement,
|
|
840
841
|
observe_RelationRowTestData,
|
|
841
842
|
observe_RelationElementsData,
|
|
843
|
+
observe_RelationTypeMetadata,
|
|
844
|
+
observe_RelationTypeColumnMetadata,
|
|
842
845
|
} from './graph-manager/action/changeDetection/DSL_Data_ObserverHelper.js';
|
|
843
846
|
export { V1_transformExternalFormatData } from './graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataElementTransformer.js';
|
|
844
847
|
export { V1_externalFormatDataModelSchema } from './graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataElementSerializationHelper.js';
|
|
@@ -972,6 +975,7 @@ export {
|
|
|
972
975
|
DatasetEntitlementAccessApprovedReport,
|
|
973
976
|
DatasetEntitlementUnsupportedReport,
|
|
974
977
|
} from './graph-manager/action/analytics/StoreEntitlementAnalysis.js';
|
|
978
|
+
export * from './graph-manager/helpers/DataProductHelper.js';
|
|
975
979
|
export {
|
|
976
980
|
FunctionAnalysisInfo,
|
|
977
981
|
FunctionAnalysisParameterInfo,
|
package/tsconfig.json
CHANGED
|
@@ -435,6 +435,7 @@
|
|
|
435
435
|
"./src/graph-manager/extensions/Testable_PureGraphManagerPlugin_Extension.ts",
|
|
436
436
|
"./src/graph-manager/helpers/DSL_Data_GraphManagerHelper.ts",
|
|
437
437
|
"./src/graph-manager/helpers/DSL_ExternalFormat_GraphManagerHelper.ts",
|
|
438
|
+
"./src/graph-manager/helpers/DataProductHelper.ts",
|
|
438
439
|
"./src/graph-manager/helpers/ValueSpecificationGraphManagerHelper.ts",
|
|
439
440
|
"./src/graph-manager/protocol/pure/PureGraphManagerBuilder.ts",
|
|
440
441
|
"./src/graph-manager/protocol/pure/PureProtocolProcessorPlugin.ts",
|