@finos/legend-graph 32.3.2 → 32.3.4
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/lib/graph/BasicModel.d.ts +2 -1
- package/lib/graph/BasicModel.d.ts.map +1 -1
- package/lib/graph/BasicModel.js +3 -2
- package/lib/graph/BasicModel.js.map +1 -1
- package/lib/graph/Core_HashUtils.d.ts +4 -0
- package/lib/graph/Core_HashUtils.d.ts.map +1 -1
- package/lib/graph/Core_HashUtils.js +4 -0
- package/lib/graph/Core_HashUtils.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 +2 -0
- package/lib/graph/DependencyManager.js.map +1 -1
- package/lib/graph/MetaModelConst.d.ts +2 -1
- package/lib/graph/MetaModelConst.d.ts.map +1 -1
- package/lib/graph/MetaModelConst.js +1 -0
- package/lib/graph/MetaModelConst.js.map +1 -1
- package/lib/graph/PureModel.d.ts +3 -0
- package/lib/graph/PureModel.d.ts.map +1 -1
- package/lib/graph/PureModel.js +10 -0
- package/lib/graph/PureModel.js.map +1 -1
- package/lib/graph/helpers/STO_Internal_Relational_Helper.d.ts +29 -0
- package/lib/graph/helpers/STO_Internal_Relational_Helper.d.ts.map +1 -0
- package/lib/graph/helpers/STO_Internal_Relational_Helper.js +66 -0
- package/lib/graph/helpers/STO_Internal_Relational_Helper.js.map +1 -0
- package/lib/graph/helpers/STO_Relational_Helper.d.ts +3 -2
- package/lib/graph/helpers/STO_Relational_Helper.d.ts.map +1 -1
- package/lib/graph/helpers/STO_Relational_Helper.js +14 -5
- package/lib/graph/helpers/STO_Relational_Helper.js.map +1 -1
- package/lib/graph/metamodel/pure/data/EmbeddedData.d.ts +16 -0
- package/lib/graph/metamodel/pure/data/EmbeddedData.d.ts.map +1 -1
- package/lib/graph/metamodel/pure/data/EmbeddedData.js +34 -0
- package/lib/graph/metamodel/pure/data/EmbeddedData.js.map +1 -1
- package/lib/graph/metamodel/pure/packageableElements/function/test/{FunctionStoreTestData.d.ts → FunctionTestData.d.ts} +4 -4
- package/lib/graph/metamodel/pure/packageableElements/function/test/FunctionTestData.d.ts.map +1 -0
- package/lib/graph/metamodel/pure/packageableElements/function/test/{FunctionStoreTestData.js → FunctionTestData.js} +4 -4
- package/lib/graph/metamodel/pure/packageableElements/function/test/FunctionTestData.js.map +1 -0
- package/lib/graph/metamodel/pure/packageableElements/function/test/FunctionTestSuite.d.ts +2 -2
- package/lib/graph/metamodel/pure/packageableElements/function/test/FunctionTestSuite.d.ts.map +1 -1
- package/lib/graph/metamodel/pure/packageableElements/function/test/FunctionTestSuite.js.map +1 -1
- package/lib/graph/metamodel/pure/packageableElements/runtime/Runtime.d.ts.map +1 -1
- package/lib/graph/metamodel/pure/packageableElements/runtime/Runtime.js +1 -1
- package/lib/graph/metamodel/pure/packageableElements/runtime/Runtime.js.map +1 -1
- package/lib/graph/metamodel/pure/packageableElements/store/relational/model/Database.d.ts +11 -0
- package/lib/graph/metamodel/pure/packageableElements/store/relational/model/Database.d.ts.map +1 -1
- package/lib/graph/metamodel/pure/packageableElements/store/relational/model/Database.js +17 -0
- package/lib/graph/metamodel/pure/packageableElements/store/relational/model/Database.js.map +1 -1
- package/lib/graph/metamodel/pure/packageableElements/store/relational/model/IncludeStore.d.ts +28 -0
- package/lib/graph/metamodel/pure/packageableElements/store/relational/model/IncludeStore.d.ts.map +1 -0
- package/lib/graph/metamodel/pure/packageableElements/store/relational/model/IncludeStore.js +34 -0
- package/lib/graph/metamodel/pure/packageableElements/store/relational/model/IncludeStore.js.map +1 -0
- package/lib/graph-manager/action/changeDetection/DomainObserverHelper.d.ts +2 -2
- package/lib/graph-manager/action/changeDetection/DomainObserverHelper.d.ts.map +1 -1
- package/lib/graph-manager/action/changeDetection/DomainObserverHelper.js +1 -1
- package/lib/graph-manager/action/changeDetection/DomainObserverHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.js +4 -0
- package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_EntitlementsDataProduct.d.ts +11 -0
- package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_EntitlementsDataProduct.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_EntitlementsDataProduct.js +11 -0
- package/lib/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_EntitlementsDataProduct.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/model/data/V1_EmbeddedData.d.ts +16 -0
- package/lib/graph-manager/protocol/pure/v1/model/data/V1_EmbeddedData.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/model/data/V1_EmbeddedData.js +34 -0
- package/lib/graph-manager/protocol/pure/v1/model/data/V1_EmbeddedData.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/function/test/{V1_FunctionStoreTestData.d.ts → V1_FunctionTestData.d.ts} +3 -3
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/function/test/V1_FunctionTestData.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/function/test/{V1_FunctionStoreTestData.js → V1_FunctionTestData.js} +4 -4
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/function/test/V1_FunctionTestData.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/function/test/V1_FunctionTestSuite.d.ts +2 -2
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/function/test/V1_FunctionTestSuite.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/function/test/V1_FunctionTestSuite.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/store/relational/model/V1_Database.d.ts +2 -0
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/store/relational/model/V1_Database.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/store/relational/model/V1_Database.js +2 -0
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/store/relational/model/V1_Database.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/store/relational/model/V1_IncludeStore.d.ts +23 -0
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/store/relational/model/V1_IncludeStore.d.ts.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/store/relational/model/V1_IncludeStore.js +30 -0
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/store/relational/model/V1_IncludeStore.js.map +1 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_CoreTransformerHelper.d.ts +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_CoreTransformerHelper.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_CoreTransformerHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataElementTransformer.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataElementTransformer.js +22 -2
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataElementTransformer.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DatabaseTransformer.d.ts +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DatabaseTransformer.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DatabaseTransformer.js +19 -2
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DatabaseTransformer.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DomainTransformer.js +3 -3
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DomainTransformer.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_RuntimeTransformer.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_RuntimeTransformer.js +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_RuntimeTransformer.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ClassMappingSecondPassBuilder.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ClassMappingSecondPassBuilder.js +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ClassMappingSecondPassBuilder.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.js +13 -3
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_GraphBuilderContext.d.ts +3 -3
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_GraphBuilderContext.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_GraphBuilderContext.js +33 -6
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_GraphBuilderContext.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_PropertyMappingBuilder.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_PropertyMappingBuilder.js +3 -3
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_PropertyMappingBuilder.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataElementBuilderHelper.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataElementBuilderHelper.js +16 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataElementBuilderHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DatabaseBuilderHelper.d.ts +4 -2
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DatabaseBuilderHelper.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DatabaseBuilderHelper.js +56 -18
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DatabaseBuilderHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DomainBuilderHelper.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DomainBuilderHelper.js +5 -5
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DomainBuilderHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalClassMappingBuilderHelper.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalClassMappingBuilderHelper.js +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalClassMappingBuilderHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataElementSerializationHelper.d.ts +5 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataElementSerializationHelper.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataElementSerializationHelper.js +19 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataElementSerializationHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DatabaseSerializationHelper.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DatabaseSerializationHelper.js +12 -0
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DatabaseSerializationHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_EntitlementSerializationHelper.d.ts +4 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_EntitlementSerializationHelper.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_EntitlementSerializationHelper.js +16 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_EntitlementSerializationHelper.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_FunctionSerializationHelper.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_FunctionSerializationHelper.js +27 -10
- package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_FunctionSerializationHelper.js.map +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -3
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -1
- package/package.json +1 -1
- package/src/graph/BasicModel.ts +6 -2
- package/src/graph/Core_HashUtils.ts +4 -0
- package/src/graph/DependencyManager.ts +8 -0
- package/src/graph/MetaModelConst.ts +1 -0
- package/src/graph/PureModel.ts +19 -0
- package/src/graph/helpers/STO_Internal_Relational_Helper.ts +97 -0
- package/src/graph/helpers/STO_Relational_Helper.ts +30 -9
- package/src/graph/metamodel/pure/data/EmbeddedData.ts +42 -0
- package/src/graph/metamodel/pure/packageableElements/function/test/{FunctionStoreTestData.ts → FunctionTestData.ts} +4 -4
- package/src/graph/metamodel/pure/packageableElements/function/test/FunctionTestSuite.ts +2 -2
- package/src/graph/metamodel/pure/packageableElements/runtime/Runtime.ts +1 -4
- package/src/graph/metamodel/pure/packageableElements/store/relational/model/Database.ts +27 -0
- package/src/graph/metamodel/pure/packageableElements/store/relational/model/IncludeStore.ts +48 -0
- package/src/graph-manager/action/changeDetection/DomainObserverHelper.ts +3 -3
- package/src/graph-manager/protocol/pure/v1/V1_PureGraphManager.ts +4 -0
- package/src/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_EntitlementsDataProduct.ts +13 -0
- package/src/graph-manager/protocol/pure/v1/model/data/V1_EmbeddedData.ts +45 -0
- package/src/graph-manager/protocol/pure/v1/model/packageableElements/function/test/{V1_FunctionStoreTestData.ts → V1_FunctionTestData.ts} +3 -3
- package/src/graph-manager/protocol/pure/v1/model/packageableElements/function/test/V1_FunctionTestSuite.ts +2 -2
- package/src/graph-manager/protocol/pure/v1/model/packageableElements/store/relational/model/V1_Database.ts +3 -0
- package/src/graph-manager/protocol/pure/v1/model/packageableElements/store/relational/model/V1_IncludeStore.ts +32 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_CoreTransformerHelper.ts +1 -1
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataElementTransformer.ts +41 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DatabaseTransformer.ts +30 -3
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DomainTransformer.ts +5 -5
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_RuntimeTransformer.ts +1 -4
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ClassMappingSecondPassBuilder.ts +5 -1
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.ts +29 -2
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_GraphBuilderContext.ts +71 -11
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_PropertyMappingBuilder.ts +6 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataElementBuilderHelper.ts +22 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DatabaseBuilderHelper.ts +89 -17
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DomainBuilderHelper.ts +11 -8
- package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_RelationalClassMappingBuilderHelper.ts +8 -1
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataElementSerializationHelper.ts +32 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DatabaseSerializationHelper.ts +25 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_EntitlementSerializationHelper.ts +34 -0
- package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_FunctionSerializationHelper.ts +45 -17
- package/src/index.ts +6 -1
- package/tsconfig.json +5 -2
- package/lib/graph/metamodel/pure/packageableElements/function/test/FunctionStoreTestData.d.ts.map +0 -1
- package/lib/graph/metamodel/pure/packageableElements/function/test/FunctionStoreTestData.js.map +0 -1
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/function/test/V1_FunctionStoreTestData.d.ts.map +0 -1
- package/lib/graph-manager/protocol/pure/v1/model/packageableElements/function/test/V1_FunctionStoreTestData.js.map +0 -1
|
@@ -83,10 +83,7 @@ export class ConnectionStores implements Hashable {
|
|
|
83
83
|
this.connectionPointer,
|
|
84
84
|
hashArray(
|
|
85
85
|
this.storePointers.map((s) =>
|
|
86
|
-
hashElementPointer(
|
|
87
|
-
PackageableElementPointerType.STORE,
|
|
88
|
-
s.valueForSerialization ?? '',
|
|
89
|
-
),
|
|
86
|
+
hashElementPointer(undefined, s.valueForSerialization ?? ''),
|
|
90
87
|
),
|
|
91
88
|
),
|
|
92
89
|
]);
|
|
@@ -21,11 +21,15 @@ import type { PackageableElementVisitor } from '../../../PackageableElement.js';
|
|
|
21
21
|
import type { Schema } from './Schema.js';
|
|
22
22
|
import type { Join } from './Join.js';
|
|
23
23
|
import type { Filter } from './Filter.js';
|
|
24
|
+
import type { IncludeStore } from './IncludeStore.js';
|
|
25
|
+
import type { DataProduct } from '../../../../dataProduct/DataProduct.js';
|
|
26
|
+
import type { IngestDefinition } from '../../../ingest/IngestDefinition.js';
|
|
24
27
|
|
|
25
28
|
export class Database extends Store implements Hashable {
|
|
26
29
|
schemas: Schema[] = [];
|
|
27
30
|
joins: Join[] = [];
|
|
28
31
|
filters: Filter[] = [];
|
|
32
|
+
includedStoreSpecifications: IncludeStore[] = [];
|
|
29
33
|
|
|
30
34
|
protected override get _elementHashCode(): string {
|
|
31
35
|
return hashArray([
|
|
@@ -39,6 +43,7 @@ export class Database extends Store implements Hashable {
|
|
|
39
43
|
hashArray(this.filters),
|
|
40
44
|
hashArray(this.stereotypes.map((val) => val.pointerHashCode)),
|
|
41
45
|
hashArray(this.taggedValues),
|
|
46
|
+
hashArray(this.includedStoreSpecifications),
|
|
42
47
|
]);
|
|
43
48
|
}
|
|
44
49
|
|
|
@@ -48,3 +53,25 @@ export class Database extends Store implements Hashable {
|
|
|
48
53
|
return visitor.visit_Database(this);
|
|
49
54
|
}
|
|
50
55
|
}
|
|
56
|
+
|
|
57
|
+
export class INTERNAL__LakehouseGeneratedDatabase extends Database {
|
|
58
|
+
readonly generatorElement: DataProduct | IngestDefinition;
|
|
59
|
+
readonly OWNER: Database;
|
|
60
|
+
constructor(
|
|
61
|
+
generatorElement: DataProduct | IngestDefinition,
|
|
62
|
+
owner: Database,
|
|
63
|
+
) {
|
|
64
|
+
super(owner.name);
|
|
65
|
+
this.generatorElement = generatorElement;
|
|
66
|
+
this.OWNER = owner;
|
|
67
|
+
}
|
|
68
|
+
override accept_PackageableElementVisitor<T>(
|
|
69
|
+
visitor: PackageableElementVisitor<T>,
|
|
70
|
+
): T {
|
|
71
|
+
return visitor.visit_Database(this);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
override get path(): string {
|
|
75
|
+
return `${this.generatorElement.path}`;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025-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 { hashArray, type Hashable } from '@finos/legend-shared';
|
|
18
|
+
import type { PackageableElementReference } from '../../../PackageableElementReference.js';
|
|
19
|
+
import type { IngestDefinition } from '../../../ingest/IngestDefinition.js';
|
|
20
|
+
import type { DataProduct } from '../../../../dataProduct/DataProduct.js';
|
|
21
|
+
import { CORE_HASH_STRUCTURE } from '../../../../../../../graph/Core_HashUtils.js';
|
|
22
|
+
import type { INTERNAL__LakehouseGeneratedDatabase } from './Database.js';
|
|
23
|
+
|
|
24
|
+
export class IncludeStore implements Hashable {
|
|
25
|
+
packageableElementPointer: PackageableElementReference<
|
|
26
|
+
IngestDefinition | DataProduct
|
|
27
|
+
>;
|
|
28
|
+
storeType: string;
|
|
29
|
+
generatedDatabase!: INTERNAL__LakehouseGeneratedDatabase;
|
|
30
|
+
|
|
31
|
+
constructor(
|
|
32
|
+
packageableElementPointer: PackageableElementReference<
|
|
33
|
+
IngestDefinition | DataProduct
|
|
34
|
+
>,
|
|
35
|
+
storeType: string,
|
|
36
|
+
) {
|
|
37
|
+
this.packageableElementPointer = packageableElementPointer;
|
|
38
|
+
this.storeType = storeType;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
get hashCode(): string {
|
|
42
|
+
return hashArray([
|
|
43
|
+
CORE_HASH_STRUCTURE.DATABASE_INCLUDE_STORE,
|
|
44
|
+
this.packageableElementPointer.value.path,
|
|
45
|
+
this.storeType,
|
|
46
|
+
]);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -85,7 +85,7 @@ import {
|
|
|
85
85
|
observe_AtomicTest,
|
|
86
86
|
observe_TestAssertion,
|
|
87
87
|
} from './Testable_ObserverHelper.js';
|
|
88
|
-
import type {
|
|
88
|
+
import type { FunctionTestData } from '../../../graph/metamodel/pure/packageableElements/function/test/FunctionTestData.js';
|
|
89
89
|
import { observe_EmbeddedData } from './DSL_Data_ObserverHelper.js';
|
|
90
90
|
import type { HostedService } from '../../../graph/metamodel/pure/packageableElements/function/HostedService.js';
|
|
91
91
|
import type { MemSQLFunction } from '../../../graph/metamodel/pure/packageableElements/function/MemSQLFunction.js';
|
|
@@ -499,9 +499,9 @@ export const observe_FunctionTest = skipObserved(
|
|
|
499
499
|
);
|
|
500
500
|
|
|
501
501
|
export const observe_FunctionTestData = skipObservedWithContext(
|
|
502
|
-
(metamodel:
|
|
502
|
+
(metamodel: FunctionTestData, context: ObserverContext) => {
|
|
503
503
|
makeObservable(metamodel, {
|
|
504
|
-
|
|
504
|
+
element: observable,
|
|
505
505
|
data: observable,
|
|
506
506
|
hashCode: computed,
|
|
507
507
|
});
|
|
@@ -369,6 +369,7 @@ import {
|
|
|
369
369
|
V1_LineageInput,
|
|
370
370
|
type V1_RawLineageModel,
|
|
371
371
|
} from './model/lineage/V1_Lineage.js';
|
|
372
|
+
import { V1_IngestDefinition } from './model/packageableElements/ingest/V1_IngestDefinition.js';
|
|
372
373
|
|
|
373
374
|
class V1_PureModelContextDataIndex {
|
|
374
375
|
elements: V1_PackageableElement[] = [];
|
|
@@ -4587,6 +4588,9 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
|
|
|
4587
4588
|
protocol instanceof V1_INTERNAL__UnknownFunctionActivator ||
|
|
4588
4589
|
protocol instanceof V1_INTERNAL__UnknownStore
|
|
4589
4590
|
) {
|
|
4591
|
+
if (protocol instanceof V1_IngestDefinition) {
|
|
4592
|
+
return CORE_PURE_PATH.INGEST_DEFINITION;
|
|
4593
|
+
}
|
|
4590
4594
|
const _type = protocol.content._type;
|
|
4591
4595
|
const classifierPath = isString(_type)
|
|
4592
4596
|
? this.elementClassifierPathMap.get(_type)
|
package/src/graph-manager/protocol/pure/v1/lakehouse/entitlements/V1_EntitlementsDataProduct.ts
CHANGED
|
@@ -73,6 +73,19 @@ export class V1_EntitlementsDataProductDetails {
|
|
|
73
73
|
dataProduct!: V1_EntitlementsDataProduct;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
export class V1_EntitlementsDataProductLite {
|
|
77
|
+
id!: string;
|
|
78
|
+
deploymentId!: number;
|
|
79
|
+
title?: string;
|
|
80
|
+
description?: string;
|
|
81
|
+
origin?: V1_EntitlementsDataProductOrigin | null;
|
|
82
|
+
fullPath?: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
76
85
|
export class V1_EntitlementsDataProductDetailsResponse {
|
|
77
86
|
dataProducts?: V1_EntitlementsDataProductDetails[];
|
|
78
87
|
}
|
|
88
|
+
|
|
89
|
+
export class V1_EntitlementsDataProductLiteResponse {
|
|
90
|
+
dataProducts?: V1_EntitlementsDataProductLite[];
|
|
91
|
+
}
|
|
@@ -31,6 +31,7 @@ export interface V1_EmbeddedDataVisitor<T> {
|
|
|
31
31
|
|
|
32
32
|
visit_ExternalFormatData(data: V1_ExternalFormatData): T;
|
|
33
33
|
visit_ModelStoreData(data: V1_ModelStoreData): T;
|
|
34
|
+
visit_RelationElementsData(data: V1_RelationElementsData): T;
|
|
34
35
|
visit_DataElementReference(data: V1_DataElementReference): T;
|
|
35
36
|
visit_RelationalData(data: V1_RelationalCSVData): T;
|
|
36
37
|
}
|
|
@@ -125,3 +126,47 @@ export class V1_ModelStoreData extends V1_EmbeddedData implements Hashable {
|
|
|
125
126
|
return visitor.visit_ModelStoreData(this);
|
|
126
127
|
}
|
|
127
128
|
}
|
|
129
|
+
|
|
130
|
+
export class V1_RelationRowTestData implements Hashable {
|
|
131
|
+
values!: string[];
|
|
132
|
+
|
|
133
|
+
get hashCode(): string {
|
|
134
|
+
return hashArray([
|
|
135
|
+
CORE_HASH_STRUCTURE.RELATION_ROW_TEST_DATA,
|
|
136
|
+
hashArray(this.values),
|
|
137
|
+
]);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export class V1_RelationElement implements Hashable {
|
|
142
|
+
paths!: string[];
|
|
143
|
+
columns!: string[];
|
|
144
|
+
rows: V1_RelationRowTestData[] = [];
|
|
145
|
+
|
|
146
|
+
get hashCode(): string {
|
|
147
|
+
return hashArray([
|
|
148
|
+
CORE_HASH_STRUCTURE.RELATION_ELEMENT,
|
|
149
|
+
hashArray(this.paths),
|
|
150
|
+
hashArray(this.columns),
|
|
151
|
+
hashArray(this.rows),
|
|
152
|
+
]);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export class V1_RelationElementsData
|
|
157
|
+
extends V1_EmbeddedData
|
|
158
|
+
implements Hashable
|
|
159
|
+
{
|
|
160
|
+
relationElements: V1_RelationElement[] = [];
|
|
161
|
+
|
|
162
|
+
get hashCode(): string {
|
|
163
|
+
return hashArray([
|
|
164
|
+
CORE_HASH_STRUCTURE.RELATION_ELEMENTS_DATA,
|
|
165
|
+
hashArray(this.relationElements),
|
|
166
|
+
]);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
accept_EmbeddedDataVisitor<T>(visitor: V1_EmbeddedDataVisitor<T>): T {
|
|
170
|
+
return visitor.visit_RelationElementsData(this);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
@@ -19,16 +19,16 @@ import type { V1_EmbeddedData } from '../../../data/V1_EmbeddedData.js';
|
|
|
19
19
|
import { CORE_HASH_STRUCTURE } from '../../../../../../../../graph/Core_HashUtils.js';
|
|
20
20
|
import type { V1_PackageableElementPointer } from '../../V1_PackageableElement.js';
|
|
21
21
|
|
|
22
|
-
export class
|
|
22
|
+
export class V1_FunctionTestData implements Hashable {
|
|
23
23
|
doc: string | undefined;
|
|
24
|
-
|
|
24
|
+
packageableElementPointer!: V1_PackageableElementPointer;
|
|
25
25
|
data!: V1_EmbeddedData;
|
|
26
26
|
|
|
27
27
|
get hashCode(): string {
|
|
28
28
|
return hashArray([
|
|
29
29
|
CORE_HASH_STRUCTURE.FUNCTION_STORE_TEST_DATA,
|
|
30
30
|
this.doc ?? '',
|
|
31
|
-
this.
|
|
31
|
+
this.packageableElementPointer.path,
|
|
32
32
|
this.data,
|
|
33
33
|
]);
|
|
34
34
|
}
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
import { hashArray } from '@finos/legend-shared';
|
|
18
18
|
import { V1_TestSuite } from '../../../test/V1_TestSuite.js';
|
|
19
19
|
import { CORE_HASH_STRUCTURE } from '../../../../../../../../graph/Core_HashUtils.js';
|
|
20
|
-
import type {
|
|
20
|
+
import type { V1_FunctionTestData } from './V1_FunctionTestData.js';
|
|
21
21
|
|
|
22
22
|
export class V1_FunctionTestSuite extends V1_TestSuite {
|
|
23
|
-
testData:
|
|
23
|
+
testData: V1_FunctionTestData[] | undefined;
|
|
24
24
|
|
|
25
25
|
override get hashCode(): string {
|
|
26
26
|
return hashArray([
|
|
@@ -23,6 +23,7 @@ import type { V1_Join } from './V1_Join.js';
|
|
|
23
23
|
import type { V1_Filter } from './V1_Filter.js';
|
|
24
24
|
import type { V1_StereotypePtr } from '../../../domain/V1_StereotypePtr.js';
|
|
25
25
|
import type { V1_TaggedValue } from '../../../domain/V1_TaggedValue.js';
|
|
26
|
+
import type { V1_IncludeStore } from './V1_IncludeStore.js';
|
|
26
27
|
|
|
27
28
|
export class V1_Database extends V1_Store implements Hashable {
|
|
28
29
|
schemas: V1_Schema[] = [];
|
|
@@ -30,6 +31,7 @@ export class V1_Database extends V1_Store implements Hashable {
|
|
|
30
31
|
filters: V1_Filter[] = [];
|
|
31
32
|
stereotypes: V1_StereotypePtr[] = [];
|
|
32
33
|
taggedValues: V1_TaggedValue[] = [];
|
|
34
|
+
includedStoreSpecifications: V1_IncludeStore[] = [];
|
|
33
35
|
|
|
34
36
|
override get hashCode(): string {
|
|
35
37
|
return hashArray([
|
|
@@ -41,6 +43,7 @@ export class V1_Database extends V1_Store implements Hashable {
|
|
|
41
43
|
hashArray(this.filters),
|
|
42
44
|
hashArray(this.stereotypes),
|
|
43
45
|
hashArray(this.taggedValues),
|
|
46
|
+
hashArray(this.includedStoreSpecifications),
|
|
44
47
|
]);
|
|
45
48
|
}
|
|
46
49
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025-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 Hashable, hashArray } from '@finos/legend-shared';
|
|
18
|
+
import { type V1_PackageableElementPointer } from '../../../../../model/packageableElements/V1_PackageableElement.js';
|
|
19
|
+
import { CORE_HASH_STRUCTURE } from '../../../../../../../../../graph/Core_HashUtils.js';
|
|
20
|
+
|
|
21
|
+
export class V1_IncludeStore implements Hashable {
|
|
22
|
+
packageableElementPointer!: V1_PackageableElementPointer;
|
|
23
|
+
storeType!: string;
|
|
24
|
+
|
|
25
|
+
get hashCode(): string {
|
|
26
|
+
return hashArray([
|
|
27
|
+
CORE_HASH_STRUCTURE.DATABASE_INCLUDE_STORE,
|
|
28
|
+
this.packageableElementPointer.path,
|
|
29
|
+
this.storeType,
|
|
30
|
+
]);
|
|
31
|
+
}
|
|
32
|
+
}
|
package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_CoreTransformerHelper.ts
CHANGED
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
export const V1_transformElementReferencePointer = <
|
|
27
27
|
T extends PackageableElement,
|
|
28
28
|
>(
|
|
29
|
-
pointerType: string,
|
|
29
|
+
pointerType: string | undefined,
|
|
30
30
|
ref: PackageableElementReference<T>,
|
|
31
31
|
): V1_PackageableElementPointer =>
|
|
32
32
|
new V1_PackageableElementPointer(
|
|
@@ -23,6 +23,9 @@ import {
|
|
|
23
23
|
ModelStoreData,
|
|
24
24
|
ModelEmbeddedData,
|
|
25
25
|
ModelInstanceData,
|
|
26
|
+
RelationElementsData,
|
|
27
|
+
type RelationElement,
|
|
28
|
+
type RelationRowTestData,
|
|
26
29
|
} from '../../../../../../../graph/metamodel/pure/data/EmbeddedData.js';
|
|
27
30
|
import {
|
|
28
31
|
type RelationalCSVDataTable,
|
|
@@ -38,6 +41,9 @@ import {
|
|
|
38
41
|
V1_ModelStoreData,
|
|
39
42
|
V1_ModelEmbeddedData,
|
|
40
43
|
V1_ModelInstanceData,
|
|
44
|
+
V1_RelationElementsData,
|
|
45
|
+
V1_RelationElement,
|
|
46
|
+
V1_RelationRowTestData,
|
|
41
47
|
} from '../../../model/data/V1_EmbeddedData.js';
|
|
42
48
|
import {
|
|
43
49
|
V1_RelationalCSVData,
|
|
@@ -103,6 +109,39 @@ const V1_transformModelStoreData = (
|
|
|
103
109
|
return modelStoreDataElement;
|
|
104
110
|
};
|
|
105
111
|
|
|
112
|
+
const V1_transformRelationRowTestData = (
|
|
113
|
+
element: RelationRowTestData,
|
|
114
|
+
context: V1_GraphTransformerContext,
|
|
115
|
+
): V1_RelationRowTestData => {
|
|
116
|
+
const relationRowTestData = new V1_RelationRowTestData();
|
|
117
|
+
relationRowTestData.values = element.values;
|
|
118
|
+
return relationRowTestData;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
const V1_transformRelationElement = (
|
|
122
|
+
element: RelationElement,
|
|
123
|
+
context: V1_GraphTransformerContext,
|
|
124
|
+
): V1_RelationElement => {
|
|
125
|
+
const relationElement = new V1_RelationElement();
|
|
126
|
+
relationElement.paths = element.paths;
|
|
127
|
+
relationElement.columns = element.columns;
|
|
128
|
+
relationElement.rows = element.rows.map((row) =>
|
|
129
|
+
V1_transformRelationRowTestData(row, context),
|
|
130
|
+
);
|
|
131
|
+
return relationElement;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
const V1_transformRelationElementsData = (
|
|
135
|
+
element: RelationElementsData,
|
|
136
|
+
context: V1_GraphTransformerContext,
|
|
137
|
+
): V1_RelationElementsData => {
|
|
138
|
+
const relationElementsDataElement = new V1_RelationElementsData();
|
|
139
|
+
relationElementsDataElement.relationElements = element.relationElements.map(
|
|
140
|
+
(relationElement) => V1_transformRelationElement(relationElement, context),
|
|
141
|
+
);
|
|
142
|
+
return relationElementsDataElement;
|
|
143
|
+
};
|
|
144
|
+
|
|
106
145
|
export const V1_transformExternalFormatData = (
|
|
107
146
|
element: ExternalFormatData,
|
|
108
147
|
): V1_ExternalFormatData => {
|
|
@@ -180,6 +219,8 @@ export function V1_transformEmbeddedData(
|
|
|
180
219
|
return V1_transformModelStoreData(metamodel, context);
|
|
181
220
|
} else if (metamodel instanceof ExternalFormatData) {
|
|
182
221
|
return V1_transformExternalFormatData(metamodel);
|
|
222
|
+
} else if (metamodel instanceof RelationElementsData) {
|
|
223
|
+
return V1_transformRelationElementsData(metamodel, context);
|
|
183
224
|
} else if (metamodel instanceof DataElementReference) {
|
|
184
225
|
return V1_transformDataElementReference(metamodel, context);
|
|
185
226
|
} else if (metamodel instanceof RelationalCSVData) {
|
package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DatabaseTransformer.ts
CHANGED
|
@@ -15,7 +15,10 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { UnsupportedOperationError } from '@finos/legend-shared';
|
|
18
|
-
import
|
|
18
|
+
import {
|
|
19
|
+
INTERNAL__LakehouseGeneratedDatabase,
|
|
20
|
+
type Database,
|
|
21
|
+
} from '../../../../../../../graph/metamodel/pure/packageableElements/store/relational/model/Database.js';
|
|
19
22
|
import {
|
|
20
23
|
type RelationalDataType,
|
|
21
24
|
Real,
|
|
@@ -61,6 +64,7 @@ import {
|
|
|
61
64
|
import type { ColumnMapping } from '../../../../../../../graph/metamodel/pure/packageableElements/store/relational/model/ColumnMapping.js';
|
|
62
65
|
import type { View } from '../../../../../../../graph/metamodel/pure/packageableElements/store/relational/model/View.js';
|
|
63
66
|
import type { Schema } from '../../../../../../../graph/metamodel/pure/packageableElements/store/relational/model/Schema.js';
|
|
67
|
+
import { type IncludeStore } from '../../../../../../../graph/metamodel/pure/packageableElements/store/relational/model/IncludeStore.js';
|
|
64
68
|
import {
|
|
65
69
|
type V1_RelationalDataType,
|
|
66
70
|
V1_VarChar,
|
|
@@ -114,6 +118,7 @@ import {
|
|
|
114
118
|
import { V1_PackageableElementPointer } from '../../../model/packageableElements/V1_PackageableElement.js';
|
|
115
119
|
import type { TabularFunction } from '../../../../../../../graph/metamodel/pure/packageableElements/store/relational/model/TabularFunction.js';
|
|
116
120
|
import { V1_TabularFunction } from '../../../model/packageableElements/store/relational/model/V1_TabularFunction.js';
|
|
121
|
+
import { V1_IncludeStore } from '../../../model/packageableElements/store/relational/model/V1_IncludeStore.js';
|
|
117
122
|
|
|
118
123
|
const transformRelationalDataType = (
|
|
119
124
|
type: RelationalDataType,
|
|
@@ -194,9 +199,17 @@ export const V1_transformTableAliasToTablePointer = (
|
|
|
194
199
|
},
|
|
195
200
|
): V1_TablePtr => {
|
|
196
201
|
const tablePtr = new V1_TablePtr();
|
|
202
|
+
const ownerRef = tableAlias.relation.ownerReference;
|
|
197
203
|
tablePtr.database = options?.TEMPORARY__resolveToFullPath
|
|
198
|
-
?
|
|
199
|
-
: (
|
|
204
|
+
? ownerRef.value.path
|
|
205
|
+
: (ownerRef.valueForSerialization ?? '');
|
|
206
|
+
// make sure reference is to the owner not the generated database
|
|
207
|
+
if (
|
|
208
|
+
ownerRef.value instanceof INTERNAL__LakehouseGeneratedDatabase &&
|
|
209
|
+
ownerRef.valueForSerialization === ownerRef.value.OWNER.path
|
|
210
|
+
) {
|
|
211
|
+
tablePtr.database = ownerRef.valueForSerialization;
|
|
212
|
+
}
|
|
200
213
|
// NOTE: Sometimes, we interpret this, so to maintain roundtrip stability, we need to handle this differrently
|
|
201
214
|
// See https://github.com/finos/legend-studio/issues/295
|
|
202
215
|
tablePtr.mainTableDb = tablePtr.database;
|
|
@@ -458,6 +471,16 @@ const transformSchema = (
|
|
|
458
471
|
return schema;
|
|
459
472
|
};
|
|
460
473
|
|
|
474
|
+
const transformIncludeStore = (element: IncludeStore): V1_IncludeStore => {
|
|
475
|
+
const v1IncludeStore = new V1_IncludeStore();
|
|
476
|
+
v1IncludeStore.packageableElementPointer = new V1_PackageableElementPointer(
|
|
477
|
+
undefined,
|
|
478
|
+
element.packageableElementPointer.valueForSerialization ?? '',
|
|
479
|
+
);
|
|
480
|
+
v1IncludeStore.storeType = element.storeType;
|
|
481
|
+
return v1IncludeStore;
|
|
482
|
+
};
|
|
483
|
+
|
|
461
484
|
export const V1_transformDatabase = (
|
|
462
485
|
element: Database,
|
|
463
486
|
context: V1_GraphTransformerContext,
|
|
@@ -484,5 +507,9 @@ export const V1_transformDatabase = (
|
|
|
484
507
|
store.valueForSerialization ?? '',
|
|
485
508
|
),
|
|
486
509
|
);
|
|
510
|
+
database.includedStoreSpecifications =
|
|
511
|
+
element.includedStoreSpecifications.map((includeStore) =>
|
|
512
|
+
transformIncludeStore(includeStore),
|
|
513
|
+
);
|
|
487
514
|
return database;
|
|
488
515
|
};
|
package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DomainTransformer.ts
CHANGED
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
V1_FunctionTest,
|
|
72
72
|
} from '../../../model/packageableElements/function/test/V1_FunctionTest.js';
|
|
73
73
|
import { UnsupportedOperationError } from '@finos/legend-shared';
|
|
74
|
-
import {
|
|
74
|
+
import { V1_FunctionTestData } from '../../../model/packageableElements/function/test/V1_FunctionTestData.js';
|
|
75
75
|
import { V1_transformEmbeddedData } from './V1_DataElementTransformer.js';
|
|
76
76
|
import { V1_transformTestAssertion } from './V1_TestTransformer.js';
|
|
77
77
|
import { V1_DefaultValue } from '../../../model/packageableElements/domain/V1_DefaultValue.js';
|
|
@@ -354,11 +354,11 @@ const V1_transformFunctionSuite = (
|
|
|
354
354
|
testSuite.doc = element.doc;
|
|
355
355
|
if (element.testData?.length) {
|
|
356
356
|
testSuite.testData = element.testData.map((elementData) => {
|
|
357
|
-
const pTestData = new
|
|
357
|
+
const pTestData = new V1_FunctionTestData();
|
|
358
358
|
pTestData.doc = elementData.doc;
|
|
359
|
-
pTestData.
|
|
360
|
-
|
|
361
|
-
elementData.
|
|
359
|
+
pTestData.packageableElementPointer = V1_transformElementReferencePointer(
|
|
360
|
+
undefined,
|
|
361
|
+
elementData.element,
|
|
362
362
|
);
|
|
363
363
|
pTestData.data = V1_transformEmbeddedData(elementData.data, context);
|
|
364
364
|
return pTestData;
|
package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_RuntimeTransformer.ts
CHANGED
|
@@ -98,10 +98,7 @@ const transformEngineRuntime = (
|
|
|
98
98
|
connection.connectionPointer,
|
|
99
99
|
);
|
|
100
100
|
val.storePointers = connection.storePointers.map((s) =>
|
|
101
|
-
V1_transformElementReferencePointer(
|
|
102
|
-
PackageableElementPointerType.STORE,
|
|
103
|
-
s,
|
|
104
|
-
),
|
|
101
|
+
V1_transformElementReferencePointer(undefined, s),
|
|
105
102
|
);
|
|
106
103
|
return val;
|
|
107
104
|
});
|
|
@@ -247,7 +247,11 @@ export class V1_ClassMappingSecondPassBuilder
|
|
|
247
247
|
}
|
|
248
248
|
let mainTableAlias: TableAlias | undefined;
|
|
249
249
|
if (classMapping.mainTable) {
|
|
250
|
-
const relation = this.context.resolveRelation(
|
|
250
|
+
const relation = this.context.resolveRelation(
|
|
251
|
+
classMapping.mainTable,
|
|
252
|
+
undefined,
|
|
253
|
+
true,
|
|
254
|
+
);
|
|
251
255
|
mainTableAlias = new TableAlias();
|
|
252
256
|
mainTableAlias.relation = relation;
|
|
253
257
|
mainTableAlias.name = relation.value.name;
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
LogEvent,
|
|
25
25
|
guaranteeType,
|
|
26
26
|
guaranteeNonNullable,
|
|
27
|
+
returnUndefOnError,
|
|
27
28
|
} from '@finos/legend-shared';
|
|
28
29
|
import { Stereotype } from '../../../../../../../graph/metamodel/pure/packageableElements/domain/Stereotype.js';
|
|
29
30
|
import { Tag } from '../../../../../../../graph/metamodel/pure/packageableElements/domain/Tag.js';
|
|
@@ -63,7 +64,10 @@ import {
|
|
|
63
64
|
V1_buildMappingInclude,
|
|
64
65
|
} from './helpers/V1_MappingBuilderHelper.js';
|
|
65
66
|
import { V1_buildFlatDataSection } from './helpers/V1_FlatDataStoreBuilderHelper.js';
|
|
66
|
-
import {
|
|
67
|
+
import {
|
|
68
|
+
V1_buildSchema,
|
|
69
|
+
V1_initInternalLakehouseGeneratedDatabase,
|
|
70
|
+
} from './helpers/V1_DatabaseBuilderHelper.js';
|
|
67
71
|
import {
|
|
68
72
|
V1_buildConfigurationProperty,
|
|
69
73
|
V1_buildScopeElement,
|
|
@@ -94,7 +98,10 @@ import type { V1_ExecutionEnvironmentInstance } from '../../../model/packageable
|
|
|
94
98
|
import { V1_buildExecutionParameters } from './V1_ExecutionEnvironmentBuilderHelper.js';
|
|
95
99
|
import type { V1_INTERNAL__UnknownPackageableElement } from '../../../model/packageableElements/V1_INTERNAL__UnknownPackageableElement.js';
|
|
96
100
|
import type { V1_INTERNAL__UnknownFunctionActivator } from '../../../model/packageableElements/function/V1_INTERNAL__UnknownFunctionActivator.js';
|
|
97
|
-
import {
|
|
101
|
+
import {
|
|
102
|
+
PackageableElementExplicitReference,
|
|
103
|
+
PackageableElementImplicitReference,
|
|
104
|
+
} from '../../../../../../../graph/metamodel/pure/packageableElements/PackageableElementReference.js';
|
|
98
105
|
import { generateFunctionPrettyName } from '../../../../../../../graph/helpers/PureLanguageHelper.js';
|
|
99
106
|
import type { DSL_Mapping_PureProtocolProcessorPlugin_Extension } from '../../../../extensions/DSL_Mapping_PureProtocolProcessorPlugin_Extension.js';
|
|
100
107
|
import {
|
|
@@ -136,6 +143,7 @@ import {
|
|
|
136
143
|
V1_buildDataProductLink,
|
|
137
144
|
} from './helpers/V1_DataProductBuilder.js';
|
|
138
145
|
import type { V1_IngestDefinition } from '../../../model/packageableElements/ingest/V1_IngestDefinition.js';
|
|
146
|
+
import { IncludeStore } from '../../../../../../../graph/metamodel/pure/packageableElements/store/relational/model/IncludeStore.js';
|
|
139
147
|
|
|
140
148
|
export class V1_ElementSecondPassBuilder
|
|
141
149
|
implements V1_PackageableElementVisitor<void>
|
|
@@ -507,6 +515,25 @@ export class V1_ElementSecondPassBuilder
|
|
|
507
515
|
database.includes = element.includedStores.map((includedStore) =>
|
|
508
516
|
this.context.resolveDatabase(includedStore.path),
|
|
509
517
|
);
|
|
518
|
+
database.includedStoreSpecifications =
|
|
519
|
+
element.includedStoreSpecifications.map((v1IncludeStore) => {
|
|
520
|
+
const storePath = v1IncludeStore.packageableElementPointer.path;
|
|
521
|
+
const storeElement = guaranteeNonNullable(
|
|
522
|
+
returnUndefOnError(() =>
|
|
523
|
+
this.context.graph.getIngestDefinition(storePath),
|
|
524
|
+
) ??
|
|
525
|
+
returnUndefOnError(() =>
|
|
526
|
+
this.context.graph.getDataProduct(storePath),
|
|
527
|
+
),
|
|
528
|
+
`Ingest/Data Product ${storePath} not found`,
|
|
529
|
+
);
|
|
530
|
+
const includedStore = new IncludeStore(
|
|
531
|
+
PackageableElementImplicitReference.create(storeElement, storePath),
|
|
532
|
+
v1IncludeStore.storeType,
|
|
533
|
+
);
|
|
534
|
+
V1_initInternalLakehouseGeneratedDatabase(includedStore, database);
|
|
535
|
+
return includedStore;
|
|
536
|
+
});
|
|
510
537
|
database.schemas = element.schemas.map((schema) =>
|
|
511
538
|
V1_buildSchema(schema, database, this.context),
|
|
512
539
|
);
|