@finos/legend-extension-dsl-data-quality
Version:
Legend extension for Data Quality
111 lines • 5.7 kB
TypeScript
/**
* Copyright (c) 2026-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 { type EditorStore, ElementEditorState } from '@finos/legend-application-studio';
import { type PackageableElement, type ExecutionResult, type RawLambda, RawLambda as RawLambdaCtor, RelationTypeMetadata } from '@finos/legend-graph';
import { type GeneratorFn, ActionState } from '@finos/legend-shared';
import { ParameterInstanceValuesEditorState, LambdaEditorState, LambdaParametersState, LambdaParameterState } from '@finos/legend-query-builder';
import { type DataQualityRelationComparisonConfiguration, type DataQualityRelationQueryLambda, type ReconStrategy } from '../../graph-manager/index.js';
export type ComparisonSide = 'source' | 'target';
export declare enum RECONCILIATION_EXECUTION_TYPE {
RECONCILIATION = "RECONCILIATION",
SOURCE_QUERY = "SOURCE_QUERY",
TARGET_QUERY = "TARGET_QUERY"
}
export declare const DEFAULT_LIMIT = 1000;
export declare class ComparisonLambdaEditorState extends LambdaEditorState {
readonly editorStore: EditorStore;
readonly queryLambda: DataQualityRelationQueryLambda;
readonly label: ComparisonSide;
readonly configurationState: DataQualityRelationComparisonConfigurationState;
isConvertingFunctionBodyToString: boolean;
constructor(configurationState: DataQualityRelationComparisonConfigurationState, queryLambda: DataQualityRelationQueryLambda, editorStore: EditorStore, label: ComparisonSide);
get lambdaId(): string;
convertLambdaGrammarStringToObject(): GeneratorFn<void>;
convertLambdaObjectToGrammarString(options?: {
pretty?: boolean | undefined;
preserveCompilationError?: boolean | undefined;
firstLoad?: boolean | undefined;
}): GeneratorFn<void>;
get hashCode(): string;
}
export declare class ComparisonParametersState extends LambdaParametersState {
readonly configurationState: DataQualityRelationComparisonConfigurationState;
constructor(configurationState: DataQualityRelationComparisonConfigurationState);
openModal(lambda: RawLambda, onSubmit: () => Promise<void>): void;
build(lambda: RawLambda): LambdaParameterState[];
}
export declare class DataQualityRelationComparisonConfigurationState extends ElementEditorState {
element: DataQualityRelationComparisonConfiguration;
sourceLambdaEditorState: ComparisonLambdaEditorState;
targetLambdaEditorState: ComparisonLambdaEditorState;
sourceColumnMetadata: RelationTypeMetadata;
targetColumnMetadata: RelationTypeMetadata;
lastSourceQueryHash: string | undefined;
lastTargetQueryHash: string | undefined;
readonly fetchColumnsState: ActionState;
sourceColumnFetchError: string | undefined;
targetColumnFetchError: string | undefined;
currentExecutionType: RECONCILIATION_EXECUTION_TYPE | undefined;
lastExecutionType: RECONCILIATION_EXECUTION_TYPE | undefined;
executionResult?: ExecutionResult | undefined;
executionDuration?: number | undefined;
runPromise: Promise<ExecutionResult> | undefined;
limit: number;
sourceParametersState: ComparisonParametersState;
targetParametersState: ComparisonParametersState;
comparisonParametersEditorState: ParameterInstanceValuesEditorState;
constructor(editorStore: EditorStore, element: PackageableElement);
setKeys(keys: string[]): void;
setColumnsToCompare(columns: string[]): void;
setStrategy(strategy: ReconStrategy): void;
setSourceHashColumn(value: string | undefined): void;
setTargetHashColumn(value: string | undefined): void;
setAggregatedHash(value: boolean | undefined): void;
get sourceColumnOptions(): {
value: string;
label: string;
}[];
get targetColumnOptions(): {
value: string;
label: string;
}[];
get combinedColumnOptions(): {
value: string;
label: string;
}[];
get hasColumnFetchError(): boolean;
get columnFetchError(): string | undefined;
get hasNoOverlappingColumns(): boolean;
get isRunning(): boolean;
setExecutionResult(executionResult: ExecutionResult | undefined, type: RECONCILIATION_EXECUTION_TYPE): void;
setRunPromise(promise: Promise<ExecutionResult> | undefined): void;
setExecutionDuration(val: number | undefined): void;
setLimit(val: number): void;
private assertNoLetInjectionParameters;
buildRawLambda(queryLambda: DataQualityRelationQueryLambda): RawLambdaCtor;
private buildSourceLambda;
private buildTargetLambda;
private get sourceHasParameters();
private get targetHasParameters();
openComparisonParametersModal(onSubmit: () => Promise<void>): void;
handleRun(type: RECONCILIATION_EXECUTION_TYPE): GeneratorFn<void>;
run(type: RECONCILIATION_EXECUTION_TYPE): GeneratorFn<void>;
cancelRun(): GeneratorFn<void>;
fetchColumnsForLambda(queryLambda: DataQualityRelationQueryLambda, side: ComparisonSide): GeneratorFn<void>;
retryFetchColumns(): GeneratorFn<void>;
reprocess(newElement: PackageableElement, editorStore: EditorStore): ElementEditorState;
}
//# sourceMappingURL=DataQualityRelationComparisonConfigurationState.d.ts.map