@finos/legend-extension-dsl-data-quality 1.0.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/LICENSE +201 -0
- package/README.md +1 -0
- package/lib/components/DSL_DataQuality_ClassElementDriver.d.ts +46 -0
- package/lib/components/DSL_DataQuality_ClassElementDriver.d.ts.map +1 -0
- package/lib/components/DSL_DataQuality_ClassElementDriver.js +116 -0
- package/lib/components/DSL_DataQuality_ClassElementDriver.js.map +1 -0
- package/lib/components/DSL_DataQuality_LegendStudioApplicationPlugin.d.ts +30 -0
- package/lib/components/DSL_DataQuality_LegendStudioApplicationPlugin.d.ts.map +1 -0
- package/lib/components/DSL_DataQuality_LegendStudioApplicationPlugin.js +161 -0
- package/lib/components/DSL_DataQuality_LegendStudioApplicationPlugin.js.map +1 -0
- package/lib/components/DSL_DataQuality_LegendStudioPlugin_Extension.d.ts +25 -0
- package/lib/components/DSL_DataQuality_LegendStudioPlugin_Extension.d.ts.map +1 -0
- package/lib/components/DSL_DataQuality_LegendStudioPlugin_Extension.js +2 -0
- package/lib/components/DSL_DataQuality_LegendStudioPlugin_Extension.js.map +1 -0
- package/lib/components/DSL_DataQuality_ServiceElementDriver.d.ts +27 -0
- package/lib/components/DSL_DataQuality_ServiceElementDriver.d.ts.map +1 -0
- package/lib/components/DSL_DataQuality_ServiceElementDriver.js +41 -0
- package/lib/components/DSL_DataQuality_ServiceElementDriver.js.map +1 -0
- package/lib/components/DSL_NewDataQualityClassValidationElement.d.ts +19 -0
- package/lib/components/DSL_NewDataQualityClassValidationElement.d.ts.map +1 -0
- package/lib/components/DSL_NewDataQualityClassValidationElement.js +64 -0
- package/lib/components/DSL_NewDataQualityClassValidationElement.js.map +1 -0
- package/lib/components/DSL_NewDataQualityServiceValidationElement.d.ts +19 -0
- package/lib/components/DSL_NewDataQualityServiceValidationElement.d.ts.map +1 -0
- package/lib/components/DSL_NewDataQualityServiceValidationElement.js +41 -0
- package/lib/components/DSL_NewDataQualityServiceValidationElement.js.map +1 -0
- package/lib/components/DataQualityClassValidationEditor.d.ts +19 -0
- package/lib/components/DataQualityClassValidationEditor.d.ts.map +1 -0
- package/lib/components/DataQualityClassValidationEditor.js +29 -0
- package/lib/components/DataQualityClassValidationEditor.js.map +1 -0
- package/lib/components/DataQualityConstraintsSelection.d.ts +39 -0
- package/lib/components/DataQualityConstraintsSelection.d.ts.map +1 -0
- package/lib/components/DataQualityConstraintsSelection.js +133 -0
- package/lib/components/DataQualityConstraintsSelection.js.map +1 -0
- package/lib/components/DataQualityDataSpaceBuilder.d.ts +22 -0
- package/lib/components/DataQualityDataSpaceBuilder.d.ts.map +1 -0
- package/lib/components/DataQualityDataSpaceBuilder.js +101 -0
- package/lib/components/DataQualityDataSpaceBuilder.js.map +1 -0
- package/lib/components/DataQualityExplorerPanel.d.ts +29 -0
- package/lib/components/DataQualityExplorerPanel.d.ts.map +1 -0
- package/lib/components/DataQualityExplorerPanel.js +185 -0
- package/lib/components/DataQualityExplorerPanel.js.map +1 -0
- package/lib/components/DataQualityFilterPanel.d.ts +24 -0
- package/lib/components/DataQualityFilterPanel.d.ts.map +1 -0
- package/lib/components/DataQualityFilterPanel.js +32 -0
- package/lib/components/DataQualityFilterPanel.js.map +1 -0
- package/lib/components/DataQualityMappingAndRuntimeBuilder.d.ts +22 -0
- package/lib/components/DataQualityMappingAndRuntimeBuilder.d.ts.map +1 -0
- package/lib/components/DataQualityMappingAndRuntimeBuilder.js +98 -0
- package/lib/components/DataQualityMappingAndRuntimeBuilder.js.map +1 -0
- package/lib/components/DataQualityResultPanel.d.ts +22 -0
- package/lib/components/DataQualityResultPanel.d.ts.map +1 -0
- package/lib/components/DataQualityResultPanel.js +110 -0
- package/lib/components/DataQualityResultPanel.js.map +1 -0
- package/lib/components/DataQualityResultValues.d.ts +24 -0
- package/lib/components/DataQualityResultValues.d.ts.map +1 -0
- package/lib/components/DataQualityResultValues.js +31 -0
- package/lib/components/DataQualityResultValues.js.map +1 -0
- package/lib/components/DataQualityServiceValidationEditor.d.ts +19 -0
- package/lib/components/DataQualityServiceValidationEditor.d.ts.map +1 -0
- package/lib/components/DataQualityServiceValidationEditor.js +29 -0
- package/lib/components/DataQualityServiceValidationEditor.js.map +1 -0
- package/lib/components/DataQualitySideBar.d.ts +40 -0
- package/lib/components/DataQualitySideBar.d.ts.map +1 -0
- package/lib/components/DataQualitySideBar.js +78 -0
- package/lib/components/DataQualitySideBar.js.map +1 -0
- package/lib/components/DataQualityStructuralValidationsPanel.d.ts +22 -0
- package/lib/components/DataQualityStructuralValidationsPanel.d.ts.map +1 -0
- package/lib/components/DataQualityStructuralValidationsPanel.js +50 -0
- package/lib/components/DataQualityStructuralValidationsPanel.js.map +1 -0
- package/lib/components/DataQualityTabs.d.ts +22 -0
- package/lib/components/DataQualityTabs.d.ts.map +1 -0
- package/lib/components/DataQualityTabs.js +58 -0
- package/lib/components/DataQualityTabs.js.map +1 -0
- package/lib/components/DataQualityValidationEditor.d.ts +23 -0
- package/lib/components/DataQualityValidationEditor.d.ts.map +1 -0
- package/lib/components/DataQualityValidationEditor.js +24 -0
- package/lib/components/DataQualityValidationEditor.js.map +1 -0
- package/lib/components/constants/DataQualityConstants.d.ts +24 -0
- package/lib/components/constants/DataQualityConstants.d.ts.map +1 -0
- package/lib/components/constants/DataQualityConstants.js +25 -0
- package/lib/components/constants/DataQualityConstants.js.map +1 -0
- package/lib/components/index.d.ts +19 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +19 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/states/ConstraintState.d.ts +30 -0
- package/lib/components/states/ConstraintState.d.ts.map +1 -0
- package/lib/components/states/ConstraintState.js +55 -0
- package/lib/components/states/ConstraintState.js.map +1 -0
- package/lib/components/states/DataQualityClassValidationState.d.ts +43 -0
- package/lib/components/states/DataQualityClassValidationState.d.ts.map +1 -0
- package/lib/components/states/DataQualityClassValidationState.js +162 -0
- package/lib/components/states/DataQualityClassValidationState.js.map +1 -0
- package/lib/components/states/DataQualityGraphFetchTreeState.d.ts +34 -0
- package/lib/components/states/DataQualityGraphFetchTreeState.d.ts.map +1 -0
- package/lib/components/states/DataQualityGraphFetchTreeState.js +70 -0
- package/lib/components/states/DataQualityGraphFetchTreeState.js.map +1 -0
- package/lib/components/states/DataQualityQueryBuilderState.d.ts +19 -0
- package/lib/components/states/DataQualityQueryBuilderState.d.ts.map +1 -0
- package/lib/components/states/DataQualityQueryBuilderState.js +19 -0
- package/lib/components/states/DataQualityQueryBuilderState.js.map +1 -0
- package/lib/components/states/DataQualityResultState.d.ts +44 -0
- package/lib/components/states/DataQualityResultState.d.ts.map +1 -0
- package/lib/components/states/DataQualityResultState.js +154 -0
- package/lib/components/states/DataQualityResultState.js.map +1 -0
- package/lib/components/states/DataQualityServiceValidationState.d.ts +25 -0
- package/lib/components/states/DataQualityServiceValidationState.d.ts.map +1 -0
- package/lib/components/states/DataQualityServiceValidationState.js +33 -0
- package/lib/components/states/DataQualityServiceValidationState.js.map +1 -0
- package/lib/components/states/DataQualityState.d.ts +67 -0
- package/lib/components/states/DataQualityState.d.ts.map +1 -0
- package/lib/components/states/DataQualityState.js +204 -0
- package/lib/components/states/DataQualityState.js.map +1 -0
- package/lib/components/utils/DataQualityGraphFetchTreeUtil.d.ts +51 -0
- package/lib/components/utils/DataQualityGraphFetchTreeUtil.d.ts.map +1 -0
- package/lib/components/utils/DataQualityGraphFetchTreeUtil.js +321 -0
- package/lib/components/utils/DataQualityGraphFetchTreeUtil.js.map +1 -0
- package/lib/graph/metamodel/DSL_DataQuality_HashUtils.d.ts +29 -0
- package/lib/graph/metamodel/DSL_DataQuality_HashUtils.d.ts.map +1 -0
- package/lib/graph/metamodel/DSL_DataQuality_HashUtils.js +30 -0
- package/lib/graph/metamodel/DSL_DataQuality_HashUtils.js.map +1 -0
- package/lib/graph/metamodel/DSL_DataQuality_PureGraphPlugin.d.ts +22 -0
- package/lib/graph/metamodel/DSL_DataQuality_PureGraphPlugin.d.ts.map +1 -0
- package/lib/graph/metamodel/DSL_DataQuality_PureGraphPlugin.js +31 -0
- package/lib/graph/metamodel/DSL_DataQuality_PureGraphPlugin.js.map +1 -0
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.d.ts +26 -0
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.d.ts.map +1 -0
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.js +44 -0
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.js.map +1 -0
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.d.ts +47 -0
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.d.ts.map +1 -0
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js +75 -0
- package/lib/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js.map +1 -0
- package/lib/graph-manager/DSL_DataQuality_GraphManagerHelper.d.ts +20 -0
- package/lib/graph-manager/DSL_DataQuality_GraphManagerHelper.d.ts.map +1 -0
- package/lib/graph-manager/DSL_DataQuality_GraphManagerHelper.js +20 -0
- package/lib/graph-manager/DSL_DataQuality_GraphManagerHelper.js.map +1 -0
- package/lib/graph-manager/DSL_DataQuality_GraphManagerPreset.d.ts +20 -0
- package/lib/graph-manager/DSL_DataQuality_GraphManagerPreset.d.ts.map +1 -0
- package/lib/graph-manager/DSL_DataQuality_GraphManagerPreset.js +30 -0
- package/lib/graph-manager/DSL_DataQuality_GraphManagerPreset.js.map +1 -0
- package/lib/graph-manager/DSL_DataQuality_GraphModifierHelper.d.ts +26 -0
- package/lib/graph-manager/DSL_DataQuality_GraphModifierHelper.d.ts.map +1 -0
- package/lib/graph-manager/DSL_DataQuality_GraphModifierHelper.js +57 -0
- package/lib/graph-manager/DSL_DataQuality_GraphModifierHelper.js.map +1 -0
- package/lib/graph-manager/DSL_DataQuality_PureGraphManagerPlugin.d.ts +7 -0
- package/lib/graph-manager/DSL_DataQuality_PureGraphManagerPlugin.d.ts.map +1 -0
- package/lib/graph-manager/DSL_DataQuality_PureGraphManagerPlugin.js +42 -0
- package/lib/graph-manager/DSL_DataQuality_PureGraphManagerPlugin.js.map +1 -0
- package/lib/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.d.ts +24 -0
- package/lib/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.d.ts.map +1 -0
- package/lib/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.js +98 -0
- package/lib/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.js.map +1 -0
- package/lib/graph-manager/index.d.ts +19 -0
- package/lib/graph-manager/index.d.ts.map +1 -0
- package/lib/graph-manager/index.js +19 -0
- package/lib/graph-manager/index.js.map +1 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.d.ts +27 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.js +21 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.js.map +1 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.d.ts +25 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.js +140 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.js.map +1 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_buildGraphManagerExtension.d.ts +18 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_buildGraphManagerExtension.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_buildGraphManagerExtension.js +20 -0
- package/lib/graph-manager/protocol/pure/DSL_DataQuality_buildGraphManagerExtension.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.d.ts +41 -0
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.js +95 -0
- package/lib/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_DataQualityConstraintsConfiguration.d.ts +46 -0
- package/lib/graph-manager/protocol/pure/v1/V1_DataQualityConstraintsConfiguration.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/V1_DataQualityConstraintsConfiguration.js +76 -0
- package/lib/graph-manager/protocol/pure/v1/V1_DataQualityConstraintsConfiguration.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityPropertyGraphFetchTree.d.ts +22 -0
- package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityPropertyGraphFetchTree.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityPropertyGraphFetchTree.js +32 -0
- package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityPropertyGraphFetchTree.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityRootGraphFetchTree.d.ts +22 -0
- package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityRootGraphFetchTree.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityRootGraphFetchTree.js +31 -0
- package/lib/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityRootGraphFetchTree.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationBuilderHelper.d.ts +24 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationBuilderHelper.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationBuilderHelper.js +92 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationBuilderHelper.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationSerializer.d.ts +20 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationSerializer.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationSerializer.js +56 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationSerializer.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationTransformer.d.ts +22 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationTransformer.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationTransformer.js +70 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationTransformer.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.d.ts +29 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.js +80 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.js.map +1 -0
- package/lib/index.css +17 -0
- package/lib/index.css.map +1 -0
- package/lib/package.json +87 -0
- package/package.json +87 -0
- package/src/components/DSL_DataQuality_ClassElementDriver.tsx +175 -0
- package/src/components/DSL_DataQuality_LegendStudioApplicationPlugin.tsx +220 -0
- package/src/components/DSL_DataQuality_LegendStudioPlugin_Extension.ts +39 -0
- package/src/components/DSL_DataQuality_ServiceElementDriver.tsx +57 -0
- package/src/components/DSL_NewDataQualityClassValidationElement.tsx +156 -0
- package/src/components/DSL_NewDataQualityServiceValidationElement.tsx +74 -0
- package/src/components/DataQualityClassValidationEditor.tsx +49 -0
- package/src/components/DataQualityConstraintsSelection.tsx +376 -0
- package/src/components/DataQualityDataSpaceBuilder.tsx +274 -0
- package/src/components/DataQualityExplorerPanel.tsx +584 -0
- package/src/components/DataQualityFilterPanel.tsx +50 -0
- package/src/components/DataQualityMappingAndRuntimeBuilder.tsx +224 -0
- package/src/components/DataQualityResultPanel.tsx +335 -0
- package/src/components/DataQualityResultValues.tsx +61 -0
- package/src/components/DataQualityServiceValidationEditor.tsx +49 -0
- package/src/components/DataQualitySideBar.tsx +216 -0
- package/src/components/DataQualityStructuralValidationsPanel.tsx +105 -0
- package/src/components/DataQualityTabs.tsx +104 -0
- package/src/components/DataQualityValidationEditor.tsx +52 -0
- package/src/components/constants/DataQualityConstants.ts +24 -0
- package/src/components/index.ts +19 -0
- package/src/components/states/ConstraintState.ts +70 -0
- package/src/components/states/DataQualityClassValidationState.ts +308 -0
- package/src/components/states/DataQualityGraphFetchTreeState.ts +125 -0
- package/src/components/states/DataQualityQueryBuilderState.ts +19 -0
- package/src/components/states/DataQualityResultState.ts +217 -0
- package/src/components/states/DataQualityServiceValidationState.ts +56 -0
- package/src/components/states/DataQualityState.ts +354 -0
- package/src/components/utils/DataQualityGraphFetchTreeUtil.ts +592 -0
- package/src/graph/metamodel/DSL_DataQuality_HashUtils.ts +29 -0
- package/src/graph/metamodel/DSL_DataQuality_PureGraphPlugin.ts +36 -0
- package/src/graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.ts +55 -0
- package/src/graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.ts +107 -0
- package/src/graph-manager/DSL_DataQuality_GraphManagerHelper.ts +46 -0
- package/src/graph-manager/DSL_DataQuality_GraphManagerPreset.ts +31 -0
- package/src/graph-manager/DSL_DataQuality_GraphModifierHelper.ts +113 -0
- package/src/graph-manager/DSL_DataQuality_PureGraphManagerPlugin.ts +59 -0
- package/src/graph-manager/action/changeDetection/DSL_DataQuality_ObserverHelper.ts +153 -0
- package/src/graph-manager/index.ts +19 -0
- package/src/graph-manager/protocol/pure/DSL_DataQuality_PureGraphManagerExtension.ts +59 -0
- package/src/graph-manager/protocol/pure/DSL_DataQuality_PureProtocolProcessorPlugin.ts +283 -0
- package/src/graph-manager/protocol/pure/DSL_DataQuality_buildGraphManagerExtension.ts +27 -0
- package/src/graph-manager/protocol/pure/v1/V1_DSL_Data_Quality_PureGraphManagerExtension.ts +246 -0
- package/src/graph-manager/protocol/pure/v1/V1_DataQualityConstraintsConfiguration.ts +103 -0
- package/src/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityPropertyGraphFetchTree.ts +37 -0
- package/src/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityRootGraphFetchTree.ts +36 -0
- package/src/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationBuilderHelper.ts +241 -0
- package/src/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationSerializer.ts +113 -0
- package/src/graph-manager/protocol/pure/v1/transformation/V1_ValueSpecificationTransformer.ts +139 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.ts +186 -0
- package/style/_data-quality-validation-builder.scss +1660 -0
- package/style/index.scss +67 -0
- package/tsconfig.json +137 -0
- package/tsconfig.package.json +9 -0
|
@@ -0,0 +1,283 @@
|
|
|
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 packageJson from '../../../../package.json';
|
|
18
|
+
import { type PlainObject, assertType } from '@finos/legend-shared';
|
|
19
|
+
import {
|
|
20
|
+
V1_DataQualityClassValidationsConfiguration,
|
|
21
|
+
V1_DataQualityServiceValidationsConfiguration,
|
|
22
|
+
} from './v1/V1_DataQualityConstraintsConfiguration.js';
|
|
23
|
+
import {
|
|
24
|
+
DataQualityClassValidationsConfiguration,
|
|
25
|
+
DataQualityServiceValidationConfiguration,
|
|
26
|
+
} from '../../../graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js';
|
|
27
|
+
import {
|
|
28
|
+
getOwnDataQualityClassValidationsConfiguration,
|
|
29
|
+
getOwnDataQualityServiceValidationsConfiguration,
|
|
30
|
+
} from '../../DSL_DataQuality_GraphManagerHelper.js';
|
|
31
|
+
import {
|
|
32
|
+
V1_DATA_QUALITY_PROTOCOL_TYPE,
|
|
33
|
+
V1_DATA_QUALITY_SERVICE_PROTOCOL_TYPE,
|
|
34
|
+
V1_deserializeDataQualityClassValidation,
|
|
35
|
+
V1_deserializeDataQualityServiceValidation,
|
|
36
|
+
V1_serializeDataQualityClassValidation,
|
|
37
|
+
V1_serializeDataQualityServiceValidation,
|
|
38
|
+
} from './v1/transformation/pureProtocol/V1_DSL_DataQuality_ProtocolHelper.js';
|
|
39
|
+
import {
|
|
40
|
+
V1_transformDataQualityExecutionContext,
|
|
41
|
+
V1_transformDataQualityGraphFetchTree,
|
|
42
|
+
} from './v1/transformation/V1_ValueSpecificationTransformer.js';
|
|
43
|
+
import {
|
|
44
|
+
V1_buildDataQualityExecutionContext,
|
|
45
|
+
V1_buildDataQualityGraphFetchTree,
|
|
46
|
+
} from './v1/transformation/V1_ValueSpecificationBuilderHelper.js';
|
|
47
|
+
import type { V1_DataQualityRootGraphFetchTree } from './v1/model/graphFetch/V1_DataQualityRootGraphFetchTree.js';
|
|
48
|
+
import {
|
|
49
|
+
type V1_ElementProtocolClassifierPathGetter,
|
|
50
|
+
type V1_ElementProtocolDeserializer,
|
|
51
|
+
type V1_ElementProtocolSerializer,
|
|
52
|
+
type V1_ElementTransformer,
|
|
53
|
+
type V1_GraphBuilderContext,
|
|
54
|
+
type V1_GraphTransformerContext,
|
|
55
|
+
type V1_PackageableElement,
|
|
56
|
+
type PackageableElement,
|
|
57
|
+
V1_buildFullPath,
|
|
58
|
+
V1_buildRawLambdaWithResolvedPaths,
|
|
59
|
+
V1_initPackageableElement,
|
|
60
|
+
V1_transformRawLambda,
|
|
61
|
+
V1_ElementBuilder,
|
|
62
|
+
V1_ProcessingContext,
|
|
63
|
+
PureProtocolProcessorPlugin,
|
|
64
|
+
} from '@finos/legend-graph';
|
|
65
|
+
import type { DataQualityRootGraphFetchTree } from '../../../graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.js';
|
|
66
|
+
|
|
67
|
+
const DATA_QUALITY_CLASSIFIER_PATH =
|
|
68
|
+
'meta::pure::metamodel::dataquality::DataQuality';
|
|
69
|
+
|
|
70
|
+
export class DSL_DataQuality_PureProtocolProcessorPlugin extends PureProtocolProcessorPlugin {
|
|
71
|
+
constructor() {
|
|
72
|
+
super(
|
|
73
|
+
packageJson.extensions.pureProtocolProcessorPlugin,
|
|
74
|
+
packageJson.version,
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
override V1_getExtraElementBuilders(): V1_ElementBuilder<V1_PackageableElement>[] {
|
|
79
|
+
return [
|
|
80
|
+
new V1_ElementBuilder<V1_DataQualityClassValidationsConfiguration>({
|
|
81
|
+
elementClassName: V1_DATA_QUALITY_PROTOCOL_TYPE,
|
|
82
|
+
_class: V1_DataQualityClassValidationsConfiguration,
|
|
83
|
+
firstPass: (
|
|
84
|
+
elementProtocol: V1_PackageableElement,
|
|
85
|
+
context: V1_GraphBuilderContext,
|
|
86
|
+
): PackageableElement => {
|
|
87
|
+
assertType(
|
|
88
|
+
elementProtocol,
|
|
89
|
+
V1_DataQualityClassValidationsConfiguration,
|
|
90
|
+
);
|
|
91
|
+
const element = new DataQualityClassValidationsConfiguration(
|
|
92
|
+
elementProtocol.name,
|
|
93
|
+
);
|
|
94
|
+
const path = V1_buildFullPath(
|
|
95
|
+
elementProtocol.package,
|
|
96
|
+
elementProtocol.name,
|
|
97
|
+
);
|
|
98
|
+
context.currentSubGraph.setOwnElementInExtension(
|
|
99
|
+
path,
|
|
100
|
+
element,
|
|
101
|
+
DataQualityClassValidationsConfiguration,
|
|
102
|
+
);
|
|
103
|
+
return element;
|
|
104
|
+
},
|
|
105
|
+
secondPass: (
|
|
106
|
+
elementProtocol: V1_PackageableElement,
|
|
107
|
+
context: V1_GraphBuilderContext,
|
|
108
|
+
): void => {
|
|
109
|
+
assertType(
|
|
110
|
+
elementProtocol,
|
|
111
|
+
V1_DataQualityClassValidationsConfiguration,
|
|
112
|
+
);
|
|
113
|
+
const path = V1_buildFullPath(
|
|
114
|
+
elementProtocol.package,
|
|
115
|
+
elementProtocol.name,
|
|
116
|
+
);
|
|
117
|
+
const element = getOwnDataQualityClassValidationsConfiguration(
|
|
118
|
+
path,
|
|
119
|
+
context.currentSubGraph,
|
|
120
|
+
);
|
|
121
|
+
element.context = V1_buildDataQualityExecutionContext(
|
|
122
|
+
elementProtocol.context,
|
|
123
|
+
context,
|
|
124
|
+
);
|
|
125
|
+
element.dataQualityRootGraphFetchTree =
|
|
126
|
+
elementProtocol.dataQualityRootGraphFetchTree
|
|
127
|
+
? (V1_buildDataQualityGraphFetchTree(
|
|
128
|
+
elementProtocol.dataQualityRootGraphFetchTree,
|
|
129
|
+
context,
|
|
130
|
+
undefined,
|
|
131
|
+
[],
|
|
132
|
+
new V1_ProcessingContext(''),
|
|
133
|
+
true,
|
|
134
|
+
) as DataQualityRootGraphFetchTree)
|
|
135
|
+
: undefined;
|
|
136
|
+
element.filter = elementProtocol.filter
|
|
137
|
+
? V1_buildRawLambdaWithResolvedPaths(
|
|
138
|
+
elementProtocol.filter.parameters,
|
|
139
|
+
elementProtocol.filter.body,
|
|
140
|
+
context,
|
|
141
|
+
)
|
|
142
|
+
: undefined;
|
|
143
|
+
},
|
|
144
|
+
}),
|
|
145
|
+
//TODO handle service validations
|
|
146
|
+
new V1_ElementBuilder<V1_DataQualityServiceValidationsConfiguration>({
|
|
147
|
+
elementClassName: 'dataQualityServiceValidations',
|
|
148
|
+
_class: V1_DataQualityServiceValidationsConfiguration,
|
|
149
|
+
firstPass: (
|
|
150
|
+
elementProtocol: V1_PackageableElement,
|
|
151
|
+
context: V1_GraphBuilderContext,
|
|
152
|
+
): PackageableElement => {
|
|
153
|
+
assertType(
|
|
154
|
+
elementProtocol,
|
|
155
|
+
V1_DataQualityServiceValidationsConfiguration,
|
|
156
|
+
);
|
|
157
|
+
const element = new DataQualityServiceValidationConfiguration(
|
|
158
|
+
elementProtocol.name,
|
|
159
|
+
);
|
|
160
|
+
const path = V1_buildFullPath(
|
|
161
|
+
elementProtocol.package,
|
|
162
|
+
elementProtocol.name,
|
|
163
|
+
);
|
|
164
|
+
context.currentSubGraph.setOwnElementInExtension(
|
|
165
|
+
path,
|
|
166
|
+
element,
|
|
167
|
+
DataQualityServiceValidationConfiguration,
|
|
168
|
+
);
|
|
169
|
+
return element;
|
|
170
|
+
},
|
|
171
|
+
secondPass: (
|
|
172
|
+
elementProtocol: V1_PackageableElement,
|
|
173
|
+
context: V1_GraphBuilderContext,
|
|
174
|
+
): void => {
|
|
175
|
+
assertType(
|
|
176
|
+
elementProtocol,
|
|
177
|
+
V1_DataQualityServiceValidationsConfiguration,
|
|
178
|
+
);
|
|
179
|
+
const path = V1_buildFullPath(
|
|
180
|
+
elementProtocol.package,
|
|
181
|
+
elementProtocol.name,
|
|
182
|
+
);
|
|
183
|
+
const element = getOwnDataQualityServiceValidationsConfiguration(
|
|
184
|
+
path,
|
|
185
|
+
context.currentSubGraph,
|
|
186
|
+
);
|
|
187
|
+
element.contextName = elementProtocol.contextName;
|
|
188
|
+
element.serviceName = elementProtocol.serviceName;
|
|
189
|
+
element.dataQualityRootGraphFetchTree =
|
|
190
|
+
elementProtocol.dataQualityRootGraphFetchTree
|
|
191
|
+
? (V1_buildDataQualityGraphFetchTree(
|
|
192
|
+
elementProtocol.dataQualityRootGraphFetchTree,
|
|
193
|
+
context,
|
|
194
|
+
undefined,
|
|
195
|
+
[],
|
|
196
|
+
new V1_ProcessingContext(''),
|
|
197
|
+
true,
|
|
198
|
+
) as DataQualityRootGraphFetchTree)
|
|
199
|
+
: undefined;
|
|
200
|
+
},
|
|
201
|
+
}),
|
|
202
|
+
];
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
override V1_getExtraElementClassifierPathGetters(): V1_ElementProtocolClassifierPathGetter[] {
|
|
206
|
+
return [
|
|
207
|
+
(protocol: V1_PackageableElement): string | undefined => {
|
|
208
|
+
if (protocol instanceof V1_DataQualityClassValidationsConfiguration) {
|
|
209
|
+
return DATA_QUALITY_CLASSIFIER_PATH;
|
|
210
|
+
}
|
|
211
|
+
return undefined;
|
|
212
|
+
},
|
|
213
|
+
];
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
override V1_getExtraElementProtocolSerializers(): V1_ElementProtocolSerializer[] {
|
|
217
|
+
return [
|
|
218
|
+
(
|
|
219
|
+
protocol: V1_PackageableElement,
|
|
220
|
+
plugins: PureProtocolProcessorPlugin[],
|
|
221
|
+
): PlainObject<V1_PackageableElement> | undefined => {
|
|
222
|
+
if (protocol instanceof V1_DataQualityClassValidationsConfiguration) {
|
|
223
|
+
return V1_serializeDataQualityClassValidation(protocol);
|
|
224
|
+
}
|
|
225
|
+
if (protocol instanceof V1_DataQualityServiceValidationsConfiguration) {
|
|
226
|
+
return V1_serializeDataQualityServiceValidation(protocol);
|
|
227
|
+
}
|
|
228
|
+
return undefined;
|
|
229
|
+
},
|
|
230
|
+
];
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
override V1_getExtraElementProtocolDeserializers(): V1_ElementProtocolDeserializer[] {
|
|
234
|
+
return [
|
|
235
|
+
(
|
|
236
|
+
json: PlainObject<V1_PackageableElement>,
|
|
237
|
+
plugins: PureProtocolProcessorPlugin[],
|
|
238
|
+
): V1_PackageableElement | undefined => {
|
|
239
|
+
if (json._type === V1_DATA_QUALITY_PROTOCOL_TYPE) {
|
|
240
|
+
return V1_deserializeDataQualityClassValidation(json);
|
|
241
|
+
}
|
|
242
|
+
if (json._type === V1_DATA_QUALITY_SERVICE_PROTOCOL_TYPE) {
|
|
243
|
+
return V1_deserializeDataQualityServiceValidation(json);
|
|
244
|
+
}
|
|
245
|
+
return undefined;
|
|
246
|
+
},
|
|
247
|
+
];
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
override V1_getExtraElementTransformers(): V1_ElementTransformer[] {
|
|
251
|
+
return [
|
|
252
|
+
(
|
|
253
|
+
metamodel: PackageableElement,
|
|
254
|
+
context: V1_GraphTransformerContext,
|
|
255
|
+
): V1_PackageableElement | undefined => {
|
|
256
|
+
if (metamodel instanceof DataQualityClassValidationsConfiguration) {
|
|
257
|
+
const protocol = new V1_DataQualityClassValidationsConfiguration();
|
|
258
|
+
V1_initPackageableElement(protocol, metamodel);
|
|
259
|
+
protocol.name = metamodel.name;
|
|
260
|
+
protocol.package = metamodel.package?.path ?? '';
|
|
261
|
+
protocol.dataQualityRootGraphFetchTree =
|
|
262
|
+
metamodel.dataQualityRootGraphFetchTree
|
|
263
|
+
? (V1_transformDataQualityGraphFetchTree(
|
|
264
|
+
metamodel.dataQualityRootGraphFetchTree,
|
|
265
|
+
[],
|
|
266
|
+
new Map<string, unknown[]>(),
|
|
267
|
+
false,
|
|
268
|
+
false,
|
|
269
|
+
) as V1_DataQualityRootGraphFetchTree)
|
|
270
|
+
: undefined;
|
|
271
|
+
protocol.context = V1_transformDataQualityExecutionContext(
|
|
272
|
+
metamodel.context,
|
|
273
|
+
);
|
|
274
|
+
protocol.filter = metamodel.filter
|
|
275
|
+
? V1_transformRawLambda(metamodel.filter, context)
|
|
276
|
+
: undefined;
|
|
277
|
+
return protocol;
|
|
278
|
+
}
|
|
279
|
+
return undefined;
|
|
280
|
+
},
|
|
281
|
+
];
|
|
282
|
+
}
|
|
283
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
AbstractPureGraphManager,
|
|
19
|
+
AbstractPureGraphManagerExtension,
|
|
20
|
+
} from '@finos/legend-graph';
|
|
21
|
+
import { V1_DSL_Data_Quality_PureGraphManagerExtension } from './v1/V1_DSL_Data_Quality_PureGraphManagerExtension.js';
|
|
22
|
+
|
|
23
|
+
export const DSL_DataQuality_buildGraphManagerExtension = (
|
|
24
|
+
graphManager: AbstractPureGraphManager,
|
|
25
|
+
): AbstractPureGraphManagerExtension =>
|
|
26
|
+
// NOTE: until we support more client versions, we always default to return V1
|
|
27
|
+
new V1_DSL_Data_Quality_PureGraphManagerExtension(graphManager);
|
|
@@ -0,0 +1,246 @@
|
|
|
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 {
|
|
18
|
+
type AbstractPureGraphManager,
|
|
19
|
+
type RawExecutionPlan,
|
|
20
|
+
type ExecutionResult,
|
|
21
|
+
type PureModel,
|
|
22
|
+
type RootGraphFetchTree,
|
|
23
|
+
type GraphDataOrigin,
|
|
24
|
+
type V1_RootGraphFetchTree,
|
|
25
|
+
type V1_PureModelContext,
|
|
26
|
+
LegendSDLC,
|
|
27
|
+
PureClientVersion,
|
|
28
|
+
V1_GraphBuilderContextBuilder,
|
|
29
|
+
V1_LegendSDLC,
|
|
30
|
+
V1_ProcessingContext,
|
|
31
|
+
V1_Protocol,
|
|
32
|
+
V1_PureGraphManager,
|
|
33
|
+
V1_PureModelContextPointer,
|
|
34
|
+
V1_pureModelContextPropSchema,
|
|
35
|
+
} from '@finos/legend-graph';
|
|
36
|
+
import { createModelSchema, optional, primitive } from 'serializr';
|
|
37
|
+
import {
|
|
38
|
+
guaranteeType,
|
|
39
|
+
SerializationFactory,
|
|
40
|
+
UnsupportedOperationError,
|
|
41
|
+
} from '@finos/legend-shared';
|
|
42
|
+
import { DSL_DataQuality_PureGraphManagerExtension } from '../DSL_DataQuality_PureGraphManagerExtension.js';
|
|
43
|
+
import {
|
|
44
|
+
V1_transformRootGraphFetchTreeToDataQualityRootGraphFetchTree,
|
|
45
|
+
V1_buildDataQualityGraphFetchTree,
|
|
46
|
+
} from './transformation/V1_ValueSpecificationBuilderHelper.js';
|
|
47
|
+
import type { DataQualityRootGraphFetchTree } from '../../../../graph/metamodel/pure/packageableElements/data-quality/DataQualityGraphFetchTree.js';
|
|
48
|
+
|
|
49
|
+
const DQ_GENERATE_EXECUTION_PLAN = 'generate execution plan';
|
|
50
|
+
const DQ_EXECUTE_PLAN = 'execute plan';
|
|
51
|
+
const DQ_DEBUG_EXECUTION_PLAN = 'debug execution plan';
|
|
52
|
+
const DQ_FETCH_PROPERTY_PATH_TREE = 'dq fetch property path tree';
|
|
53
|
+
|
|
54
|
+
export class V1_DQExecuteInput {
|
|
55
|
+
clientVersion: string | undefined;
|
|
56
|
+
model!: V1_PureModelContext;
|
|
57
|
+
packagePath!: string;
|
|
58
|
+
queryLimit: number | undefined;
|
|
59
|
+
|
|
60
|
+
static readonly serialization = new SerializationFactory(
|
|
61
|
+
createModelSchema(V1_DQExecuteInput, {
|
|
62
|
+
clientVersion: optional(primitive()),
|
|
63
|
+
model: V1_pureModelContextPropSchema,
|
|
64
|
+
packagePath: primitive(),
|
|
65
|
+
queryLimit: optional(primitive()),
|
|
66
|
+
}),
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export class V1_DSL_Data_Quality_PureGraphManagerExtension extends DSL_DataQuality_PureGraphManagerExtension {
|
|
71
|
+
declare graphManager: V1_PureGraphManager;
|
|
72
|
+
static readonly DEV_PROTOCOL_VERSION = PureClientVersion.VX_X_X;
|
|
73
|
+
|
|
74
|
+
constructor(graphManager: AbstractPureGraphManager) {
|
|
75
|
+
super(graphManager);
|
|
76
|
+
this.graphManager = guaranteeType(graphManager, V1_PureGraphManager);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
getSupportedProtocolVersion(): string {
|
|
80
|
+
return PureClientVersion.V1_0_0;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
private buildPureModelSDLCPointer(
|
|
84
|
+
origin: GraphDataOrigin,
|
|
85
|
+
clientVersion: string | undefined,
|
|
86
|
+
): V1_PureModelContextPointer {
|
|
87
|
+
if (origin instanceof LegendSDLC) {
|
|
88
|
+
return new V1_PureModelContextPointer(
|
|
89
|
+
clientVersion
|
|
90
|
+
? new V1_Protocol(
|
|
91
|
+
V1_PureGraphManager.PURE_PROTOCOL_NAME,
|
|
92
|
+
clientVersion,
|
|
93
|
+
)
|
|
94
|
+
: undefined,
|
|
95
|
+
new V1_LegendSDLC(origin.groupId, origin.artifactId, origin.versionId),
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
throw new UnsupportedOperationError('Unsupported graph origin');
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
createExecutionInput(
|
|
102
|
+
graph: PureModel,
|
|
103
|
+
packagePath: string,
|
|
104
|
+
clientVersion: string | undefined,
|
|
105
|
+
previewLimit: number | undefined,
|
|
106
|
+
dqExecuteInput: V1_DQExecuteInput,
|
|
107
|
+
): V1_DQExecuteInput {
|
|
108
|
+
dqExecuteInput.clientVersion = clientVersion;
|
|
109
|
+
dqExecuteInput.model = graph.origin
|
|
110
|
+
? this.buildPureModelSDLCPointer(graph.origin, undefined)
|
|
111
|
+
: this.graphManager.getFullGraphModelData(graph);
|
|
112
|
+
dqExecuteInput.packagePath = packagePath;
|
|
113
|
+
dqExecuteInput.queryLimit = previewLimit;
|
|
114
|
+
return dqExecuteInput;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
generatePlan = async (
|
|
118
|
+
graph: PureModel,
|
|
119
|
+
packagePath: string,
|
|
120
|
+
): Promise<RawExecutionPlan> => {
|
|
121
|
+
const input = this.createExecutionInput(
|
|
122
|
+
graph,
|
|
123
|
+
packagePath,
|
|
124
|
+
V1_DSL_Data_Quality_PureGraphManagerExtension.DEV_PROTOCOL_VERSION,
|
|
125
|
+
undefined,
|
|
126
|
+
new V1_DQExecuteInput(),
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
const serializedInput = V1_DQExecuteInput.serialization.toJson(input);
|
|
130
|
+
|
|
131
|
+
const engineServerClient = this.graphManager.engine.getEngineServerClient();
|
|
132
|
+
|
|
133
|
+
return engineServerClient.postWithTracing(
|
|
134
|
+
engineServerClient.getTraceData(DQ_GENERATE_EXECUTION_PLAN),
|
|
135
|
+
`${engineServerClient._pure()}/dataquality/generatePlan`,
|
|
136
|
+
serializedInput,
|
|
137
|
+
{},
|
|
138
|
+
undefined,
|
|
139
|
+
undefined,
|
|
140
|
+
{ enableCompression: true },
|
|
141
|
+
);
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
execute = async (
|
|
145
|
+
graph: PureModel,
|
|
146
|
+
packagePath: string,
|
|
147
|
+
previewLimit: number,
|
|
148
|
+
): Promise<ExecutionResult> => {
|
|
149
|
+
const input = this.createExecutionInput(
|
|
150
|
+
graph,
|
|
151
|
+
packagePath,
|
|
152
|
+
V1_DSL_Data_Quality_PureGraphManagerExtension.DEV_PROTOCOL_VERSION,
|
|
153
|
+
previewLimit,
|
|
154
|
+
new V1_DQExecuteInput(),
|
|
155
|
+
);
|
|
156
|
+
|
|
157
|
+
const serializedInput = V1_DQExecuteInput.serialization.toJson(input);
|
|
158
|
+
const engineServerClient = this.graphManager.engine.getEngineServerClient();
|
|
159
|
+
|
|
160
|
+
return engineServerClient.postWithTracing(
|
|
161
|
+
engineServerClient.getTraceData(DQ_EXECUTE_PLAN),
|
|
162
|
+
`${engineServerClient._pure()}/dataquality/execute`,
|
|
163
|
+
serializedInput,
|
|
164
|
+
{},
|
|
165
|
+
undefined,
|
|
166
|
+
undefined,
|
|
167
|
+
{ enableCompression: true },
|
|
168
|
+
);
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
debugExecutionPlanGeneration = async (
|
|
172
|
+
graph: PureModel,
|
|
173
|
+
packagePath: string,
|
|
174
|
+
): Promise<{ plan: RawExecutionPlan; debug: string }> => {
|
|
175
|
+
const input = this.createExecutionInput(
|
|
176
|
+
graph,
|
|
177
|
+
packagePath,
|
|
178
|
+
V1_DSL_Data_Quality_PureGraphManagerExtension.DEV_PROTOCOL_VERSION,
|
|
179
|
+
undefined,
|
|
180
|
+
new V1_DQExecuteInput(),
|
|
181
|
+
);
|
|
182
|
+
|
|
183
|
+
const serializedInput = V1_DQExecuteInput.serialization.toJson(input);
|
|
184
|
+
const engineServerClient = this.graphManager.engine.getEngineServerClient();
|
|
185
|
+
|
|
186
|
+
const result: { plan: RawExecutionPlan; debug: string[] } =
|
|
187
|
+
await engineServerClient.postWithTracing(
|
|
188
|
+
engineServerClient.getTraceData(DQ_DEBUG_EXECUTION_PLAN),
|
|
189
|
+
`${engineServerClient._pure()}/dataquality/debugPlan`,
|
|
190
|
+
serializedInput,
|
|
191
|
+
{},
|
|
192
|
+
undefined,
|
|
193
|
+
undefined,
|
|
194
|
+
{ enableCompression: true },
|
|
195
|
+
);
|
|
196
|
+
return {
|
|
197
|
+
plan: result.plan,
|
|
198
|
+
debug: result.debug.join('\n'),
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
fetchStructuralValidations = async (
|
|
203
|
+
graph: PureModel,
|
|
204
|
+
packagePath: string,
|
|
205
|
+
): Promise<RootGraphFetchTree> => {
|
|
206
|
+
const engineServerClient = this.graphManager.engine.getEngineServerClient();
|
|
207
|
+
const input = this.createExecutionInput(
|
|
208
|
+
graph,
|
|
209
|
+
packagePath,
|
|
210
|
+
V1_DSL_Data_Quality_PureGraphManagerExtension.DEV_PROTOCOL_VERSION,
|
|
211
|
+
undefined,
|
|
212
|
+
new V1_DQExecuteInput(),
|
|
213
|
+
);
|
|
214
|
+
|
|
215
|
+
const serializedInput = V1_DQExecuteInput.serialization.toJson(input);
|
|
216
|
+
const V1_rootGraphFetchTree: V1_RootGraphFetchTree =
|
|
217
|
+
await engineServerClient.postWithTracing(
|
|
218
|
+
engineServerClient.getTraceData(DQ_FETCH_PROPERTY_PATH_TREE),
|
|
219
|
+
`${engineServerClient._pure()}/dataquality/propertyPathTree`,
|
|
220
|
+
serializedInput,
|
|
221
|
+
{},
|
|
222
|
+
undefined,
|
|
223
|
+
undefined,
|
|
224
|
+
{ enableCompression: true },
|
|
225
|
+
);
|
|
226
|
+
|
|
227
|
+
const V1_dataQualityRootGraphFetchTree =
|
|
228
|
+
V1_transformRootGraphFetchTreeToDataQualityRootGraphFetchTree(
|
|
229
|
+
V1_rootGraphFetchTree,
|
|
230
|
+
);
|
|
231
|
+
const context = new V1_GraphBuilderContextBuilder(
|
|
232
|
+
graph,
|
|
233
|
+
graph,
|
|
234
|
+
this.graphManager.graphBuilderExtensions,
|
|
235
|
+
this.graphManager.logService,
|
|
236
|
+
).build();
|
|
237
|
+
return V1_buildDataQualityGraphFetchTree(
|
|
238
|
+
V1_dataQualityRootGraphFetchTree,
|
|
239
|
+
context,
|
|
240
|
+
undefined,
|
|
241
|
+
[],
|
|
242
|
+
new V1_ProcessingContext(''),
|
|
243
|
+
true,
|
|
244
|
+
) as DataQualityRootGraphFetchTree;
|
|
245
|
+
};
|
|
246
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
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 {
|
|
18
|
+
type V1_PackageableElementVisitor,
|
|
19
|
+
type V1_PackageableElementPointer,
|
|
20
|
+
type V1_RawLambda,
|
|
21
|
+
V1_PackageableElement,
|
|
22
|
+
} from '@finos/legend-graph';
|
|
23
|
+
import { type Hashable, hashArray } from '@finos/legend-shared';
|
|
24
|
+
import { DATA_QUALITY_HASH_STRUCTURE } from '../../../../graph/metamodel/DSL_DataQuality_HashUtils.js';
|
|
25
|
+
import { type V1_DataQualityRootGraphFetchTree } from './model/graphFetch/V1_DataQualityRootGraphFetchTree.js';
|
|
26
|
+
|
|
27
|
+
export abstract class V1_DataQualityExecutionContext implements Hashable {
|
|
28
|
+
abstract get hashCode(): string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export class V1_DataSpaceDataQualityExecutionContext extends V1_DataQualityExecutionContext {
|
|
32
|
+
context!: string;
|
|
33
|
+
dataSpace!: V1_PackageableElementPointer;
|
|
34
|
+
|
|
35
|
+
override get hashCode(): string {
|
|
36
|
+
return hashArray([
|
|
37
|
+
DATA_QUALITY_HASH_STRUCTURE.DATA_QUALTIY_DATASPACE_EXECUTION_CONTEXT,
|
|
38
|
+
this.context,
|
|
39
|
+
this.dataSpace.path,
|
|
40
|
+
]);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export class V1_MappingAndRuntimeDataQualityExecutionContext extends V1_DataQualityExecutionContext {
|
|
45
|
+
mapping!: V1_PackageableElementPointer;
|
|
46
|
+
runtime!: V1_PackageableElementPointer;
|
|
47
|
+
|
|
48
|
+
override get hashCode(): string {
|
|
49
|
+
return hashArray([
|
|
50
|
+
DATA_QUALITY_HASH_STRUCTURE.DATA_QUALITY_MAPPING_AND_RUNTIME_EXECUTION_CONTEXT,
|
|
51
|
+
this.mapping.path,
|
|
52
|
+
this.runtime.path,
|
|
53
|
+
]);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export class V1_DataQualityClassValidationsConfiguration
|
|
58
|
+
extends V1_PackageableElement
|
|
59
|
+
implements Hashable
|
|
60
|
+
{
|
|
61
|
+
context!: V1_DataQualityExecutionContext;
|
|
62
|
+
dataQualityRootGraphFetchTree: V1_DataQualityRootGraphFetchTree | undefined;
|
|
63
|
+
filter?: V1_RawLambda | undefined;
|
|
64
|
+
|
|
65
|
+
override get hashCode(): string {
|
|
66
|
+
return hashArray([
|
|
67
|
+
DATA_QUALITY_HASH_STRUCTURE.DATA_QUALITY_CONSTRAINTS_CONFIGURATION,
|
|
68
|
+
this.context,
|
|
69
|
+
this.filter ?? '',
|
|
70
|
+
this.dataQualityRootGraphFetchTree ?? '',
|
|
71
|
+
]);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
accept_PackageableElementVisitor<T>(
|
|
75
|
+
visitor: V1_PackageableElementVisitor<T>,
|
|
76
|
+
): T {
|
|
77
|
+
return visitor.visit_PackageableElement(this);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export class V1_DataQualityServiceValidationsConfiguration
|
|
82
|
+
extends V1_PackageableElement
|
|
83
|
+
implements Hashable
|
|
84
|
+
{
|
|
85
|
+
contextName?: string | undefined;
|
|
86
|
+
serviceName?: string | undefined;
|
|
87
|
+
dataQualityRootGraphFetchTree?: V1_DataQualityRootGraphFetchTree | undefined;
|
|
88
|
+
|
|
89
|
+
override get hashCode(): string {
|
|
90
|
+
return hashArray([
|
|
91
|
+
DATA_QUALITY_HASH_STRUCTURE.DATA_QUALITY_SERVICE_VALIDATION_CONFIGURATION,
|
|
92
|
+
this.contextName ?? '',
|
|
93
|
+
this.serviceName ?? '',
|
|
94
|
+
this.dataQualityRootGraphFetchTree ?? '',
|
|
95
|
+
]);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
accept_PackageableElementVisitor<T>(
|
|
99
|
+
visitor: V1_PackageableElementVisitor<T>,
|
|
100
|
+
): T {
|
|
101
|
+
return visitor.visit_PackageableElement(this);
|
|
102
|
+
}
|
|
103
|
+
}
|
package/src/graph-manager/protocol/pure/v1/model/graphFetch/V1_DataQualityPropertyGraphFetchTree.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
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 { V1_PropertyGraphFetchTree } from '@finos/legend-graph';
|
|
18
|
+
import { type Hashable, hashArray } from '@finos/legend-shared';
|
|
19
|
+
import { DATA_QUALITY_HASH_STRUCTURE } from '../../../../../../graph/metamodel/DSL_DataQuality_HashUtils.js';
|
|
20
|
+
|
|
21
|
+
export class V1_DataQualityPropertyGraphFetchTree
|
|
22
|
+
extends V1_PropertyGraphFetchTree
|
|
23
|
+
implements Hashable
|
|
24
|
+
{
|
|
25
|
+
constraints: string[] = [];
|
|
26
|
+
|
|
27
|
+
override get hashCode(): string {
|
|
28
|
+
return hashArray([
|
|
29
|
+
DATA_QUALITY_HASH_STRUCTURE.DATA_QUALITY_PROPERTY_GRAPH_FETCH_TREE,
|
|
30
|
+
hashArray(this.subTrees),
|
|
31
|
+
this.property,
|
|
32
|
+
this.alias ?? '',
|
|
33
|
+
this.subType ?? '',
|
|
34
|
+
hashArray(this.constraints),
|
|
35
|
+
]);
|
|
36
|
+
}
|
|
37
|
+
}
|