UNPKG

@finos/legend-extension-dsl-data-quality

Version:
128 lines 4.37 kB
/** * 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 { PackageableElement, hashRawLambda, } from '@finos/legend-graph'; import { hashArray, uuid } from '@finos/legend-shared'; import { DATA_QUALITY_HASH_STRUCTURE } from '../../../DSL_DataQuality_HashUtils.js'; export var RelationValidationType; (function (RelationValidationType) { RelationValidationType["ROW_LEVEL"] = "ROW_LEVEL"; RelationValidationType["AGGREGATE"] = "AGGREGATE"; })(RelationValidationType || (RelationValidationType = {})); export class DataQualityExecutionContext { } export class DataSpaceDataQualityExecutionContext extends DataQualityExecutionContext { context; dataSpace; get hashCode() { return hashArray([ DATA_QUALITY_HASH_STRUCTURE.DATA_QUALTIY_DATASPACE_EXECUTION_CONTEXT, this.context, this.dataSpace.valueForSerialization ?? '', ]); } } export class MappingAndRuntimeDataQualityExecutionContext extends DataQualityExecutionContext { mapping; runtime; get hashCode() { return hashArray([ DATA_QUALITY_HASH_STRUCTURE.DATA_QUALITY_MAPPING_AND_RUNTIME_EXECUTION_CONTEXT, this.mapping.valueForSerialization ?? '', this.runtime.valueForSerialization ?? '', ]); } } export class DataQualityValidationConfiguration extends PackageableElement { } export class DataQualityClassValidationsConfiguration extends DataQualityValidationConfiguration { context; dataQualityRootGraphFetchTree; filter; get _elementHashCode() { 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 DataQualityServiceValidationConfiguration extends DataQualityValidationConfiguration { serviceName; contextName; dataQualityRootGraphFetchTree; get _elementHashCode() { return hashArray([ DATA_QUALITY_HASH_STRUCTURE.DATA_QUALITY_SERVICE_VALIDATION_CONFIGURATION, this.serviceName ?? '', this.contextName ?? '', this.dataQualityRootGraphFetchTree ?? '', ]); } accept_PackageableElementVisitor(visitor) { return visitor.visit_PackageableElement(this); } } export class 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 DataQualityRelationValidation { _UUID = uuid(); name; description; assertion; type; constructor(name, assertion) { this.name = name; this.assertion = assertion; } get hashCode() { return hashArray([ DATA_QUALITY_HASH_STRUCTURE.DATA_QUALITY_RELATION_VALIDATION, this.name, this.type ?? '', this.description ?? '', this.assertion, ]); } } export class DataQualityRelationValidationConfiguration extends DataQualityValidationConfiguration { query; validations = []; runtime; get _elementHashCode() { return hashArray([ DATA_QUALITY_HASH_STRUCTURE.DATA_QUALITY_RELATION_VALIDATION_CONFIGURATION, this.query, hashArray(this.validations), ]); } accept_PackageableElementVisitor(visitor) { return visitor.visit_PackageableElement(this); } } //# sourceMappingURL=DataQualityValidationConfiguration.js.map