@finos/legend-graph 32.3.38 → 32.4.0
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/dataProduct/DataProduct.d.ts +5 -0
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.d.ts.map +1 -1
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.js +6 -0
- package/lib/graph/metamodel/pure/dataProduct/DataProduct.js.map +1 -1
- package/lib/graph-manager/AbstractPureGraphManager.d.ts +13 -1
- package/lib/graph-manager/AbstractPureGraphManager.d.ts.map +1 -1
- package/lib/graph-manager/AbstractPureGraphManager.js.map +1 -1
- package/lib/graph-manager/action/analytics/data-product/DataProductAnalysis.d.ts +30 -0
- package/lib/graph-manager/action/analytics/data-product/DataProductAnalysis.d.ts.map +1 -0
- package/lib/graph-manager/action/analytics/data-product/DataProductAnalysis.js +32 -0
- package/lib/graph-manager/action/analytics/data-product/DataProductAnalysis.js.map +1 -0
- package/lib/graph-manager/action/query/Query.d.ts +12 -3
- package/lib/graph-manager/action/query/Query.d.ts.map +1 -1
- package/lib/graph-manager/action/query/Query.js +9 -0
- package/lib/graph-manager/action/query/Query.js.map +1 -1
- package/lib/graph-manager/helpers/DataProductHelper.d.ts.map +1 -1
- package/lib/graph-manager/helpers/DataProductHelper.js +2 -1
- package/lib/graph-manager/helpers/DataProductHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.d.ts +12 -4
- package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.js +128 -11
- package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.js.map +1 -1
- 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 +34 -4
- 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 +11 -4
- 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 +26 -8
- package/lib/graph-manager/protocol/pure/v1/engine/query/V1_Query.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/lakehouse/deploy/V1_DataProductArtifact.d.ts +2 -0
- 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 +3 -0
- package/lib/graph-manager/protocol/pure/v1/lakehouse/deploy/V1_DataProductArtifact.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_ConsumerEntitlements.d.ts +5 -24
- package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_ConsumerEntitlements.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_ConsumerEntitlements.js +5 -24
- package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_ConsumerEntitlements.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_CoreEntitlements.d.ts +50 -9
- package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_CoreEntitlements.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_CoreEntitlements.js +58 -10
- package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_CoreEntitlements.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_DataAccessRequest.d.ts +100 -0
- package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_DataAccessRequest.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_DataAccessRequest.js +108 -0
- package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_DataAccessRequest.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_EntitlementsDataProduct.d.ts +1 -16
- package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_EntitlementsDataProduct.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_EntitlementsDataProduct.js +0 -14
- package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_EntitlementsDataProduct.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/lakehouse/helpers/V1_ConsumerEntitlementsUtils.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/lakehouse/helpers/V1_ConsumerEntitlementsUtils.js +2 -1
- package/lib/graph-manager/protocol/pure/v1/lakehouse/helpers/V1_ConsumerEntitlementsUtils.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/lakehouse/subscriptions/V1_ConsumerSubscriptions.d.ts +5 -0
- package/lib/graph-manager/protocol/pure/v1/lakehouse/subscriptions/V1_ConsumerSubscriptions.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/lakehouse/subscriptions/V1_ConsumerSubscriptions.js +4 -0
- package/lib/graph-manager/protocol/pure/v1/lakehouse/subscriptions/V1_ConsumerSubscriptions.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_IngestSerializationHelper.js +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_IngestSerializationHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_ConsumerEntitlementsSerializationHelper.d.ts +45 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_ConsumerEntitlementsSerializationHelper.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_ConsumerEntitlementsSerializationHelper.js +190 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_ConsumerEntitlementsSerializationHelper.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_CoreEntitlementsSerializationHelper.d.ts +41 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_CoreEntitlementsSerializationHelper.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_CoreEntitlementsSerializationHelper.js +141 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_CoreEntitlementsSerializationHelper.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_DataAccessRequestSerializationHelper.d.ts +34 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_DataAccessRequestSerializationHelper.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_DataAccessRequestSerializationHelper.js +136 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_DataAccessRequestSerializationHelper.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_EntitlementsDataProductSerializationHelper.d.ts +31 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_EntitlementsDataProductSerializationHelper.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_EntitlementsDataProductSerializationHelper.js +98 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_EntitlementsDataProductSerializationHelper.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_EntitlementsTasksSerializationHelper.d.ts +18 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_EntitlementsTasksSerializationHelper.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_EntitlementsTasksSerializationHelper.js +22 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_EntitlementsTasksSerializationHelper.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/{V1_SubscriptionSerializationHelper.d.ts → lakehouse/V1_SubscriptionSerializationHelper.d.ts} +2 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_SubscriptionSerializationHelper.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/{V1_SubscriptionSerializationHelper.js → lakehouse/V1_SubscriptionSerializationHelper.js} +6 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_SubscriptionSerializationHelper.js.map +1 -0
- package/lib/index.d.ts +13 -7
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +13 -7
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -1
- package/package.json +1 -1
- package/src/graph/metamodel/pure/dataProduct/DataProduct.ts +6 -0
- package/src/graph-manager/AbstractPureGraphManager.ts +35 -1
- package/src/graph-manager/action/analytics/data-product/DataProductAnalysis.ts +47 -0
- package/src/graph-manager/action/query/Query.ts +15 -3
- package/src/graph-manager/helpers/DataProductHelper.ts +2 -1
- package/src/graph-manager/protocol/pure/v1/V1_PureGraphManager.ts +236 -16
- package/src/graph-manager/protocol/pure/v1/engine/V1_EngineHelper.ts +41 -4
- package/src/graph-manager/protocol/pure/v1/engine/query/V1_Query.ts +41 -10
- package/src/graph-manager/protocol/pure/v1/lakehouse/deploy/V1_DataProductArtifact.ts +5 -0
- package/src/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_ConsumerEntitlements.ts +9 -28
- package/src/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_CoreEntitlements.ts +76 -11
- package/src/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_DataAccessRequest.ts +126 -0
- package/src/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_EntitlementsDataProduct.ts +1 -20
- package/src/graph-manager/protocol/pure/v1/lakehouse/helpers/V1_ConsumerEntitlementsUtils.ts +4 -2
- package/src/graph-manager/protocol/pure/v1/lakehouse/subscriptions/V1_ConsumerSubscriptions.ts +7 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_IngestSerializationHelper.ts +1 -1
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_ConsumerEntitlementsSerializationHelper.ts +394 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_CoreEntitlementsSerializationHelper.ts +238 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_DataAccessRequestSerializationHelper.ts +261 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_EntitlementsDataProductSerializationHelper.ts +179 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/lakehouse/V1_EntitlementsTasksSerializationHelper.ts +26 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/{V1_SubscriptionSerializationHelper.ts → lakehouse/V1_SubscriptionSerializationHelper.ts} +11 -1
- package/src/index.ts +16 -95
- package/tsconfig.json +8 -2
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_EntitlementSerializationHelper.d.ts +0 -77
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_EntitlementSerializationHelper.d.ts.map +0 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_EntitlementSerializationHelper.js +0 -376
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_EntitlementSerializationHelper.js.map +0 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_SubscriptionSerializationHelper.d.ts.map +0 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_SubscriptionSerializationHelper.js.map +0 -1
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_EntitlementSerializationHelper.ts +0 -701
|
@@ -63,7 +63,11 @@ import {
|
|
|
63
63
|
ActionState,
|
|
64
64
|
} from '@finos/legend-shared';
|
|
65
65
|
import type { LightQuery, Query, QueryInfo } from './action/query/Query.js';
|
|
66
|
-
import type {
|
|
66
|
+
import type {
|
|
67
|
+
EntitiesWithOrigin,
|
|
68
|
+
Entity,
|
|
69
|
+
ProjectGAVCoordinates,
|
|
70
|
+
} from '@finos/legend-storage';
|
|
67
71
|
import type { QuerySearchSpecification } from './action/query/QuerySearchSpecification.js';
|
|
68
72
|
import type { ExternalFormatDescription } from './action/externalFormat/ExternalFormatDescription.js';
|
|
69
73
|
import type { ConfigurationProperty } from '../graph/metamodel/pure/packageableElements/fileGeneration/ConfigurationProperty.js';
|
|
@@ -124,7 +128,9 @@ import type {
|
|
|
124
128
|
RawLineageModel,
|
|
125
129
|
} from '../graph/metamodel/pure/lineage/LineageModel.js';
|
|
126
130
|
import type { DeployProjectResponse } from './action/dev-metadata/DeployProjectResponse.js';
|
|
131
|
+
import type { DataProductAnalysisQueryResult } from './action/analytics/data-product/DataProductAnalysis.js';
|
|
127
132
|
import type { MetadataRequestOptions } from './action/dev-metadata/MetadataRequestOptions.js';
|
|
133
|
+
import type { DataProductAccessType } from '../graph/metamodel/pure/dataProduct/DataProduct.js';
|
|
128
134
|
|
|
129
135
|
export interface TEMPORARY__EngineSetupConfig {
|
|
130
136
|
env: string;
|
|
@@ -177,6 +183,11 @@ export interface ExecutionOptions {
|
|
|
177
183
|
* instead of providing in separate input property
|
|
178
184
|
*/
|
|
179
185
|
forceFromExpression?: boolean | undefined;
|
|
186
|
+
/**
|
|
187
|
+
* Additional elements needed for execution that are not part of the immediate graph.
|
|
188
|
+
* These will be included alongside the graph data when sending the execution request.
|
|
189
|
+
*/
|
|
190
|
+
floatingExecutionElements?: PackageableElement[] | undefined;
|
|
180
191
|
}
|
|
181
192
|
|
|
182
193
|
export interface ServiceRegistrationOptions {
|
|
@@ -738,6 +749,29 @@ export abstract class AbstractPureGraphManager {
|
|
|
738
749
|
graphData: GraphData,
|
|
739
750
|
): Promise<DatasetEntitlementReport[]>;
|
|
740
751
|
|
|
752
|
+
abstract analyzeDataProductAndBuildMinimalGraph(
|
|
753
|
+
dataProductPath: string,
|
|
754
|
+
cacheRetriever: () => Promise<PlainObject>,
|
|
755
|
+
pureGraph: PureModel,
|
|
756
|
+
accessPointId: string,
|
|
757
|
+
dataProductAccessType: DataProductAccessType,
|
|
758
|
+
projectInfo: ProjectGAVCoordinates,
|
|
759
|
+
functionEntitiesRetriever?: () => Promise<
|
|
760
|
+
[PlainObject<Entity>[], PlainObject<Entity>[]]
|
|
761
|
+
>,
|
|
762
|
+
graphReport?: GraphManagerOperationReport,
|
|
763
|
+
): Promise<DataProductAnalysisQueryResult>;
|
|
764
|
+
|
|
765
|
+
abstract buildDataProductAnalysis(
|
|
766
|
+
artifact: object,
|
|
767
|
+
dataProductPath: string,
|
|
768
|
+
pureGraph: PureModel,
|
|
769
|
+
accessPointId: string,
|
|
770
|
+
dataProductAccessType: DataProductAccessType,
|
|
771
|
+
projectInfo: ProjectGAVCoordinates,
|
|
772
|
+
graphReport?: GraphManagerOperationReport,
|
|
773
|
+
): Promise<DataProductAnalysisQueryResult>;
|
|
774
|
+
|
|
741
775
|
/**
|
|
742
776
|
* TODO: Move these to store relational extension
|
|
743
777
|
*
|
|
@@ -0,0 +1,47 @@
|
|
|
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 type {
|
|
18
|
+
ModelAccessPointGroup,
|
|
19
|
+
NativeModelExecutionContext,
|
|
20
|
+
} from '../../../../graph/metamodel/pure/dataProduct/DataProduct.js';
|
|
21
|
+
import type { MappingModelCoverageAnalysisResult } from '../MappingModelCoverageAnalysis.js';
|
|
22
|
+
|
|
23
|
+
export class DataProductAnalysis {
|
|
24
|
+
path!: string;
|
|
25
|
+
title: string | undefined;
|
|
26
|
+
description: string | undefined;
|
|
27
|
+
mappingToMappingCoverageResult?: Map<
|
|
28
|
+
string,
|
|
29
|
+
MappingModelCoverageAnalysisResult
|
|
30
|
+
>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export class DataProductAnalysisQueryResult {
|
|
34
|
+
targetMappingPath: string;
|
|
35
|
+
dataProductAnalysis: DataProductAnalysis;
|
|
36
|
+
targetExecState: NativeModelExecutionContext | ModelAccessPointGroup;
|
|
37
|
+
|
|
38
|
+
constructor(
|
|
39
|
+
targetMappingPath: string,
|
|
40
|
+
dataProductAnalysis: DataProductAnalysis,
|
|
41
|
+
targetExecState: NativeModelExecutionContext | ModelAccessPointGroup,
|
|
42
|
+
) {
|
|
43
|
+
this.targetMappingPath = targetMappingPath;
|
|
44
|
+
this.dataProductAnalysis = dataProductAnalysis;
|
|
45
|
+
this.targetExecState = targetExecState;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -46,9 +46,16 @@ export class QueryDataSpaceExecutionContext extends QueryExecutionContext {
|
|
|
46
46
|
executionKey: string | undefined;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
export class QueryDataProductExecutionContext extends QueryExecutionContext {
|
|
49
|
+
export abstract class QueryDataProductExecutionContext extends QueryExecutionContext {
|
|
50
50
|
dataProductPath!: string;
|
|
51
|
-
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export class QueryDataProductNativeExecutionContext extends QueryDataProductExecutionContext {
|
|
54
|
+
executionKey!: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export class QueryDataProductModelAccessExecutionContext extends QueryDataProductExecutionContext {
|
|
58
|
+
accessPointGroupId!: string;
|
|
52
59
|
}
|
|
53
60
|
|
|
54
61
|
export interface QueryGridConfig {
|
|
@@ -162,7 +169,12 @@ export class QueryDataSpaceExecutionContextInfo extends QueryExecutionContextInf
|
|
|
162
169
|
|
|
163
170
|
export class QueryDataProductNativeExecutionContextInfo extends QueryExecutionContextInfo {
|
|
164
171
|
dataProductPath!: string;
|
|
165
|
-
executionKey
|
|
172
|
+
executionKey!: string;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export class QueryDataProductModelAccessExecutionContextInfo extends QueryExecutionContextInfo {
|
|
176
|
+
dataProductPath!: string;
|
|
177
|
+
accessPointGroupId!: string;
|
|
166
178
|
}
|
|
167
179
|
|
|
168
180
|
export interface QueryInfo {
|
|
@@ -102,7 +102,7 @@ export const resolveUsableDataProductClasses = (
|
|
|
102
102
|
);
|
|
103
103
|
}
|
|
104
104
|
if (elements?.length) {
|
|
105
|
-
|
|
105
|
+
const filtered = compatibleClasses.filter((_class) => {
|
|
106
106
|
const _classElements = elements
|
|
107
107
|
.filter((e) => matchesDataElement(_class, e.element.value))
|
|
108
108
|
// we sort because we respect the closest definition to the element.
|
|
@@ -114,6 +114,7 @@ export const resolveUsableDataProductClasses = (
|
|
|
114
114
|
}
|
|
115
115
|
return !_classElements[0]?.exclude;
|
|
116
116
|
});
|
|
117
|
+
return filtered;
|
|
117
118
|
}
|
|
118
119
|
return compatibleClasses;
|
|
119
120
|
};
|
|
@@ -147,6 +147,7 @@ import { V1_GenerationSpecification } from './model/packageableElements/generati
|
|
|
147
147
|
import { V1_Mapping } from './model/packageableElements/mapping/V1_Mapping.js';
|
|
148
148
|
import { V1_ConcreteFunctionDefinition } from './model/packageableElements/function/V1_ConcreteFunctionDefinition.js';
|
|
149
149
|
import { V1_PureModelContextComposite } from './model/context/V1_PureModelContextComposite.js';
|
|
150
|
+
import { V1_PureModelContextCombination } from './model/context/V1_PureModelContextCombination.js';
|
|
150
151
|
import { V1_LegendSDLC } from './model/context/V1_SDLC.js';
|
|
151
152
|
import { V1_Protocol } from './model/V1_Protocol.js';
|
|
152
153
|
import type { V1_PureModelContext } from './model/context/V1_PureModelContext.js';
|
|
@@ -211,6 +212,7 @@ import { V1_buildExecutionResult } from './engine/execution/V1_ExecutionHelper.j
|
|
|
211
212
|
import {
|
|
212
213
|
type Entity,
|
|
213
214
|
type EntitiesWithOrigin,
|
|
215
|
+
type ProjectGAVCoordinates,
|
|
214
216
|
ENTITY_PATH_DELIMITER,
|
|
215
217
|
} from '@finos/legend-storage';
|
|
216
218
|
import {
|
|
@@ -219,7 +221,10 @@ import {
|
|
|
219
221
|
PureClientVersion,
|
|
220
222
|
SystemGraphBuilderError,
|
|
221
223
|
} from '../../../../graph-manager/GraphManagerUtils.js';
|
|
222
|
-
import {
|
|
224
|
+
import {
|
|
225
|
+
PackageableElementExplicitReference,
|
|
226
|
+
PackageableElementReference,
|
|
227
|
+
} from '../../../../graph/metamodel/pure/packageableElements/PackageableElementReference.js';
|
|
223
228
|
import type { GraphManagerPluginManager } from '../../../GraphManagerPluginManager.js';
|
|
224
229
|
import type { QuerySearchSpecification } from '../../../../graph-manager/action/query/QuerySearchSpecification.js';
|
|
225
230
|
import type { ExternalFormatDescription } from '../../../../graph-manager/action/externalFormat/ExternalFormatDescription.js';
|
|
@@ -363,6 +368,22 @@ import {
|
|
|
363
368
|
V1_createGenericTypeWithElementPath,
|
|
364
369
|
} from './helpers/V1_DomainHelper.js';
|
|
365
370
|
import { V1_DataProduct } from './model/packageableElements/dataProduct/V1_DataProduct.js';
|
|
371
|
+
import {
|
|
372
|
+
V1_DataProductArtifact,
|
|
373
|
+
V1_ModelAccessPointGroupInfo,
|
|
374
|
+
type V1_NativeModelExecutionContextInfo,
|
|
375
|
+
type V1_MappingGenerationInfo,
|
|
376
|
+
} from './lakehouse/deploy/V1_DataProductArtifact.js';
|
|
377
|
+
import {
|
|
378
|
+
DataProductAnalysisQueryResult,
|
|
379
|
+
DataProductAnalysis,
|
|
380
|
+
} from '../../../action/analytics/data-product/DataProductAnalysis.js';
|
|
381
|
+
import {
|
|
382
|
+
DataProductAccessType,
|
|
383
|
+
ModelAccessPointGroup,
|
|
384
|
+
NativeModelAccess,
|
|
385
|
+
NativeModelExecutionContext,
|
|
386
|
+
} from '../../../../graph/metamodel/pure/dataProduct/DataProduct.js';
|
|
366
387
|
import { V1_MemSQLFunction } from './model/packageableElements/function/V1_MemSQLFunction.js';
|
|
367
388
|
import { LineageModel } from '../../../../graph/metamodel/pure/lineage/LineageModel.js';
|
|
368
389
|
import {
|
|
@@ -2696,18 +2717,29 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
|
|
|
2696
2717
|
);
|
|
2697
2718
|
}
|
|
2698
2719
|
|
|
2699
|
-
public createExecutionInput = (
|
|
2720
|
+
public createExecutionInput = async (
|
|
2700
2721
|
graph: PureModel,
|
|
2701
2722
|
mapping: Mapping | undefined,
|
|
2702
2723
|
lambda: RawLambda,
|
|
2703
2724
|
runtime: Runtime | undefined,
|
|
2704
2725
|
clientVersion: string | undefined,
|
|
2705
2726
|
options?: ExecutionOptions,
|
|
2706
|
-
): V1_ExecuteInput =>
|
|
2707
|
-
|
|
2708
|
-
graph.origin
|
|
2709
|
-
|
|
2710
|
-
|
|
2727
|
+
): Promise<V1_ExecuteInput> => {
|
|
2728
|
+
let context: V1_PureModelContext = graph.origin
|
|
2729
|
+
? this.buildPureModelSDLCPointer(graph.origin, undefined)
|
|
2730
|
+
: this.getFullGraphModelData(graph);
|
|
2731
|
+
if (
|
|
2732
|
+
options?.floatingExecutionElements &&
|
|
2733
|
+
options.floatingExecutionElements.length > 0
|
|
2734
|
+
) {
|
|
2735
|
+
const floatingData = new V1_PureModelContextData();
|
|
2736
|
+
floatingData.elements = options.floatingExecutionElements.map((element) =>
|
|
2737
|
+
this.elementToProtocol(element),
|
|
2738
|
+
);
|
|
2739
|
+
context = new V1_PureModelContextCombination([context, floatingData]);
|
|
2740
|
+
}
|
|
2741
|
+
return this.createExecutionInputWithPureModelContext(
|
|
2742
|
+
context,
|
|
2711
2743
|
mapping,
|
|
2712
2744
|
lambda,
|
|
2713
2745
|
runtime,
|
|
@@ -2715,15 +2747,16 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
|
|
|
2715
2747
|
new V1_ExecuteInput(),
|
|
2716
2748
|
options,
|
|
2717
2749
|
);
|
|
2750
|
+
};
|
|
2718
2751
|
|
|
2719
|
-
public createLineageInput = (
|
|
2752
|
+
public createLineageInput = async (
|
|
2720
2753
|
graph: PureModel,
|
|
2721
2754
|
mapping: Mapping | undefined,
|
|
2722
2755
|
lambda: RawLambda,
|
|
2723
2756
|
runtime: Runtime | undefined,
|
|
2724
2757
|
clientVersion: string | undefined,
|
|
2725
|
-
): V1_LineageInput => {
|
|
2726
|
-
const executionInput = this.createExecutionInput(
|
|
2758
|
+
): Promise<V1_LineageInput> => {
|
|
2759
|
+
const executionInput = await this.createExecutionInput(
|
|
2727
2760
|
graph,
|
|
2728
2761
|
mapping,
|
|
2729
2762
|
lambda,
|
|
@@ -2933,13 +2966,13 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
|
|
|
2933
2966
|
}
|
|
2934
2967
|
|
|
2935
2968
|
async _runQuery(
|
|
2936
|
-
createV1ExecuteInputFunc: () => V1_ExecuteInput
|
|
2969
|
+
createV1ExecuteInputFunc: () => V1_ExecuteInput | Promise<V1_ExecuteInput>,
|
|
2937
2970
|
options?: ExecutionOptions,
|
|
2938
2971
|
_report?: GraphManagerOperationReport,
|
|
2939
2972
|
): Promise<ExecutionResultWithMetadata> {
|
|
2940
2973
|
const report = _report ?? createGraphManagerOperationReport();
|
|
2941
2974
|
const stopWatch = new StopWatch();
|
|
2942
|
-
const input = createV1ExecuteInputFunc();
|
|
2975
|
+
const input = await createV1ExecuteInputFunc();
|
|
2943
2976
|
stopWatch.record(GRAPH_MANAGER_EVENT.V1_ENGINE_OPERATION_INPUT__SUCCESS);
|
|
2944
2977
|
|
|
2945
2978
|
const result = await this.engine.runQuery(input, options);
|
|
@@ -2975,7 +3008,7 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
|
|
|
2975
3008
|
const report = _report ?? createGraphManagerOperationReport();
|
|
2976
3009
|
const stopWatch = new StopWatch();
|
|
2977
3010
|
|
|
2978
|
-
const input = this.createExecutionInput(
|
|
3011
|
+
const input = await this.createExecutionInput(
|
|
2979
3012
|
graph,
|
|
2980
3013
|
mapping,
|
|
2981
3014
|
lambda,
|
|
@@ -3082,7 +3115,7 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
|
|
|
3082
3115
|
const report = _report ?? createGraphManagerOperationReport();
|
|
3083
3116
|
const stopWatch = new StopWatch();
|
|
3084
3117
|
|
|
3085
|
-
const input = this.createExecutionInput(
|
|
3118
|
+
const input = await this.createExecutionInput(
|
|
3086
3119
|
graph,
|
|
3087
3120
|
mapping,
|
|
3088
3121
|
lambda,
|
|
@@ -3116,7 +3149,7 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
|
|
|
3116
3149
|
const report = _report ?? createGraphManagerOperationReport();
|
|
3117
3150
|
const stopWatch = new StopWatch();
|
|
3118
3151
|
|
|
3119
|
-
const input = this.createExecutionInput(
|
|
3152
|
+
const input = await this.createExecutionInput(
|
|
3120
3153
|
graph,
|
|
3121
3154
|
mapping,
|
|
3122
3155
|
lambda,
|
|
@@ -3748,6 +3781,193 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
|
|
|
3748
3781
|
);
|
|
3749
3782
|
}
|
|
3750
3783
|
|
|
3784
|
+
async analyzeDataProductAndBuildMinimalGraph(
|
|
3785
|
+
dataProductPath: string,
|
|
3786
|
+
cacheRetriever: () => Promise<PlainObject>,
|
|
3787
|
+
pureGraph: PureModel,
|
|
3788
|
+
accessPointId: string,
|
|
3789
|
+
dataProductAccessType: DataProductAccessType,
|
|
3790
|
+
projectInfo: ProjectGAVCoordinates,
|
|
3791
|
+
functionEntitiesRetriever?: () => Promise<
|
|
3792
|
+
[PlainObject<Entity>[], PlainObject<Entity>[]]
|
|
3793
|
+
>,
|
|
3794
|
+
graphReport?: GraphManagerOperationReport,
|
|
3795
|
+
): Promise<DataProductAnalysisQueryResult> {
|
|
3796
|
+
// Fetch the data product artifact from cache
|
|
3797
|
+
const artifactJson = await cacheRetriever();
|
|
3798
|
+
const artifact =
|
|
3799
|
+
V1_DataProductArtifact.serialization.fromJson(artifactJson);
|
|
3800
|
+
|
|
3801
|
+
return this.buildDataProductAnalysis(
|
|
3802
|
+
artifact,
|
|
3803
|
+
dataProductPath,
|
|
3804
|
+
pureGraph,
|
|
3805
|
+
accessPointId,
|
|
3806
|
+
dataProductAccessType,
|
|
3807
|
+
projectInfo,
|
|
3808
|
+
graphReport,
|
|
3809
|
+
);
|
|
3810
|
+
}
|
|
3811
|
+
|
|
3812
|
+
async buildDataProductAnalysis(
|
|
3813
|
+
artifact: V1_DataProductArtifact,
|
|
3814
|
+
dataProductPath: string,
|
|
3815
|
+
pureGraph: PureModel,
|
|
3816
|
+
accessPointId: string,
|
|
3817
|
+
dataProductAccessType: DataProductAccessType,
|
|
3818
|
+
projectInfo: ProjectGAVCoordinates,
|
|
3819
|
+
graphReport?: GraphManagerOperationReport,
|
|
3820
|
+
): Promise<DataProductAnalysisQueryResult> {
|
|
3821
|
+
// Collect all mapping generation infos from model access point groups and native model access
|
|
3822
|
+
const allMappingGenInfos = new Map<string, V1_MappingGenerationInfo>();
|
|
3823
|
+
|
|
3824
|
+
const modelAccessPointGroups = artifact.accessPointGroups.filter(
|
|
3825
|
+
(group): group is V1_ModelAccessPointGroupInfo =>
|
|
3826
|
+
group instanceof V1_ModelAccessPointGroupInfo,
|
|
3827
|
+
);
|
|
3828
|
+
for (const group of modelAccessPointGroups) {
|
|
3829
|
+
allMappingGenInfos.set(
|
|
3830
|
+
group.mappingGeneration.path,
|
|
3831
|
+
group.mappingGeneration,
|
|
3832
|
+
);
|
|
3833
|
+
}
|
|
3834
|
+
|
|
3835
|
+
if (artifact.nativeModelAccess?.mappingGenerations) {
|
|
3836
|
+
for (const [path, genInfo] of artifact.nativeModelAccess
|
|
3837
|
+
.mappingGenerations) {
|
|
3838
|
+
if (!allMappingGenInfos.has(path)) {
|
|
3839
|
+
allMappingGenInfos.set(path, genInfo);
|
|
3840
|
+
}
|
|
3841
|
+
}
|
|
3842
|
+
}
|
|
3843
|
+
|
|
3844
|
+
// Resolve mapping path from accessPointId and dataProductAccessType
|
|
3845
|
+
let mappingPath: string | undefined;
|
|
3846
|
+
let accessGroup:
|
|
3847
|
+
| V1_ModelAccessPointGroupInfo
|
|
3848
|
+
| V1_NativeModelExecutionContextInfo
|
|
3849
|
+
| undefined = undefined;
|
|
3850
|
+
if (dataProductAccessType === DataProductAccessType.MODEL) {
|
|
3851
|
+
const group = modelAccessPointGroups.find((g) => g.id === accessPointId);
|
|
3852
|
+
if (group) {
|
|
3853
|
+
mappingPath = group.mappingGeneration.path;
|
|
3854
|
+
accessGroup = group;
|
|
3855
|
+
}
|
|
3856
|
+
} else if (dataProductAccessType === DataProductAccessType.NATIVE) {
|
|
3857
|
+
const nativeCtx =
|
|
3858
|
+
artifact.nativeModelAccess?.nativeModelExecutionContexts.find(
|
|
3859
|
+
(ctx) => ctx.key === accessPointId,
|
|
3860
|
+
);
|
|
3861
|
+
if (nativeCtx) {
|
|
3862
|
+
mappingPath = nativeCtx.mapping;
|
|
3863
|
+
accessGroup = nativeCtx;
|
|
3864
|
+
}
|
|
3865
|
+
}
|
|
3866
|
+
|
|
3867
|
+
if (!mappingPath) {
|
|
3868
|
+
throw new Error(
|
|
3869
|
+
`Can't resolve mapping path for access point '${accessPointId}' (type: ${dataProductAccessType}) in data product '${dataProductPath}'`,
|
|
3870
|
+
);
|
|
3871
|
+
}
|
|
3872
|
+
if (!accessGroup) {
|
|
3873
|
+
throw new Error(
|
|
3874
|
+
`Can't resolve access group for access point '${accessPointId}' (type: ${dataProductAccessType}) in data product '${dataProductPath}'`,
|
|
3875
|
+
);
|
|
3876
|
+
}
|
|
3877
|
+
// Build the minimal graph using ONLY the elements from the resolved mapping
|
|
3878
|
+
const resolvedMappingGenInfo = mappingPath
|
|
3879
|
+
? allMappingGenInfos.get(mappingPath)
|
|
3880
|
+
: undefined;
|
|
3881
|
+
|
|
3882
|
+
if (!resolvedMappingGenInfo) {
|
|
3883
|
+
throw new Error(
|
|
3884
|
+
`Can't find mapping generation info for access point '${accessPointId}' (type: ${dataProductAccessType}) in data product '${dataProductPath}'`,
|
|
3885
|
+
);
|
|
3886
|
+
}
|
|
3887
|
+
|
|
3888
|
+
// Create a dummy mapping for the resolved mapping path
|
|
3889
|
+
const dummyMapping = new V1_Mapping();
|
|
3890
|
+
dummyMapping.package = extractPackagePathFromPath(mappingPath) ?? '';
|
|
3891
|
+
dummyMapping.name = extractElementNameFromPath(mappingPath);
|
|
3892
|
+
|
|
3893
|
+
// Create a dummy data product element
|
|
3894
|
+
const dummyDataProduct = new V1_DataProduct();
|
|
3895
|
+
dummyDataProduct.package =
|
|
3896
|
+
extractPackagePathFromPath(dataProductPath) ?? '';
|
|
3897
|
+
dummyDataProduct.name = extractElementNameFromPath(dataProductPath);
|
|
3898
|
+
dummyDataProduct.title = artifact.dataProduct.title;
|
|
3899
|
+
dummyDataProduct.description = artifact.dataProduct.description;
|
|
3900
|
+
// Build the minimal graph from the resolved mapping's model elements + dummy mapping + dummy data product
|
|
3901
|
+
const graphEntities = resolvedMappingGenInfo.model.elements
|
|
3902
|
+
.concat([dummyMapping])
|
|
3903
|
+
.concat(dummyDataProduct)
|
|
3904
|
+
.filter((el) => !pureGraph.getNullableElement(el.path, false))
|
|
3905
|
+
.map((el) => this.elementProtocolToEntity(el));
|
|
3906
|
+
await this.buildGraph(
|
|
3907
|
+
pureGraph,
|
|
3908
|
+
graphEntities,
|
|
3909
|
+
ActionState.create(),
|
|
3910
|
+
{
|
|
3911
|
+
origin: new LegendSDLC(
|
|
3912
|
+
projectInfo.groupId,
|
|
3913
|
+
projectInfo.artifactId,
|
|
3914
|
+
projectInfo.versionId,
|
|
3915
|
+
),
|
|
3916
|
+
},
|
|
3917
|
+
graphReport,
|
|
3918
|
+
);
|
|
3919
|
+
|
|
3920
|
+
const data = pureGraph.getDataProduct(dataProductPath);
|
|
3921
|
+
// build access point group
|
|
3922
|
+
let exec: ModelAccessPointGroup | NativeModelExecutionContext;
|
|
3923
|
+
if (accessGroup instanceof V1_ModelAccessPointGroupInfo) {
|
|
3924
|
+
const group = new ModelAccessPointGroup();
|
|
3925
|
+
group.id = accessGroup.id;
|
|
3926
|
+
data.accessPointGroups = [group];
|
|
3927
|
+
group.mapping = PackageableElementExplicitReference.create(
|
|
3928
|
+
pureGraph.getMapping(mappingPath),
|
|
3929
|
+
);
|
|
3930
|
+
exec = group;
|
|
3931
|
+
} else {
|
|
3932
|
+
const nativeAccess = new NativeModelExecutionContext();
|
|
3933
|
+
nativeAccess.key = accessGroup.key;
|
|
3934
|
+
nativeAccess.mapping = PackageableElementExplicitReference.create(
|
|
3935
|
+
pureGraph.getMapping(mappingPath),
|
|
3936
|
+
);
|
|
3937
|
+
const na = new NativeModelAccess();
|
|
3938
|
+
na.nativeModelExecutionContexts = [nativeAccess];
|
|
3939
|
+
data.nativeModelAccess = na;
|
|
3940
|
+
exec = nativeAccess;
|
|
3941
|
+
}
|
|
3942
|
+
|
|
3943
|
+
// Build MappingModelCoverageAnalysisResult for the resolved mapping only
|
|
3944
|
+
const mappingToMappingCoverageResult = new Map<
|
|
3945
|
+
string,
|
|
3946
|
+
MappingModelCoverageAnalysisResult
|
|
3947
|
+
>();
|
|
3948
|
+
const v1Result = new V1_MappingModelCoverageAnalysisResult();
|
|
3949
|
+
v1Result.mappedEntities = resolvedMappingGenInfo.mappedEntities;
|
|
3950
|
+
v1Result.model = resolvedMappingGenInfo.model;
|
|
3951
|
+
mappingToMappingCoverageResult.set(
|
|
3952
|
+
mappingPath,
|
|
3953
|
+
V1_buildModelCoverageAnalysisResult(
|
|
3954
|
+
v1Result,
|
|
3955
|
+
this,
|
|
3956
|
+
pureGraph.getMapping(mappingPath),
|
|
3957
|
+
resolvedMappingGenInfo.model,
|
|
3958
|
+
),
|
|
3959
|
+
);
|
|
3960
|
+
|
|
3961
|
+
// Build the analysis result
|
|
3962
|
+
const result = new DataProductAnalysis();
|
|
3963
|
+
result.path = dataProductPath;
|
|
3964
|
+
result.title = artifact.dataProduct.title;
|
|
3965
|
+
result.description = artifact.dataProduct.description;
|
|
3966
|
+
result.mappingToMappingCoverageResult = mappingToMappingCoverageResult;
|
|
3967
|
+
|
|
3968
|
+
return new DataProductAnalysisQueryResult(mappingPath, result, exec);
|
|
3969
|
+
}
|
|
3970
|
+
|
|
3751
3971
|
async buildDatabase(input: DatabaseBuilderInput): Promise<Entity[]> {
|
|
3752
3972
|
const dbBuilderInput = new V1_DatabaseBuilderInput();
|
|
3753
3973
|
dbBuilderInput.connection = V1_transformRelationalDatabaseConnection(
|
|
@@ -4764,7 +4984,7 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
|
|
|
4764
4984
|
const report = _report ?? createGraphManagerOperationReport();
|
|
4765
4985
|
const stopWatch = new StopWatch();
|
|
4766
4986
|
|
|
4767
|
-
const input = this.createLineageInput(
|
|
4987
|
+
const input = await this.createLineageInput(
|
|
4768
4988
|
graph,
|
|
4769
4989
|
mapping,
|
|
4770
4990
|
lambda,
|
|
@@ -32,7 +32,10 @@ import {
|
|
|
32
32
|
type QueryExecutionContextInfo,
|
|
33
33
|
QueryExplicitExecutionContextInfo,
|
|
34
34
|
QueryDataSpaceExecutionContextInfo,
|
|
35
|
-
|
|
35
|
+
QueryDataProductNativeExecutionContext,
|
|
36
|
+
QueryDataProductModelAccessExecutionContext,
|
|
37
|
+
QueryDataProductNativeExecutionContextInfo,
|
|
38
|
+
QueryDataProductModelAccessExecutionContextInfo,
|
|
36
39
|
} from '../../../../../graph-manager/action/query/Query.js';
|
|
37
40
|
import {
|
|
38
41
|
type V1_LightQuery,
|
|
@@ -41,7 +44,8 @@ import {
|
|
|
41
44
|
V1_QueryExplicitExecutionContext,
|
|
42
45
|
V1_QueryDataSpaceExecutionContext,
|
|
43
46
|
type V1_QueryExecutionContext,
|
|
44
|
-
|
|
47
|
+
V1_DataProductNativeExecutionContext,
|
|
48
|
+
V1_DataProductModelAccessExecutionContext,
|
|
45
49
|
} from './query/V1_Query.js';
|
|
46
50
|
import type { PureModel } from '../../../../../graph/PureModel.js';
|
|
47
51
|
import { DEPRECATED__ServiceTestResult } from '../../../../../graph-manager/action/service/DEPRECATED__ServiceTestResult.js';
|
|
@@ -202,6 +206,20 @@ export const V1_buildExecutionContext = (
|
|
|
202
206
|
exec.dataSpacePath = protocolExecContext.dataSpacePath;
|
|
203
207
|
exec.executionKey = protocolExecContext.executionKey;
|
|
204
208
|
return exec;
|
|
209
|
+
} else if (
|
|
210
|
+
protocolExecContext instanceof V1_DataProductNativeExecutionContext
|
|
211
|
+
) {
|
|
212
|
+
const exec = new QueryDataProductNativeExecutionContext();
|
|
213
|
+
exec.dataProductPath = protocolExecContext.dataProductPath;
|
|
214
|
+
exec.executionKey = protocolExecContext.executionKey;
|
|
215
|
+
return exec;
|
|
216
|
+
} else if (
|
|
217
|
+
protocolExecContext instanceof V1_DataProductModelAccessExecutionContext
|
|
218
|
+
) {
|
|
219
|
+
const exec = new QueryDataProductModelAccessExecutionContext();
|
|
220
|
+
exec.dataProductPath = protocolExecContext.dataProductPath;
|
|
221
|
+
exec.accessPointGroupId = protocolExecContext.accessPointGroupId;
|
|
222
|
+
return exec;
|
|
205
223
|
}
|
|
206
224
|
throw new UnsupportedOperationError('Unsupported query execution context');
|
|
207
225
|
};
|
|
@@ -233,6 +251,18 @@ export const V1_buildExecutionContextInfo = (
|
|
|
233
251
|
exec.dataSpacePath = v1_execContext.dataSpacePath;
|
|
234
252
|
exec.executionKey = v1_execContext.executionKey;
|
|
235
253
|
return exec;
|
|
254
|
+
} else if (v1_execContext instanceof V1_DataProductNativeExecutionContext) {
|
|
255
|
+
const exec = new QueryDataProductNativeExecutionContextInfo();
|
|
256
|
+
exec.dataProductPath = v1_execContext.dataProductPath;
|
|
257
|
+
exec.executionKey = v1_execContext.executionKey;
|
|
258
|
+
return exec;
|
|
259
|
+
} else if (
|
|
260
|
+
v1_execContext instanceof V1_DataProductModelAccessExecutionContext
|
|
261
|
+
) {
|
|
262
|
+
const exec = new QueryDataProductModelAccessExecutionContextInfo();
|
|
263
|
+
exec.dataProductPath = v1_execContext.dataProductPath;
|
|
264
|
+
exec.accessPointGroupId = v1_execContext.accessPointGroupId;
|
|
265
|
+
return exec;
|
|
236
266
|
}
|
|
237
267
|
throw new UnsupportedOperationError('Unsupported query execution context');
|
|
238
268
|
};
|
|
@@ -340,11 +370,18 @@ export const V1_transformQueryExecutionContext = (
|
|
|
340
370
|
protocol.dataSpacePath = execContext.dataSpacePath;
|
|
341
371
|
protocol.executionKey = execContext.executionKey;
|
|
342
372
|
return protocol;
|
|
343
|
-
} else if (execContext instanceof
|
|
344
|
-
const protocol = new
|
|
373
|
+
} else if (execContext instanceof QueryDataProductNativeExecutionContext) {
|
|
374
|
+
const protocol = new V1_DataProductNativeExecutionContext();
|
|
345
375
|
protocol.dataProductPath = execContext.dataProductPath;
|
|
346
376
|
protocol.executionKey = execContext.executionKey;
|
|
347
377
|
return protocol;
|
|
378
|
+
} else if (
|
|
379
|
+
execContext instanceof QueryDataProductModelAccessExecutionContext
|
|
380
|
+
) {
|
|
381
|
+
const protocol = new V1_DataProductModelAccessExecutionContext();
|
|
382
|
+
protocol.dataProductPath = execContext.dataProductPath;
|
|
383
|
+
protocol.accessPointGroupId = execContext.accessPointGroupId;
|
|
384
|
+
return protocol;
|
|
348
385
|
}
|
|
349
386
|
throw new UnsupportedOperationError('Unsupported query execution context');
|
|
350
387
|
};
|
|
@@ -65,7 +65,8 @@ 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
|
-
|
|
68
|
+
QUERY_DATAPRODUCT_NATIVE_EXECUTION_CONTEXT = 'dataProductNativeExecutionContext',
|
|
69
|
+
QUERY_DATAPRODUCT_MODEL_ACCESS_EXECUTION_CONTEXT = 'dataProductModelAccessExecutionContext',
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
export class V1_QueryExplicitExecutionContext extends V1_QueryExecutionContext {
|
|
@@ -104,17 +105,37 @@ export class V1_QueryDataSpaceExecutionContext extends V1_QueryExecutionContext
|
|
|
104
105
|
);
|
|
105
106
|
}
|
|
106
107
|
|
|
107
|
-
export class V1_QueryDataProductExecutionContext extends V1_QueryExecutionContext {
|
|
108
|
+
export abstract class V1_QueryDataProductExecutionContext extends V1_QueryExecutionContext {
|
|
108
109
|
dataProductPath!: string;
|
|
109
|
-
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export class V1_DataProductNativeExecutionContext extends V1_QueryDataProductExecutionContext {
|
|
113
|
+
executionKey!: string;
|
|
110
114
|
|
|
111
115
|
static readonly serialization = new SerializationFactory(
|
|
112
|
-
createModelSchema(
|
|
116
|
+
createModelSchema(V1_DataProductNativeExecutionContext, {
|
|
113
117
|
_type: usingConstantValueSchema(
|
|
114
|
-
V1_QueryExecutionContextType.
|
|
118
|
+
V1_QueryExecutionContextType.QUERY_DATAPRODUCT_NATIVE_EXECUTION_CONTEXT,
|
|
115
119
|
),
|
|
116
120
|
dataProductPath: primitive(),
|
|
117
|
-
executionKey:
|
|
121
|
+
executionKey: primitive(),
|
|
122
|
+
}),
|
|
123
|
+
{
|
|
124
|
+
deserializeNullAsUndefined: true,
|
|
125
|
+
},
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export class V1_DataProductModelAccessExecutionContext extends V1_QueryDataProductExecutionContext {
|
|
130
|
+
accessPointGroupId!: string;
|
|
131
|
+
|
|
132
|
+
static readonly serialization = new SerializationFactory(
|
|
133
|
+
createModelSchema(V1_DataProductModelAccessExecutionContext, {
|
|
134
|
+
_type: usingConstantValueSchema(
|
|
135
|
+
V1_QueryExecutionContextType.QUERY_DATAPRODUCT_MODEL_ACCESS_EXECUTION_CONTEXT,
|
|
136
|
+
),
|
|
137
|
+
dataProductPath: primitive(),
|
|
138
|
+
accessPointGroupId: primitive(),
|
|
118
139
|
}),
|
|
119
140
|
{
|
|
120
141
|
deserializeNullAsUndefined: true,
|
|
@@ -136,9 +157,14 @@ export const V1_deserializeQueryExecutionContext = (
|
|
|
136
157
|
V1_QueryDataSpaceExecutionContext.serialization.schema,
|
|
137
158
|
json,
|
|
138
159
|
);
|
|
139
|
-
case V1_QueryExecutionContextType.
|
|
160
|
+
case V1_QueryExecutionContextType.QUERY_DATAPRODUCT_NATIVE_EXECUTION_CONTEXT:
|
|
140
161
|
return deserialize(
|
|
141
|
-
|
|
162
|
+
V1_DataProductNativeExecutionContext.serialization.schema,
|
|
163
|
+
json,
|
|
164
|
+
);
|
|
165
|
+
case V1_QueryExecutionContextType.QUERY_DATAPRODUCT_MODEL_ACCESS_EXECUTION_CONTEXT:
|
|
166
|
+
return deserialize(
|
|
167
|
+
V1_DataProductModelAccessExecutionContext.serialization.schema,
|
|
142
168
|
json,
|
|
143
169
|
);
|
|
144
170
|
default: {
|
|
@@ -162,9 +188,14 @@ export const V1_serializeQueryExecutionContext = (
|
|
|
162
188
|
V1_QueryDataSpaceExecutionContext.serialization.schema,
|
|
163
189
|
protocol,
|
|
164
190
|
);
|
|
165
|
-
} else if (protocol instanceof
|
|
191
|
+
} else if (protocol instanceof V1_DataProductNativeExecutionContext) {
|
|
192
|
+
return serialize(
|
|
193
|
+
V1_DataProductNativeExecutionContext.serialization.schema,
|
|
194
|
+
protocol,
|
|
195
|
+
);
|
|
196
|
+
} else if (protocol instanceof V1_DataProductModelAccessExecutionContext) {
|
|
166
197
|
return serialize(
|
|
167
|
-
|
|
198
|
+
V1_DataProductModelAccessExecutionContext.serialization.schema,
|
|
168
199
|
protocol,
|
|
169
200
|
);
|
|
170
201
|
}
|