@finos/legend-extension-dsl-data-quality
Version:
Legend extension for Data Quality
161 lines • 5.37 kB
JavaScript
/**
* Copyright (c) 2020-present, Goldman Sachs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { hashRawLambda, V1_PackageableElement, } from '@finos/legend-graph';
import { hashArray } from '@finos/legend-shared';
import { DATA_QUALITY_HASH_STRUCTURE } from '../../../../graph/metamodel/DSL_DataQuality_HashUtils.js';
import {} from './model/graphFetch/V1_DataQualityRootGraphFetchTree.js';
import {} from '../../../../graph/metamodel/pure/packageableElements/data-quality/DataQualityValidationConfiguration.js';
export class V1_DataQualityExecutionContext {
}
export class V1_DataSpaceDataQualityExecutionContext extends V1_DataQualityExecutionContext {
context;
dataSpace;
get hashCode() {
return hashArray([
DATA_QUALITY_HASH_STRUCTURE.DATA_QUALTIY_DATASPACE_EXECUTION_CONTEXT,
this.context,
this.dataSpace.path,
]);
}
}
export class V1_MappingAndRuntimeDataQualityExecutionContext extends V1_DataQualityExecutionContext {
mapping;
runtime;
get hashCode() {
return hashArray([
DATA_QUALITY_HASH_STRUCTURE.DATA_QUALITY_MAPPING_AND_RUNTIME_EXECUTION_CONTEXT,
this.mapping.path,
this.runtime.path,
]);
}
}
export class V1_DataQualityRelationValidation {
name;
description;
assertion;
type;
get hashCode() {
return hashArray([
DATA_QUALITY_HASH_STRUCTURE.DATA_QUALITY_RELATION_VALIDATION,
this.name,
this.type ?? '',
this.description ?? '',
this.assertion,
]);
}
}
export class V1_DataQualityValidationsConfiguration extends V1_PackageableElement {
}
export class V1_DataQualityClassValidationsConfiguration extends V1_DataQualityValidationsConfiguration {
context;
dataQualityRootGraphFetchTree;
filter;
taggedValues = [];
stereotypes = [];
get hashCode() {
return hashArray([
DATA_QUALITY_HASH_STRUCTURE.DATA_QUALITY_CONSTRAINTS_CONFIGURATION,
this.context,
this.filter ?? '',
this.dataQualityRootGraphFetchTree ?? '',
]);
}
accept_PackageableElementVisitor(visitor) {
return visitor.visit_PackageableElement(this);
}
}
export class V1_DataQualityServiceValidationsConfiguration extends V1_DataQualityValidationsConfiguration {
contextName;
serviceName;
dataQualityRootGraphFetchTree;
get hashCode() {
return hashArray([
DATA_QUALITY_HASH_STRUCTURE.DATA_QUALITY_SERVICE_VALIDATION_CONFIGURATION,
this.contextName ?? '',
this.serviceName ?? '',
this.dataQualityRootGraphFetchTree ?? '',
]);
}
accept_PackageableElementVisitor(visitor) {
return visitor.visit_PackageableElement(this);
}
}
export class V1_DataQualityRelationQueryLambda {
body;
parameters = [];
get hashCode() {
return hashArray([
DATA_QUALITY_HASH_STRUCTURE.DATA_QUALITY_RELATION_VALIDATION_QUERY,
hashArray(this.parameters),
hashRawLambda(undefined, this.body),
]);
}
}
export class V1_DataQualityRelationValidationsConfiguration extends V1_DataQualityValidationsConfiguration {
query;
validations = [];
runtime;
taggedValues = [];
stereotypes = [];
get hashCode() {
return hashArray([
DATA_QUALITY_HASH_STRUCTURE.DATA_QUALITY_RELATION_VALIDATION_CONFIGURATION,
this.query,
hashArray(this.validations),
]);
}
accept_PackageableElementVisitor(visitor) {
return visitor.visit_PackageableElement(this);
}
}
export class V1_ReconStrategy {
}
export class V1_MD5HashStrategy extends V1_ReconStrategy {
sourceHashColumn;
targetHashColumn;
aggregatedHash;
get hashCode() {
return hashArray([
DATA_QUALITY_HASH_STRUCTURE.DATA_QUALITY_MD5_HASH_STRATEGY,
this.sourceHashColumn ?? '',
this.targetHashColumn ?? '',
this.aggregatedHash ?? false,
]);
}
}
export class V1_DataQualityRelationComparisonConfiguration extends V1_DataQualityValidationsConfiguration {
source;
target;
keys = [];
columnsToCompare = [];
strategy;
expectedMatch;
get hashCode() {
return hashArray([
DATA_QUALITY_HASH_STRUCTURE.DATA_QUALITY_RELATION_COMPARISON_HASH_STRUCTURE,
this.source,
this.target,
hashArray(this.keys),
hashArray(this.columnsToCompare),
String(this.expectedMatch ?? ''),
this.strategy,
]);
}
accept_PackageableElementVisitor(visitor) {
return visitor.visit_PackageableElement(this);
}
}
//# sourceMappingURL=V1_DataQualityValidationConfiguration.js.map