@finos/legend-graph 1.0.6 → 1.2.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/CHANGELOG.md +28 -0
- package/lib/GraphManagerStateProvider.js +1 -1
- package/lib/GraphManagerStateProvider.js.map +1 -1
- package/lib/GraphManagerTestUtils.js +1 -1
- package/lib/GraphManagerTestUtils.js.map +1 -1
- package/lib/MetaModelConst.d.ts +2 -2
- package/lib/MetaModelConst.d.ts.map +1 -1
- package/lib/MetaModelConst.js +2 -2
- package/lib/MetaModelConst.js.map +1 -1
- package/lib/graph/BasicModel.d.ts +1 -1
- package/lib/graph/BasicModel.d.ts.map +1 -1
- package/lib/graph/BasicModel.js +2 -2
- package/lib/graph/BasicModel.js.map +1 -1
- package/lib/graph/DependencyManager.d.ts +2 -0
- package/lib/graph/DependencyManager.d.ts.map +1 -1
- package/lib/graph/DependencyManager.js +4 -0
- package/lib/graph/DependencyManager.js.map +1 -1
- package/lib/graphManager/AbstractPureGraphManager.d.ts +14 -11
- package/lib/graphManager/AbstractPureGraphManager.d.ts.map +1 -1
- package/lib/graphManager/AbstractPureGraphManager.js.map +1 -1
- package/lib/graphManager/action/{TEMP__AbstractEngineConfig.d.ts → TEMPORARY__AbstractEngineConfig.d.ts} +2 -2
- package/lib/graphManager/action/TEMPORARY__AbstractEngineConfig.d.ts.map +1 -0
- package/lib/graphManager/action/{TEMP__AbstractEngineConfig.js → TEMPORARY__AbstractEngineConfig.js} +2 -2
- package/lib/graphManager/action/TEMPORARY__AbstractEngineConfig.js.map +1 -0
- package/lib/graphManager/action/execution/ExecutionResult.d.ts +7 -0
- package/lib/graphManager/action/execution/ExecutionResult.d.ts.map +1 -1
- package/lib/graphManager/action/execution/ExecutionResult.js +12 -0
- package/lib/graphManager/action/execution/ExecutionResult.js.map +1 -1
- package/lib/helpers/MappingHelper.d.ts.map +1 -1
- package/lib/helpers/MappingHelper.js +1 -4
- package/lib/helpers/MappingHelper.js.map +1 -1
- package/lib/helpers/PureLanguageHelper.d.ts +21 -0
- package/lib/helpers/PureLanguageHelper.d.ts.map +1 -0
- package/lib/helpers/PureLanguageHelper.js +73 -0
- package/lib/helpers/PureLanguageHelper.js.map +1 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/mapping/PropertyMapping.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/mapping/PropertyMapping.js +2 -0
- package/lib/models/metamodels/pure/packageableElements/mapping/PropertyMapping.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/mapping/SetImplementation.d.ts +18 -4
- package/lib/models/metamodels/pure/packageableElements/mapping/SetImplementation.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/mapping/SetImplementation.js +22 -0
- package/lib/models/metamodels/pure/packageableElements/mapping/SetImplementation.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/connection/AuthenticationStrategy.d.ts +4 -10
- package/lib/models/metamodels/pure/packageableElements/store/relational/connection/AuthenticationStrategy.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/connection/AuthenticationStrategy.js +11 -32
- package/lib/models/metamodels/pure/packageableElements/store/relational/connection/AuthenticationStrategy.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/connection/DatasourceSpecification.d.ts +12 -0
- package/lib/models/metamodels/pure/packageableElements/store/relational/connection/DatasourceSpecification.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/connection/DatasourceSpecification.js +41 -0
- package/lib/models/metamodels/pure/packageableElements/store/relational/connection/DatasourceSpecification.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/connection/RelationalDatabaseConnection.d.ts +1 -0
- package/lib/models/metamodels/pure/packageableElements/store/relational/connection/RelationalDatabaseConnection.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/store/relational/connection/RelationalDatabaseConnection.js +1 -0
- package/lib/models/metamodels/pure/packageableElements/store/relational/connection/RelationalDatabaseConnection.js.map +1 -1
- package/lib/models/protocols/pure/v1/V1_PureGraphManager.d.ts +5 -5
- package/lib/models/protocols/pure/v1/V1_PureGraphManager.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/V1_PureGraphManager.js +4 -4
- package/lib/models/protocols/pure/v1/V1_PureGraphManager.js.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_Engine.d.ts +4 -3
- package/lib/models/protocols/pure/v1/engine/V1_Engine.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_Engine.js +11 -7
- package/lib/models/protocols/pure/v1/engine/V1_Engine.js.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_EngineServerClient.d.ts +5 -1
- package/lib/models/protocols/pure/v1/engine/V1_EngineServerClient.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_EngineServerClient.js +3 -1
- package/lib/models/protocols/pure/v1/engine/V1_EngineServerClient.js.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_ExecutionHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/engine/V1_ExecutionHelper.js +5 -2
- package/lib/models/protocols/pure/v1/engine/V1_ExecutionHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/engine/execution/V1_ExecutionResult.d.ts +5 -1
- package/lib/models/protocols/pure/v1/engine/execution/V1_ExecutionResult.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/engine/execution/V1_ExecutionResult.js +11 -1
- package/lib/models/protocols/pure/v1/engine/execution/V1_ExecutionResult.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_AuthenticationStrategy.d.ts +4 -8
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_AuthenticationStrategy.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_AuthenticationStrategy.js +9 -18
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_AuthenticationStrategy.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_DatasourceSpecification.d.ts +9 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_DatasourceSpecification.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_DatasourceSpecification.js +16 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_DatasourceSpecification.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_RelationalDatabaseConnection.d.ts +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_RelationalDatabaseConnection.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_RelationalDatabaseConnection.js +1 -0
- package/lib/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_RelationalDatabaseConnection.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_ConnectionTransformer.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_ConnectionTransformer.js +20 -13
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_ConnectionTransformer.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.d.ts +2 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.js +7 -2
- package/lib/models/protocols/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphSecondPassBuilder.js +3 -3
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphSecondPassBuilder.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphThirdPassBuilder.js +2 -2
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphThirdPassBuilder.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelPropertyMappingBuilder.d.ts +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelPropertyMappingBuilder.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelPropertyMappingBuilder.js +14 -8
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelPropertyMappingBuilder.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalClassMappingBuilderHelper.d.ts +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalClassMappingBuilderHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalClassMappingBuilderHelper.js +7 -6
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalClassMappingBuilderHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalConnectionBuilderHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalConnectionBuilderHelper.js +16 -12
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalConnectionBuilderHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_ValueSpecificationPathResolver.js +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_ValueSpecificationPathResolver.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ConnectionSerializationHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ConnectionSerializationHelper.js +24 -19
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ConnectionSerializationHelper.js.map +1 -1
- package/package.json +10 -9
- package/src/MetaModelConst.ts +2 -2
- package/src/graph/BasicModel.ts +2 -2
- package/src/graph/DependencyManager.ts +5 -0
- package/src/graphManager/AbstractPureGraphManager.ts +18 -10
- package/src/graphManager/action/{TEMP__AbstractEngineConfig.ts → TEMPORARY__AbstractEngineConfig.ts} +1 -1
- package/src/graphManager/action/execution/ExecutionResult.ts +14 -0
- package/src/helpers/MappingHelper.ts +1 -3
- package/src/helpers/PureLanguageHelper.ts +86 -0
- package/src/index.ts +3 -0
- package/src/models/metamodels/pure/packageableElements/mapping/PropertyMapping.ts +2 -0
- package/src/models/metamodels/pure/packageableElements/mapping/SetImplementation.ts +41 -4
- package/src/models/metamodels/pure/packageableElements/store/relational/connection/AuthenticationStrategy.ts +16 -44
- package/src/models/metamodels/pure/packageableElements/store/relational/connection/DatasourceSpecification.ts +57 -0
- package/src/models/metamodels/pure/packageableElements/store/relational/connection/RelationalDatabaseConnection.ts +1 -0
- package/src/models/protocols/pure/v1/V1_PureGraphManager.ts +8 -7
- package/src/models/protocols/pure/v1/engine/V1_Engine.ts +13 -7
- package/src/models/protocols/pure/v1/engine/V1_EngineServerClient.ts +9 -3
- package/src/models/protocols/pure/v1/engine/V1_ExecutionHelper.ts +4 -0
- package/src/models/protocols/pure/v1/engine/execution/V1_ExecutionResult.ts +14 -1
- package/src/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_AuthenticationStrategy.ts +12 -25
- package/src/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_DatasourceSpecification.ts +21 -0
- package/src/models/protocols/pure/v1/model/packageableElements/store/relational/connection/V1_RelationalDatabaseConnection.ts +1 -0
- package/src/models/protocols/pure/v1/transformation/pureGraph/from/V1_ConnectionTransformer.ts +21 -11
- package/src/models/protocols/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.ts +13 -1
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphSecondPassBuilder.ts +3 -3
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelGraphThirdPassBuilder.ts +2 -2
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/V1_ProtocolToMetaModelPropertyMappingBuilder.ts +41 -17
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalClassMappingBuilderHelper.ts +9 -9
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalConnectionBuilderHelper.ts +31 -19
- package/src/models/protocols/pure/v1/transformation/pureGraph/to/helpers/V1_ValueSpecificationPathResolver.ts +1 -1
- package/src/models/protocols/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ConnectionSerializationHelper.ts +29 -38
- package/tsconfig.json +3 -1
- package/lib/graphManager/action/TEMP__AbstractEngineConfig.d.ts.map +0 -1
- package/lib/graphManager/action/TEMP__AbstractEngineConfig.js.map +0 -1
|
@@ -0,0 +1,86 @@
|
|
|
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 { PRIMITIVE_TYPE } from '../MetaModelConst';
|
|
18
|
+
import type { ConcreteFunctionDefinition } from '../models/metamodels/pure/packageableElements/domain/ConcreteFunctionDefinition';
|
|
19
|
+
import type { Type } from '../models/metamodels/pure/packageableElements/domain/Type';
|
|
20
|
+
import { PrimitiveType } from '../models/metamodels/pure/packageableElements/domain/PrimitiveType';
|
|
21
|
+
import { Enumeration } from '../models/metamodels/pure/packageableElements/domain/Enumeration';
|
|
22
|
+
import format from 'date-fns/format';
|
|
23
|
+
|
|
24
|
+
export const generateDefaultParameterValueForType = (
|
|
25
|
+
type: Type | undefined,
|
|
26
|
+
index: number,
|
|
27
|
+
): string | number | boolean => {
|
|
28
|
+
if (!type) {
|
|
29
|
+
return `param${index}`;
|
|
30
|
+
}
|
|
31
|
+
if (type instanceof Enumeration) {
|
|
32
|
+
return type.values.length !== 0
|
|
33
|
+
? `${type.path}.${type.values[0]?.name}`
|
|
34
|
+
: `param${index}`;
|
|
35
|
+
} else if (type instanceof PrimitiveType) {
|
|
36
|
+
switch (type.name) {
|
|
37
|
+
case PRIMITIVE_TYPE.BOOLEAN:
|
|
38
|
+
return true;
|
|
39
|
+
case PRIMITIVE_TYPE.FLOAT:
|
|
40
|
+
case PRIMITIVE_TYPE.DECIMAL:
|
|
41
|
+
return 0.0;
|
|
42
|
+
case PRIMITIVE_TYPE.NUMBER:
|
|
43
|
+
case PRIMITIVE_TYPE.INTEGER:
|
|
44
|
+
return 0;
|
|
45
|
+
case PRIMITIVE_TYPE.DATE:
|
|
46
|
+
case PRIMITIVE_TYPE.STRICTDATE:
|
|
47
|
+
return `%${format(new Date(), 'yyyy-MM-dd')}`;
|
|
48
|
+
case PRIMITIVE_TYPE.DATETIME:
|
|
49
|
+
return `%${format(new Date(), 'yyyy-MM-dd')}T00:00:00`;
|
|
50
|
+
case PRIMITIVE_TYPE.STRICTTIME:
|
|
51
|
+
return `%00:00:00`;
|
|
52
|
+
case PRIMITIVE_TYPE.STRING:
|
|
53
|
+
return "''";
|
|
54
|
+
default:
|
|
55
|
+
return `param${index}`;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
// Other non-primitive types, e.g. Class
|
|
59
|
+
return `param${index}`;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const generateFunctionCallString = (
|
|
63
|
+
element: ConcreteFunctionDefinition,
|
|
64
|
+
): string => {
|
|
65
|
+
let lambdaString = '';
|
|
66
|
+
if (element.parameters.length > 0) {
|
|
67
|
+
for (let i = 0; i < element.parameters.length; i++) {
|
|
68
|
+
const paramType = element.parameters[i]?.type.value;
|
|
69
|
+
const separator = i !== element.parameters.length - 1 ? ', ' : '';
|
|
70
|
+
lambdaString =
|
|
71
|
+
lambdaString +
|
|
72
|
+
generateDefaultParameterValueForType(paramType, i) +
|
|
73
|
+
separator;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return `${element.path}(${lambdaString})`;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export const generateFunctionSignature = (
|
|
80
|
+
element: ConcreteFunctionDefinition,
|
|
81
|
+
fullPath: boolean,
|
|
82
|
+
): string =>
|
|
83
|
+
`${fullPath ? element.path : element.name}(${element.parameters
|
|
84
|
+
.map((p) => `${p.name}: ${p.type.value.name}[${p.multiplicity.str}]`)
|
|
85
|
+
.join(', ')})` +
|
|
86
|
+
`: ${element.returnType.value.name}[${element.returnMultiplicity.str}]`;
|
package/src/index.ts
CHANGED
|
@@ -149,6 +149,7 @@ export * from './helpers/MappingResolutionHelper';
|
|
|
149
149
|
export * from './helpers/ValidationHelper';
|
|
150
150
|
export * from './helpers/Stubable'; // TODO: to be removed
|
|
151
151
|
export * from './helpers/DomainHelper';
|
|
152
|
+
export * from './helpers/PureLanguageHelper';
|
|
152
153
|
|
|
153
154
|
// --------------------------------------------- GRAPH --------------------------------------------------
|
|
154
155
|
|
|
@@ -181,6 +182,8 @@ export * from './graphManager/DSLGenerationSpecification_PureGraphManagerPlugin_
|
|
|
181
182
|
export {
|
|
182
183
|
ExecutionResult,
|
|
183
184
|
TdsExecutionResult,
|
|
185
|
+
RawExecutionResult,
|
|
186
|
+
EXECUTION_SERIALIZATION_FORMAT,
|
|
184
187
|
} from './graphManager/action/execution/ExecutionResult';
|
|
185
188
|
export * from './graphManager/action/execution/ExecutionResultHelper';
|
|
186
189
|
export * from './graphManager/PureGraphManagerPlugin';
|
|
@@ -67,9 +67,11 @@ export abstract class PropertyMapping implements Hashable, Stubable {
|
|
|
67
67
|
owner: PropertyMappingsImplementation; // the immediate parent instance set implementation that holds the property mappings
|
|
68
68
|
// NOTE: in case the holder of this property mapping is an embedded property mapping, that embedded property mapping is considered the source
|
|
69
69
|
// otherwise, it is always the top/root `InstanceSetImplementation` that is considered the source implementation
|
|
70
|
+
// TODO: change this to use `SetImplemenetationReference`
|
|
70
71
|
sourceSetImplementation: SetImplementation;
|
|
71
72
|
// NOTE: in Pure, we actually only store `targetId` and `sourceId` instead of the reference
|
|
72
73
|
// but for convenience and graph completeness validation purpose we will resolve to the actual set implementations here
|
|
74
|
+
// TODO: change this to use `OptionalSetImplemenetationReference`
|
|
73
75
|
targetSetImplementation?: SetImplementation | undefined;
|
|
74
76
|
localMappingProperty?: LocalMappingPropertyInfo | undefined;
|
|
75
77
|
// store?: Store | undefined;
|
|
@@ -18,9 +18,12 @@ import { observable, action, computed, makeObservable } from 'mobx';
|
|
|
18
18
|
import { hashArray, type Hashable } from '@finos/legend-shared';
|
|
19
19
|
import { fromElementPathToMappingElementId } from '../../../../../MetaModelUtils';
|
|
20
20
|
import { CORE_HASH_STRUCTURE } from '../../../../../MetaModelConst';
|
|
21
|
-
import
|
|
21
|
+
import {
|
|
22
|
+
PackageableElementExplicitReference,
|
|
23
|
+
type PackageableElementReference,
|
|
24
|
+
} from '../PackageableElementReference';
|
|
22
25
|
import type { PropertyOwnerImplementation } from './PropertyOwnerImplementation';
|
|
23
|
-
import
|
|
26
|
+
import { Class } from '../domain/Class';
|
|
24
27
|
import type { Mapping, MappingElementLabel } from './Mapping';
|
|
25
28
|
import type { Stubable } from '../../../../../helpers/Stubable';
|
|
26
29
|
import type { OperationSetImplementation } from './OperationSetImplementation';
|
|
@@ -29,8 +32,14 @@ import type { FlatDataInstanceSetImplementation } from '../store/flatData/mappin
|
|
|
29
32
|
import type { EmbeddedFlatDataPropertyMapping } from '../store/flatData/mapping/EmbeddedFlatDataPropertyMapping';
|
|
30
33
|
import type { RelationalInstanceSetImplementation } from '../store/relational/mapping/RelationalInstanceSetImplementation';
|
|
31
34
|
import type { RootRelationalInstanceSetImplementation } from '../store/relational/mapping/RootRelationalInstanceSetImplementation';
|
|
32
|
-
import
|
|
33
|
-
|
|
35
|
+
import {
|
|
36
|
+
InferableMappingElementIdExplicitValue,
|
|
37
|
+
type InferableMappingElementIdValue,
|
|
38
|
+
} from './InferableMappingElementId';
|
|
39
|
+
import {
|
|
40
|
+
InferableMappingElementRootExplicitValue,
|
|
41
|
+
type InferableMappingElementRoot,
|
|
42
|
+
} from './InferableMappingElementRoot';
|
|
34
43
|
import type { AggregationAwareSetImplementation } from './aggregationAware/AggregationAwareSetImplementation';
|
|
35
44
|
import type { InstanceSetImplementation } from './InstanceSetImplementation';
|
|
36
45
|
|
|
@@ -58,6 +67,9 @@ export interface SetImplementationVisitor<T> {
|
|
|
58
67
|
visit_AggregationAwareSetImplementation(
|
|
59
68
|
setImplementation: AggregationAwareSetImplementation,
|
|
60
69
|
): T;
|
|
70
|
+
visit_TEMPORARY__UnresolvedSetImplementation(
|
|
71
|
+
setImplementation: TEMPORARY__UnresolvedSetImplementation,
|
|
72
|
+
): T;
|
|
61
73
|
}
|
|
62
74
|
|
|
63
75
|
export abstract class SetImplementation
|
|
@@ -143,3 +155,28 @@ export enum SET_IMPLEMENTATION_TYPE {
|
|
|
143
155
|
EMBEDDED_RELATIONAL = 'embeddedRelational',
|
|
144
156
|
AGGREGATION_AWARE = 'aggregationAware',
|
|
145
157
|
}
|
|
158
|
+
|
|
159
|
+
/* @MARKER: RELAXED GRAPH CHECK - See https://github.com/finos/legend-studio/issues/880 */
|
|
160
|
+
/**
|
|
161
|
+
* When set implementation cannot be resolved by ID,
|
|
162
|
+
* we try to avoid failing graph building for now
|
|
163
|
+
* instead, we will leave this loose end unresolved.
|
|
164
|
+
*
|
|
165
|
+
* NOTE: this is just a temporary solutions until we make this a hard-fail post migration.
|
|
166
|
+
*
|
|
167
|
+
* See https://github.com/finos/legend-studio/issues/880
|
|
168
|
+
*/
|
|
169
|
+
export class TEMPORARY__UnresolvedSetImplementation extends SetImplementation {
|
|
170
|
+
constructor(id: string, parent: Mapping) {
|
|
171
|
+
super(
|
|
172
|
+
InferableMappingElementIdExplicitValue.create(id, ''),
|
|
173
|
+
parent,
|
|
174
|
+
PackageableElementExplicitReference.create(new Class('')),
|
|
175
|
+
InferableMappingElementRootExplicitValue.create(false),
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
accept_SetImplementationVisitor<T>(visitor: SetImplementationVisitor<T>): T {
|
|
180
|
+
return visitor.visit_TEMPORARY__UnresolvedSetImplementation(this);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
@@ -67,21 +67,32 @@ export class DefaultH2AuthenticationStrategy
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
export class
|
|
71
|
-
extends
|
|
70
|
+
export class ApiTokenAuthenticationStrategy
|
|
71
|
+
extends AuthenticationStrategy
|
|
72
72
|
implements Hashable
|
|
73
73
|
{
|
|
74
|
-
|
|
74
|
+
apiToken: string;
|
|
75
|
+
|
|
76
|
+
constructor(apiToken: string) {
|
|
75
77
|
super();
|
|
76
78
|
|
|
77
79
|
makeObservable(this, {
|
|
80
|
+
apiToken: observable,
|
|
81
|
+
setApiToken: action,
|
|
78
82
|
hashCode: computed,
|
|
79
83
|
});
|
|
84
|
+
|
|
85
|
+
this.apiToken = apiToken;
|
|
80
86
|
}
|
|
81
87
|
|
|
82
|
-
|
|
88
|
+
setApiToken(val: string): void {
|
|
89
|
+
this.apiToken = val;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
get hashCode(): string {
|
|
83
93
|
return hashArray([
|
|
84
|
-
CORE_HASH_STRUCTURE.
|
|
94
|
+
CORE_HASH_STRUCTURE.API_TOKEN_AUTHENTICATION_STRATEGY,
|
|
95
|
+
this.apiToken,
|
|
85
96
|
]);
|
|
86
97
|
}
|
|
87
98
|
}
|
|
@@ -176,45 +187,6 @@ export class SnowflakePublicAuthenticationStrategy
|
|
|
176
187
|
}
|
|
177
188
|
}
|
|
178
189
|
|
|
179
|
-
export class UserPasswordAuthenticationStrategy
|
|
180
|
-
extends AuthenticationStrategy
|
|
181
|
-
implements Hashable
|
|
182
|
-
{
|
|
183
|
-
userName: string;
|
|
184
|
-
passwordVaultReference: string;
|
|
185
|
-
|
|
186
|
-
constructor(userName: string, passwordVaultReference: string) {
|
|
187
|
-
super();
|
|
188
|
-
|
|
189
|
-
makeObservable(this, {
|
|
190
|
-
userName: observable,
|
|
191
|
-
passwordVaultReference: observable,
|
|
192
|
-
setUserName: action,
|
|
193
|
-
setPasswordVaultReference: action,
|
|
194
|
-
hashCode: computed,
|
|
195
|
-
});
|
|
196
|
-
|
|
197
|
-
this.userName = userName;
|
|
198
|
-
this.passwordVaultReference = passwordVaultReference;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
setUserName(val: string): void {
|
|
202
|
-
this.userName = val;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
setPasswordVaultReference(val: string): void {
|
|
206
|
-
this.passwordVaultReference = val;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
get hashCode(): string {
|
|
210
|
-
return hashArray([
|
|
211
|
-
CORE_HASH_STRUCTURE.USER_PASSWORD_AUTHENTICATION_STRATEGY,
|
|
212
|
-
this.userName,
|
|
213
|
-
this.passwordVaultReference,
|
|
214
|
-
]);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
190
|
export class GCPApplicationDefaultCredentialsAuthenticationStrategy
|
|
219
191
|
extends AuthenticationStrategy
|
|
220
192
|
implements Hashable
|
|
@@ -71,6 +71,63 @@ export class StaticDatasourceSpecification
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
export class DatabricksDatasourceSpecification
|
|
75
|
+
extends DatasourceSpecification
|
|
76
|
+
implements Hashable
|
|
77
|
+
{
|
|
78
|
+
hostname: string;
|
|
79
|
+
port: string;
|
|
80
|
+
protocol: string;
|
|
81
|
+
httpPath: string;
|
|
82
|
+
|
|
83
|
+
constructor(
|
|
84
|
+
hostname: string,
|
|
85
|
+
port: string,
|
|
86
|
+
protocol: string,
|
|
87
|
+
httpPath: string,
|
|
88
|
+
) {
|
|
89
|
+
super();
|
|
90
|
+
|
|
91
|
+
makeObservable(this, {
|
|
92
|
+
hostname: observable,
|
|
93
|
+
port: observable,
|
|
94
|
+
protocol: observable,
|
|
95
|
+
httpPath: observable,
|
|
96
|
+
hashCode: computed,
|
|
97
|
+
});
|
|
98
|
+
this.hostname = hostname;
|
|
99
|
+
this.port = port;
|
|
100
|
+
this.protocol = protocol;
|
|
101
|
+
this.httpPath = httpPath;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
get hashCode(): string {
|
|
105
|
+
return hashArray([
|
|
106
|
+
CORE_HASH_STRUCTURE.DATABRICKS_DATASOURCE_SPECIFICATION,
|
|
107
|
+
this.hostname,
|
|
108
|
+
this.port,
|
|
109
|
+
this.protocol,
|
|
110
|
+
this.httpPath,
|
|
111
|
+
]);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
setHostName(val: string): void {
|
|
115
|
+
this.hostname = val;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
setPort(val: string): void {
|
|
119
|
+
this.port = val;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
setProtocol(val: string): void {
|
|
123
|
+
this.protocol = val;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
setHttpPath(val: string): void {
|
|
127
|
+
this.httpPath = val;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
74
131
|
export class EmbeddedH2DatasourceSpecification
|
|
75
132
|
extends DatasourceSpecification
|
|
76
133
|
implements Hashable
|
|
@@ -38,11 +38,12 @@ import {
|
|
|
38
38
|
assertErrorThrown,
|
|
39
39
|
promisify,
|
|
40
40
|
} from '@finos/legend-shared';
|
|
41
|
-
import type {
|
|
41
|
+
import type { TEMPORARY__AbstractEngineConfig } from '../../../../graphManager/action/TEMPORARY__AbstractEngineConfig';
|
|
42
42
|
import {
|
|
43
43
|
AbstractPureGraphManager,
|
|
44
|
-
type
|
|
44
|
+
type TEMPORARY__EngineSetupConfig,
|
|
45
45
|
type GraphBuilderOptions,
|
|
46
|
+
type ExecutionOptions,
|
|
46
47
|
} from '../../../../graphManager/AbstractPureGraphManager';
|
|
47
48
|
import type { Mapping } from '../../../metamodels/pure/packageableElements/mapping/Mapping';
|
|
48
49
|
import type { Runtime } from '../../../metamodels/pure/packageableElements/runtime/Runtime';
|
|
@@ -406,12 +407,12 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
|
|
|
406
407
|
);
|
|
407
408
|
}
|
|
408
409
|
|
|
409
|
-
|
|
410
|
+
TEMPORARY__getEngineConfig(): TEMPORARY__AbstractEngineConfig {
|
|
410
411
|
return this.engine.config;
|
|
411
412
|
}
|
|
412
413
|
|
|
413
414
|
*initialize(
|
|
414
|
-
config:
|
|
415
|
+
config: TEMPORARY__EngineSetupConfig,
|
|
415
416
|
options?: {
|
|
416
417
|
tracerService?: TracerService | undefined;
|
|
417
418
|
},
|
|
@@ -1033,7 +1034,7 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
|
|
|
1033
1034
|
* perserve the element path both resolved and unresolved
|
|
1034
1035
|
*/
|
|
1035
1036
|
if (!options?.TEMPORARY__keepSectionIndex) {
|
|
1036
|
-
graph.
|
|
1037
|
+
graph.TEMPORARY__deleteOwnSectionIndex();
|
|
1037
1038
|
}
|
|
1038
1039
|
}
|
|
1039
1040
|
|
|
@@ -1852,7 +1853,7 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
|
|
|
1852
1853
|
lambda: RawLambda,
|
|
1853
1854
|
runtime: Runtime,
|
|
1854
1855
|
clientVersion: string,
|
|
1855
|
-
|
|
1856
|
+
options?: ExecutionOptions,
|
|
1856
1857
|
): Promise<ExecutionResult> {
|
|
1857
1858
|
return V1_buildExecutionResult(
|
|
1858
1859
|
await this.engine.executeMapping(
|
|
@@ -1863,7 +1864,7 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
|
|
|
1863
1864
|
runtime,
|
|
1864
1865
|
clientVersion,
|
|
1865
1866
|
),
|
|
1866
|
-
|
|
1867
|
+
options,
|
|
1867
1868
|
),
|
|
1868
1869
|
);
|
|
1869
1870
|
}
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
mergeObjects,
|
|
26
26
|
HttpStatus,
|
|
27
27
|
NetworkClientError,
|
|
28
|
+
returnUndefOnError,
|
|
28
29
|
} from '@finos/legend-shared';
|
|
29
30
|
import { GRAPH_MANAGER_LOG_EVENT } from '../../../../../graphManager/GraphManagerLogEvent';
|
|
30
31
|
import {
|
|
@@ -36,7 +37,7 @@ import {
|
|
|
36
37
|
GenerationMode,
|
|
37
38
|
type GenerationConfigurationDescription,
|
|
38
39
|
} from '../../../../../graphManager/action/generation/GenerationConfigurationDescription';
|
|
39
|
-
import {
|
|
40
|
+
import { TEMPORARY__AbstractEngineConfig } from '../../../../../graphManager/action/TEMPORARY__AbstractEngineConfig';
|
|
40
41
|
import { V1_EngineServerClient } from './V1_EngineServerClient';
|
|
41
42
|
import type { V1_PureModelContextData } from '../model/context/V1_PureModelContextData';
|
|
42
43
|
import type { V1_LambdaReturnTypeResult } from '../engine/compilation/V1_LambdaReturnTypeResult';
|
|
@@ -90,8 +91,9 @@ import { serialize } from 'serializr';
|
|
|
90
91
|
import { V1_ExecutionError } from './execution/V1_ExecutionError';
|
|
91
92
|
import { V1_PureModelContextText } from '../model/context/V1_PureModelContextText';
|
|
92
93
|
import { V1_QuerySearchSpecification } from './query/V1_QuerySearchSpecification';
|
|
94
|
+
import type { ExecutionOptions } from '../../../../../graphManager/AbstractPureGraphManager';
|
|
93
95
|
|
|
94
|
-
class V1_EngineConfig extends
|
|
96
|
+
class V1_EngineConfig extends TEMPORARY__AbstractEngineConfig {
|
|
95
97
|
private engine: V1_Engine;
|
|
96
98
|
|
|
97
99
|
override setEnv(val: string | undefined): void {
|
|
@@ -403,20 +405,24 @@ export class V1_Engine {
|
|
|
403
405
|
|
|
404
406
|
async executeMapping(
|
|
405
407
|
input: V1_ExecuteInput,
|
|
406
|
-
|
|
408
|
+
options?: ExecutionOptions,
|
|
407
409
|
): Promise<V1_ExecutionResult> {
|
|
408
410
|
try {
|
|
409
411
|
const executionResultInText = await (
|
|
410
412
|
(await this.engineServerClient.execute(
|
|
411
413
|
V1_ExecuteInput.serialization.toJson(input),
|
|
412
|
-
|
|
414
|
+
{
|
|
415
|
+
returnResultAsText: true,
|
|
416
|
+
serializationFormat: options?.serializationFormat,
|
|
417
|
+
},
|
|
413
418
|
)) as Response
|
|
414
419
|
).text();
|
|
415
|
-
|
|
416
|
-
useLosslessParse
|
|
420
|
+
const rawExecutionResult = (returnUndefOnError(() =>
|
|
421
|
+
options?.useLosslessParse
|
|
417
422
|
? losslessParse(executionResultInText)
|
|
418
423
|
: JSON.parse(executionResultInText),
|
|
419
|
-
);
|
|
424
|
+
) ?? executionResultInText) as PlainObject<V1_ExecutionResult> | string;
|
|
425
|
+
return V1_serializeExecutionResult(rawExecutionResult);
|
|
420
426
|
} catch (error) {
|
|
421
427
|
assertErrorThrown(error);
|
|
422
428
|
if (error instanceof NetworkClientError) {
|
|
@@ -47,6 +47,7 @@ import type { V1_LightQuery, V1_Query } from './query/V1_Query';
|
|
|
47
47
|
import type { V1_ServiceStorage } from './service/V1_ServiceStorage';
|
|
48
48
|
import type { GenerationMode } from '../../../../../graphManager/action/generation/GenerationConfigurationDescription';
|
|
49
49
|
import type { V1_QuerySearchSpecification } from './query/V1_QuerySearchSpecification';
|
|
50
|
+
import type { EXECUTION_SERIALIZATION_FORMAT } from '../../../../../graphManager/action/execution/ExecutionResult';
|
|
50
51
|
|
|
51
52
|
enum CORE_ENGINE_TRACER_SPAN {
|
|
52
53
|
GRAMMAR_TO_JSON = 'transform Pure code to protocol',
|
|
@@ -269,7 +270,10 @@ export class V1_EngineServerClient extends AbstractServerClient {
|
|
|
269
270
|
_execution = (): string => `${this._pure()}/execution`;
|
|
270
271
|
execute = (
|
|
271
272
|
input: PlainObject<V1_ExecuteInput>,
|
|
272
|
-
|
|
273
|
+
options?: {
|
|
274
|
+
returnResultAsText?: boolean;
|
|
275
|
+
serializationFormat?: EXECUTION_SERIALIZATION_FORMAT | undefined;
|
|
276
|
+
},
|
|
273
277
|
): Promise<PlainObject<V1_ExecutionResult> | Response> =>
|
|
274
278
|
this.postWithTracing(
|
|
275
279
|
this.getTraceData(CORE_ENGINE_TRACER_SPAN.EXECUTE),
|
|
@@ -277,9 +281,11 @@ export class V1_EngineServerClient extends AbstractServerClient {
|
|
|
277
281
|
input,
|
|
278
282
|
{},
|
|
279
283
|
undefined,
|
|
280
|
-
|
|
284
|
+
{
|
|
285
|
+
serializationFormat: options?.serializationFormat,
|
|
286
|
+
},
|
|
281
287
|
{ enableCompression: true },
|
|
282
|
-
{ skipProcessing: Boolean(returnResultAsText) },
|
|
288
|
+
{ skipProcessing: Boolean(options?.returnResultAsText) },
|
|
283
289
|
);
|
|
284
290
|
|
|
285
291
|
generatePlan = (
|
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
TdsExecutionResult,
|
|
28
28
|
TdsBuilder,
|
|
29
29
|
TDSColumn,
|
|
30
|
+
RawExecutionResult,
|
|
30
31
|
} from '../../../../../graphManager/action/execution/ExecutionResult';
|
|
31
32
|
import {
|
|
32
33
|
type V1_ExecutionResult,
|
|
@@ -35,6 +36,7 @@ import {
|
|
|
35
36
|
V1_JsonExecutionResult,
|
|
36
37
|
V1_INTERNAL__UnknownExecutionResult,
|
|
37
38
|
V1_TdsExecutionResult,
|
|
39
|
+
V1_RawExecutionResult,
|
|
38
40
|
} from './execution/V1_ExecutionResult';
|
|
39
41
|
|
|
40
42
|
const buildJSONExecutionResult = (
|
|
@@ -113,6 +115,8 @@ export const V1_buildExecutionResult = (
|
|
|
113
115
|
return buildTDSExecutionResult(protocol);
|
|
114
116
|
} else if (protocol instanceof V1_JsonExecutionResult) {
|
|
115
117
|
return buildJSONExecutionResult(protocol);
|
|
118
|
+
} else if (protocol instanceof V1_RawExecutionResult) {
|
|
119
|
+
return new RawExecutionResult(protocol.value);
|
|
116
120
|
} else if (protocol instanceof V1_INTERNAL__UnknownExecutionResult) {
|
|
117
121
|
return new INTERNAL__UnknownExecutionResult(protocol.content);
|
|
118
122
|
}
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
type PlainObject,
|
|
20
20
|
SerializationFactory,
|
|
21
21
|
usingModelSchema,
|
|
22
|
+
isString,
|
|
22
23
|
} from '@finos/legend-shared';
|
|
23
24
|
import { BuilderType } from '../../../../../../graphManager/action/execution/ExecutionResult';
|
|
24
25
|
|
|
@@ -101,6 +102,15 @@ export class V1_ClassExecutionResult extends V1_ExecutionResult {
|
|
|
101
102
|
);
|
|
102
103
|
}
|
|
103
104
|
|
|
105
|
+
export class V1_RawExecutionResult extends V1_ExecutionResult {
|
|
106
|
+
value: string;
|
|
107
|
+
|
|
108
|
+
constructor(value: string) {
|
|
109
|
+
super();
|
|
110
|
+
this.value = value;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
104
114
|
export class V1_INTERNAL__UnknownExecutionResult extends V1_ExecutionResult {
|
|
105
115
|
content: object;
|
|
106
116
|
|
|
@@ -111,8 +121,11 @@ export class V1_INTERNAL__UnknownExecutionResult extends V1_ExecutionResult {
|
|
|
111
121
|
}
|
|
112
122
|
|
|
113
123
|
export const V1_serializeExecutionResult = (
|
|
114
|
-
value: PlainObject<V1_ExecutionResult
|
|
124
|
+
value: PlainObject<V1_ExecutionResult> | string,
|
|
115
125
|
): V1_ExecutionResult => {
|
|
126
|
+
if (isString(value)) {
|
|
127
|
+
return new V1_RawExecutionResult(value);
|
|
128
|
+
}
|
|
116
129
|
switch ((value.builder as PlainObject<V1_ResultBuilder>)._type) {
|
|
117
130
|
case BuilderType.CLASS_BUILDER:
|
|
118
131
|
return V1_ClassExecutionResult.serialization.fromJson(value);
|
|
@@ -45,17 +45,6 @@ export class V1_DefaultH2AuthenticationStrategy
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
export class V1_TestDatabaseAuthenticationStrategy
|
|
49
|
-
extends V1_DefaultH2AuthenticationStrategy
|
|
50
|
-
implements Hashable
|
|
51
|
-
{
|
|
52
|
-
override get hashCode(): string {
|
|
53
|
-
return hashArray([
|
|
54
|
-
CORE_HASH_STRUCTURE.TEST_DATABASE_AUTHENTICATION_STRATEGY,
|
|
55
|
-
]);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
48
|
export class V1_OAuthAuthenticationStrategy
|
|
60
49
|
extends V1_AuthenticationStrategy
|
|
61
50
|
implements Hashable
|
|
@@ -72,36 +61,34 @@ export class V1_OAuthAuthenticationStrategy
|
|
|
72
61
|
}
|
|
73
62
|
}
|
|
74
63
|
|
|
75
|
-
export class
|
|
64
|
+
export class V1_ApiTokenAuthenticationStrategy
|
|
76
65
|
extends V1_AuthenticationStrategy
|
|
77
66
|
implements Hashable
|
|
78
67
|
{
|
|
79
|
-
|
|
80
|
-
passPhraseVaultReference!: string;
|
|
81
|
-
publicUserName!: string;
|
|
68
|
+
apiToken!: string;
|
|
82
69
|
|
|
83
70
|
get hashCode(): string {
|
|
84
71
|
return hashArray([
|
|
85
|
-
CORE_HASH_STRUCTURE.
|
|
86
|
-
this.
|
|
87
|
-
this.passPhraseVaultReference,
|
|
88
|
-
this.publicUserName,
|
|
72
|
+
CORE_HASH_STRUCTURE.API_TOKEN_AUTHENTICATION_STRATEGY,
|
|
73
|
+
this.apiToken,
|
|
89
74
|
]);
|
|
90
75
|
}
|
|
91
76
|
}
|
|
92
77
|
|
|
93
|
-
export class
|
|
78
|
+
export class V1_SnowflakePublicAuthenticationStrategy
|
|
94
79
|
extends V1_AuthenticationStrategy
|
|
95
80
|
implements Hashable
|
|
96
81
|
{
|
|
97
|
-
|
|
98
|
-
|
|
82
|
+
privateKeyVaultReference!: string;
|
|
83
|
+
passPhraseVaultReference!: string;
|
|
84
|
+
publicUserName!: string;
|
|
99
85
|
|
|
100
86
|
get hashCode(): string {
|
|
101
87
|
return hashArray([
|
|
102
|
-
CORE_HASH_STRUCTURE.
|
|
103
|
-
this.
|
|
104
|
-
this.
|
|
88
|
+
CORE_HASH_STRUCTURE.SNOWFLAKE_PUBLIC_AUTHENTICATION_STRATEGY,
|
|
89
|
+
this.privateKeyVaultReference,
|
|
90
|
+
this.passPhraseVaultReference,
|
|
91
|
+
this.publicUserName,
|
|
105
92
|
]);
|
|
106
93
|
}
|
|
107
94
|
}
|
|
@@ -24,6 +24,7 @@ export enum V1_DatasourceSpecificationType {
|
|
|
24
24
|
BIGQUERY = 'bigQuery',
|
|
25
25
|
H2_LOCAL = 'h2Local',
|
|
26
26
|
REDSHIFT = 'redshift',
|
|
27
|
+
DATABRICKS = 'databricks',
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
export abstract class V1_DatasourceSpecification implements Hashable {
|
|
@@ -68,6 +69,26 @@ export class V1_EmbeddedH2DatasourceSpecification
|
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
|
|
72
|
+
export class V1_DatabricksDatasourceSpecification
|
|
73
|
+
extends V1_DatasourceSpecification
|
|
74
|
+
implements Hashable
|
|
75
|
+
{
|
|
76
|
+
hostname!: string;
|
|
77
|
+
port!: string;
|
|
78
|
+
protocol!: string;
|
|
79
|
+
httpPath!: string;
|
|
80
|
+
|
|
81
|
+
get hashCode(): string {
|
|
82
|
+
return hashArray([
|
|
83
|
+
CORE_HASH_STRUCTURE.DATABRICKS_DATASOURCE_SPECIFICATION,
|
|
84
|
+
this.hostname,
|
|
85
|
+
this.port,
|
|
86
|
+
this.protocol,
|
|
87
|
+
this.httpPath,
|
|
88
|
+
]);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
71
92
|
export class V1_SnowflakeDatasourceSpecification
|
|
72
93
|
extends V1_DatasourceSpecification
|
|
73
94
|
implements Hashable
|