@finos/legend-graph 32.6.1 → 32.6.3

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.
Files changed (199) hide show
  1. package/lib/graph/BasicModel.d.ts.map +1 -1
  2. package/lib/graph/BasicModel.js +1 -0
  3. package/lib/graph/BasicModel.js.map +1 -1
  4. package/lib/graph/Core_HashUtils.d.ts +7 -0
  5. package/lib/graph/Core_HashUtils.d.ts.map +1 -1
  6. package/lib/graph/Core_HashUtils.js +7 -0
  7. package/lib/graph/Core_HashUtils.js.map +1 -1
  8. package/lib/graph/MetaModelConst.d.ts +9 -1
  9. package/lib/graph/MetaModelConst.d.ts.map +1 -1
  10. package/lib/graph/MetaModelConst.js +9 -0
  11. package/lib/graph/MetaModelConst.js.map +1 -1
  12. package/lib/graph/metamodel/pure/data/DataResolver.d.ts +32 -0
  13. package/lib/graph/metamodel/pure/data/DataResolver.d.ts.map +1 -0
  14. package/lib/graph/metamodel/pure/data/DataResolver.js +40 -0
  15. package/lib/graph/metamodel/pure/data/DataResolver.js.map +1 -0
  16. package/lib/graph/metamodel/pure/data/EmbeddedData.d.ts +1 -1
  17. package/lib/graph/metamodel/pure/data/EmbeddedData.d.ts.map +1 -1
  18. package/lib/graph/metamodel/pure/data/EmbeddedData.js +2 -2
  19. package/lib/graph/metamodel/pure/data/EmbeddedData.js.map +1 -1
  20. package/lib/graph/metamodel/pure/dataProduct/DataProduct.d.ts +6 -1
  21. package/lib/graph/metamodel/pure/dataProduct/DataProduct.d.ts.map +1 -1
  22. package/lib/graph/metamodel/pure/dataProduct/DataProduct.js +3 -0
  23. package/lib/graph/metamodel/pure/dataProduct/DataProduct.js.map +1 -1
  24. package/lib/graph/metamodel/pure/dataProduct/test/DataProductAccessPointTest.d.ts +22 -0
  25. package/lib/graph/metamodel/pure/dataProduct/test/DataProductAccessPointTest.d.ts.map +1 -0
  26. package/lib/graph/metamodel/pure/dataProduct/test/DataProductAccessPointTest.js +31 -0
  27. package/lib/graph/metamodel/pure/dataProduct/test/DataProductAccessPointTest.js.map +1 -0
  28. package/lib/graph/metamodel/pure/dataProduct/test/DataProductTestSuite.d.ts +23 -0
  29. package/lib/graph/metamodel/pure/dataProduct/test/DataProductTestSuite.d.ts.map +1 -0
  30. package/lib/graph/metamodel/pure/dataProduct/test/DataProductTestSuite.js +31 -0
  31. package/lib/graph/metamodel/pure/dataProduct/test/DataProductTestSuite.js.map +1 -0
  32. package/lib/graph/metamodel/pure/packageableElements/relation/Accessor.d.ts +9 -2
  33. package/lib/graph/metamodel/pure/packageableElements/relation/Accessor.d.ts.map +1 -1
  34. package/lib/graph/metamodel/pure/packageableElements/relation/Accessor.js +18 -1
  35. package/lib/graph/metamodel/pure/packageableElements/relation/Accessor.js.map +1 -1
  36. package/lib/graph/metamodel/pure/test/assertion/EqualToRelation.d.ts +23 -0
  37. package/lib/graph/metamodel/pure/test/assertion/EqualToRelation.d.ts.map +1 -0
  38. package/lib/graph/metamodel/pure/test/assertion/EqualToRelation.js +32 -0
  39. package/lib/graph/metamodel/pure/test/assertion/EqualToRelation.js.map +1 -0
  40. package/lib/graph/metamodel/pure/test/assertion/TestAssertion.d.ts +2 -0
  41. package/lib/graph/metamodel/pure/test/assertion/TestAssertion.d.ts.map +1 -1
  42. package/lib/graph/metamodel/pure/test/assertion/TestAssertion.js.map +1 -1
  43. package/lib/graph/metamodel/pure/test/assertion/status/EqualToRelationAssertFail.d.ts +21 -0
  44. package/lib/graph/metamodel/pure/test/assertion/status/EqualToRelationAssertFail.d.ts.map +1 -0
  45. package/lib/graph/metamodel/pure/test/assertion/status/EqualToRelationAssertFail.js +21 -0
  46. package/lib/graph/metamodel/pure/test/assertion/status/EqualToRelationAssertFail.js.map +1 -0
  47. package/lib/graph-manager/AbstractPureGraphManager.d.ts +8 -2
  48. package/lib/graph-manager/AbstractPureGraphManager.d.ts.map +1 -1
  49. package/lib/graph-manager/AbstractPureGraphManager.js.map +1 -1
  50. package/lib/graph-manager/action/changeDetection/DataProductObserveHelper.d.ts +7 -2
  51. package/lib/graph-manager/action/changeDetection/DataProductObserveHelper.d.ts.map +1 -1
  52. package/lib/graph-manager/action/changeDetection/DataProductObserveHelper.js +38 -4
  53. package/lib/graph-manager/action/changeDetection/DataProductObserveHelper.js.map +1 -1
  54. package/lib/graph-manager/action/changeDetection/PackageableElementObserver.js +1 -1
  55. package/lib/graph-manager/action/changeDetection/PackageableElementObserver.js.map +1 -1
  56. package/lib/graph-manager/action/changeDetection/Testable_ObserverHelper.d.ts +2 -0
  57. package/lib/graph-manager/action/changeDetection/Testable_ObserverHelper.d.ts.map +1 -1
  58. package/lib/graph-manager/action/changeDetection/Testable_ObserverHelper.js +15 -0
  59. package/lib/graph-manager/action/changeDetection/Testable_ObserverHelper.js.map +1 -1
  60. package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.d.ts +8 -2
  61. package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.d.ts.map +1 -1
  62. package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.js +58 -5
  63. package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.js.map +1 -1
  64. package/lib/graph-manager/protocol/pure/v1/helpers/V1_AccessorHelper.d.ts +23 -1
  65. package/lib/graph-manager/protocol/pure/v1/helpers/V1_AccessorHelper.d.ts.map +1 -1
  66. package/lib/graph-manager/protocol/pure/v1/helpers/V1_AccessorHelper.js +163 -5
  67. package/lib/graph-manager/protocol/pure/v1/helpers/V1_AccessorHelper.js.map +1 -1
  68. package/lib/graph-manager/protocol/pure/v1/model/data/V1_DataResolver.d.ts +31 -0
  69. package/lib/graph-manager/protocol/pure/v1/model/data/V1_DataResolver.d.ts.map +1 -0
  70. package/lib/graph-manager/protocol/pure/v1/model/data/V1_DataResolver.js +40 -0
  71. package/lib/graph-manager/protocol/pure/v1/model/data/V1_DataResolver.js.map +1 -0
  72. package/lib/graph-manager/protocol/pure/v1/model/data/V1_EmbeddedData.d.ts +1 -1
  73. package/lib/graph-manager/protocol/pure/v1/model/data/V1_EmbeddedData.d.ts.map +1 -1
  74. package/lib/graph-manager/protocol/pure/v1/model/data/V1_EmbeddedData.js +2 -2
  75. package/lib/graph-manager/protocol/pure/v1/model/data/V1_EmbeddedData.js.map +1 -1
  76. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.d.ts +2 -0
  77. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.d.ts.map +1 -1
  78. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.js +2 -0
  79. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.js.map +1 -1
  80. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/test/V1_AccessPointTest.d.ts +22 -0
  81. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/test/V1_AccessPointTest.d.ts.map +1 -0
  82. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/test/V1_AccessPointTest.js +31 -0
  83. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/test/V1_AccessPointTest.js.map +1 -0
  84. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/test/V1_DataProductTestSuite.d.ts +23 -0
  85. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/test/V1_DataProductTestSuite.d.ts.map +1 -0
  86. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/test/V1_DataProductTestSuite.js +31 -0
  87. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/test/V1_DataProductTestSuite.js.map +1 -0
  88. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/ingest/V1_IngestDefinition.d.ts +19 -0
  89. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/ingest/V1_IngestDefinition.d.ts.map +1 -1
  90. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/ingest/V1_IngestDefinition.js +20 -0
  91. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/ingest/V1_IngestDefinition.js.map +1 -1
  92. package/lib/graph-manager/protocol/pure/v1/model/test/assertion/V1_EqualToRelation.d.ts +23 -0
  93. package/lib/graph-manager/protocol/pure/v1/model/test/assertion/V1_EqualToRelation.d.ts.map +1 -0
  94. package/lib/graph-manager/protocol/pure/v1/model/test/assertion/V1_EqualToRelation.js +32 -0
  95. package/lib/graph-manager/protocol/pure/v1/model/test/assertion/V1_EqualToRelation.js.map +1 -0
  96. package/lib/graph-manager/protocol/pure/v1/model/test/assertion/V1_TestAssertion.d.ts +2 -0
  97. package/lib/graph-manager/protocol/pure/v1/model/test/assertion/V1_TestAssertion.d.ts.map +1 -1
  98. package/lib/graph-manager/protocol/pure/v1/model/test/assertion/V1_TestAssertion.js.map +1 -1
  99. package/lib/graph-manager/protocol/pure/v1/model/test/assertion/status/V1_EqualToRelationAssertFail.d.ts +23 -0
  100. package/lib/graph-manager/protocol/pure/v1/model/test/assertion/status/V1_EqualToRelationAssertFail.d.ts.map +1 -0
  101. package/lib/graph-manager/protocol/pure/v1/model/test/assertion/status/V1_EqualToRelationAssertFail.js +32 -0
  102. package/lib/graph-manager/protocol/pure/v1/model/test/assertion/status/V1_EqualToRelationAssertFail.js.map +1 -0
  103. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.d.ts +6 -0
  104. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.d.ts.map +1 -1
  105. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.js +31 -0
  106. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.js.map +1 -1
  107. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataResolverTransformer.d.ts +20 -0
  108. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataResolverTransformer.d.ts.map +1 -0
  109. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataResolverTransformer.js +35 -0
  110. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataResolverTransformer.js.map +1 -0
  111. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_TestTransformer.d.ts.map +1 -1
  112. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_TestTransformer.js +20 -0
  113. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_TestTransformer.js.map +1 -1
  114. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.d.ts.map +1 -1
  115. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.js +4 -1
  116. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.js.map +1 -1
  117. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.d.ts +3 -0
  118. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.d.ts.map +1 -1
  119. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.js +29 -0
  120. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.js.map +1 -1
  121. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataResolverBuilderHelper.d.ts +20 -0
  122. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataResolverBuilderHelper.d.ts.map +1 -0
  123. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataResolverBuilderHelper.js +34 -0
  124. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataResolverBuilderHelper.js.map +1 -0
  125. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_TestBuilderHelper.d.ts.map +1 -1
  126. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_TestBuilderHelper.js +21 -1
  127. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_TestBuilderHelper.js.map +1 -1
  128. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_TestResultBuilderHelper.d.ts.map +1 -1
  129. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_TestResultBuilderHelper.js +23 -1
  130. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_TestResultBuilderHelper.js.map +1 -1
  131. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_ValueSpecificationBuilderHelper.d.ts.map +1 -1
  132. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_ValueSpecificationBuilderHelper.js +17 -3
  133. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_ValueSpecificationBuilderHelper.js.map +1 -1
  134. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataElementSerializationHelper.js +1 -1
  135. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataElementSerializationHelper.js.map +1 -1
  136. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.d.ts.map +1 -1
  137. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.js +25 -3
  138. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.js.map +1 -1
  139. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataResolverSerializationHelper.d.ts +21 -0
  140. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataResolverSerializationHelper.d.ts.map +1 -0
  141. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataResolverSerializationHelper.js +59 -0
  142. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataResolverSerializationHelper.js.map +1 -0
  143. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_IngestSerializationHelper.d.ts +3 -1
  144. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_IngestSerializationHelper.d.ts.map +1 -1
  145. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_IngestSerializationHelper.js +36 -1
  146. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_IngestSerializationHelper.js.map +1 -1
  147. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_TestSerializationHelper.d.ts +4 -1
  148. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_TestSerializationHelper.d.ts.map +1 -1
  149. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_TestSerializationHelper.js +27 -1
  150. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_TestSerializationHelper.js.map +1 -1
  151. package/lib/index.d.ts +15 -5
  152. package/lib/index.d.ts.map +1 -1
  153. package/lib/index.js +15 -5
  154. package/lib/index.js.map +1 -1
  155. package/lib/package.json +1 -1
  156. package/package.json +3 -3
  157. package/src/graph/BasicModel.ts +1 -0
  158. package/src/graph/Core_HashUtils.ts +7 -0
  159. package/src/graph/MetaModelConst.ts +10 -0
  160. package/src/graph/metamodel/pure/data/DataResolver.ts +49 -0
  161. package/src/graph/metamodel/pure/data/EmbeddedData.ts +2 -2
  162. package/src/graph/metamodel/pure/dataProduct/DataProduct.ts +7 -1
  163. package/src/graph/metamodel/pure/dataProduct/test/DataProductAccessPointTest.ts +33 -0
  164. package/src/graph/metamodel/pure/dataProduct/test/DataProductTestSuite.ts +34 -0
  165. package/src/graph/metamodel/pure/packageableElements/relation/Accessor.ts +21 -3
  166. package/src/graph/metamodel/pure/test/assertion/EqualToRelation.ts +36 -0
  167. package/src/graph/metamodel/pure/test/assertion/TestAssertion.ts +2 -0
  168. package/src/graph/metamodel/pure/test/assertion/status/EqualToRelationAssertFail.ts +22 -0
  169. package/src/graph-manager/AbstractPureGraphManager.ts +29 -3
  170. package/src/graph-manager/action/changeDetection/DataProductObserveHelper.ts +58 -4
  171. package/src/graph-manager/action/changeDetection/PackageableElementObserver.ts +1 -1
  172. package/src/graph-manager/action/changeDetection/Testable_ObserverHelper.ts +17 -0
  173. package/src/graph-manager/protocol/pure/v1/V1_PureGraphManager.ts +104 -5
  174. package/src/graph-manager/protocol/pure/v1/helpers/V1_AccessorHelper.ts +352 -5
  175. package/src/graph-manager/protocol/pure/v1/model/data/V1_DataResolver.ts +51 -0
  176. package/src/graph-manager/protocol/pure/v1/model/data/V1_EmbeddedData.ts +2 -2
  177. package/src/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/V1_DataProduct.ts +3 -0
  178. package/src/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/test/V1_AccessPointTest.ts +33 -0
  179. package/src/graph-manager/protocol/pure/v1/model/packageableElements/dataProduct/test/V1_DataProductTestSuite.ts +34 -0
  180. package/src/graph-manager/protocol/pure/v1/model/packageableElements/ingest/V1_IngestDefinition.ts +24 -0
  181. package/src/graph-manager/protocol/pure/v1/model/test/assertion/V1_EqualToRelation.ts +39 -0
  182. package/src/graph-manager/protocol/pure/v1/model/test/assertion/V1_TestAssertion.ts +2 -0
  183. package/src/graph-manager/protocol/pure/v1/model/test/assertion/status/V1_EqualToRelationAssertFail.ts +37 -0
  184. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataProductTransformer.ts +47 -0
  185. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DataResolverTransformer.ts +55 -0
  186. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_TestTransformer.ts +25 -0
  187. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.ts +6 -0
  188. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataProductBuilder.ts +46 -0
  189. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_DataResolverBuilderHelper.ts +54 -0
  190. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_TestBuilderHelper.ts +28 -1
  191. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_TestResultBuilderHelper.ts +40 -1
  192. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_ValueSpecificationBuilderHelper.ts +48 -4
  193. package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataElementSerializationHelper.ts +1 -1
  194. package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataProductSerializationHelper.ts +64 -8
  195. package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DataResolverSerializationHelper.ts +97 -0
  196. package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_IngestSerializationHelper.ts +64 -0
  197. package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_TestSerializationHelper.ts +35 -1
  198. package/src/index.ts +26 -1
  199. package/tsconfig.json +13 -0
@@ -42,6 +42,7 @@ import {
42
42
  guaranteeType,
43
43
  guaranteeNonEmptyString,
44
44
  uuid,
45
+ returnUndefOnError,
45
46
  } from '@finos/legend-shared';
46
47
  import type { TEMPORARY__AbstractEngineConfig } from '../../../../graph-manager/action/TEMPORARY__AbstractEngineConfig.js';
47
48
  import {
@@ -382,6 +383,7 @@ import {
382
383
  } from '../../../action/analytics/data-product/DataProductAnalysis.js';
383
384
  import {
384
385
  AccessPointGroup,
386
+ type DataProduct,
385
387
  DataProductAccessType,
386
388
  DataProductElementScope,
387
389
  LakehouseAccessPoint,
@@ -404,10 +406,24 @@ import {
404
406
  V1_MetadatProject,
405
407
  } from './engine/dev-metadata/V1_DevMetadataPushRequest.js';
406
408
  import type { MetadataRequestOptions } from '../../../action/dev-metadata/MetadataRequestOptions.js';
407
- import type { Accessor } from '../../../../graph/metamodel/pure/packageableElements/relation/Accessor.js';
409
+ import type {
410
+ Accessor,
411
+ DataProductAccessor,
412
+ } from '../../../../graph/metamodel/pure/packageableElements/relation/Accessor.js';
408
413
  import { IngestDefinition } from '../../../../graph/metamodel/pure/packageableElements/ingest/IngestDefinition.js';
409
414
  import { Database } from '../../../../graph/metamodel/pure/packageableElements/store/relational/model/Database.js';
410
- import { V1_createAccessorFromPackageableElement } from './helpers/V1_AccessorHelper.js';
415
+ import {
416
+ V1_createAccessorFromPackageableElement,
417
+ V1_buildDataProductAccessor,
418
+ V1_resolveAccessorsFromRawLambda,
419
+ V1_buildRelationTypeFromAccessPointImplementation,
420
+ } from './helpers/V1_AccessorHelper.js';
421
+ import {
422
+ V1_DataProductAccessor,
423
+ V1_IngestDefinitionAccessor,
424
+ V1_RelationStoreAccessor,
425
+ } from './model/valueSpecification/raw/classInstance/relation/V1_RelationStoreAccessor.js';
426
+ import { V1_deserializeIngestDefinitionContent } from './transformation/pureProtocol/serializationHelpers/V1_IngestSerializationHelper.js';
411
427
 
412
428
  /**
413
429
  * Number of elements to process synchronously before yielding to the event loop.
@@ -2157,6 +2173,68 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
2157
2173
  return V1_createAccessorFromPackageableElement(element, context, options);
2158
2174
  }
2159
2175
 
2176
+ override async buildDataProductAccessor(
2177
+ element: DataProduct,
2178
+ graph: PureModel,
2179
+ options?: {
2180
+ tableName?: string | undefined;
2181
+ },
2182
+ ): Promise<DataProductAccessor | undefined> {
2183
+ const context = new V1_GraphBuilderContextBuilder(
2184
+ graph,
2185
+ graph,
2186
+ this.graphBuilderExtensions,
2187
+ this.logService,
2188
+ ).build();
2189
+ return V1_buildDataProductAccessor(element, context, this, options);
2190
+ }
2191
+
2192
+ override async collectAccessorsInRawLambda(
2193
+ rawLambda: RawLambda,
2194
+ graph: PureModel,
2195
+ ): Promise<Accessor[]> {
2196
+ const v1Accessors = V1_resolveAccessorsFromRawLambda(
2197
+ rawLambda,
2198
+ this,
2199
+ this.pluginManager.getPureProtocolProcessorPlugins(),
2200
+ graph,
2201
+ );
2202
+ if (!v1Accessors) {
2203
+ return [];
2204
+ }
2205
+ const results = await Promise.all(
2206
+ v1Accessors.map(async (v1Accessor) => {
2207
+ const elementPath = v1Accessor.path[0];
2208
+ if (!elementPath) {
2209
+ return undefined;
2210
+ }
2211
+ const element = graph.getNullableElement(elementPath);
2212
+ if (!element) {
2213
+ return undefined;
2214
+ }
2215
+ if (v1Accessor instanceof V1_DataProductAccessor) {
2216
+ return this.buildDataProductAccessor(element as DataProduct, graph, {
2217
+ tableName: v1Accessor.path[1],
2218
+ });
2219
+ }
2220
+ if (v1Accessor instanceof V1_IngestDefinitionAccessor) {
2221
+ return this.createAccessorFromPackageableElement(element, graph, {
2222
+ schemaName: undefined,
2223
+ tableName: v1Accessor.path[1],
2224
+ });
2225
+ }
2226
+ if (v1Accessor instanceof V1_RelationStoreAccessor) {
2227
+ return this.createAccessorFromPackageableElement(element, graph, {
2228
+ schemaName: v1Accessor.path[1],
2229
+ tableName: v1Accessor.path[2],
2230
+ });
2231
+ }
2232
+ return undefined;
2233
+ }),
2234
+ );
2235
+ return results.filter(isNonNullable);
2236
+ }
2237
+
2160
2238
  private buildLambdaReturnTypeInput(
2161
2239
  lambda: RawLambda,
2162
2240
  graph: PureModel,
@@ -3905,10 +3983,10 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
3905
3983
  graphReport,
3906
3984
  );
3907
3985
 
3908
- const data = pureGraph.getDataProduct(dataProductPath);
3986
+ const dataProduct = pureGraph.getDataProduct(dataProductPath);
3909
3987
 
3910
3988
  // Create access point groups with LakehouseAccessPoints from artifact data
3911
- data.accessPointGroups = artifact.accessPointGroups
3989
+ dataProduct.accessPointGroups = artifact.accessPointGroups
3912
3990
  .filter(
3913
3991
  (groupInfo) => !(groupInfo instanceof V1_ModelAccessPointGroupInfo),
3914
3992
  )
@@ -3925,6 +4003,13 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
3925
4003
  apGroup,
3926
4004
  );
3927
4005
  lakehouseAP.description = apImpl.description;
4006
+ // Cache the relation type derived from the artifact's lambda
4007
+ // generic type so downstream consumers can avoid re-computing it.
4008
+ lakehouseAP.__internal__RelationType =
4009
+ V1_buildRelationTypeFromAccessPointImplementation(
4010
+ apImpl,
4011
+ pureGraph,
4012
+ );
3928
4013
  return lakehouseAP;
3929
4014
  },
3930
4015
  );
@@ -3932,7 +4017,7 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
3932
4017
  });
3933
4018
 
3934
4019
  // Find the lakehouse access point matching the requested id
3935
- const lakehouseResult = data.accessPointGroups
4020
+ const lakehouseResult = dataProduct.accessPointGroups
3936
4021
  .flatMap((group) => group.accessPoints)
3937
4022
  .find(
3938
4023
  (ap): ap is LakehouseAccessPoint =>
@@ -4332,6 +4417,20 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
4332
4417
  return result;
4333
4418
  }
4334
4419
 
4420
+ // --------------------------------------------- Ingeset Defintion --------------------------------------
4421
+
4422
+ getIngestDefinitionDatasetNames(
4423
+ ingestDefinition: IngestDefinition,
4424
+ ): string[] {
4425
+ const content = returnUndefOnError(() =>
4426
+ V1_deserializeIngestDefinitionContent(ingestDefinition.content),
4427
+ );
4428
+ if (!content?.datasets) {
4429
+ return [];
4430
+ }
4431
+ return content.datasets.map((ds) => ds.name);
4432
+ }
4433
+
4335
4434
  // --------------------------------------------- Relational ---------------------------------------------
4336
4435
 
4337
4436
  async generateModelsFromDatabaseSpecification(
@@ -19,6 +19,7 @@ import {
19
19
  IngestionAccessor,
20
20
  RelationalStoreAccessor,
21
21
  type AccessorOwner,
22
+ DataProductAccessor,
22
23
  } from '../../../../../graph/metamodel/pure/packageableElements/relation/Accessor.js';
23
24
  import {
24
25
  RelationType,
@@ -31,12 +32,50 @@ import { Database } from '../../../../../graph/metamodel/pure/packageableElement
31
32
  import { Column } from '../../../../../graph/metamodel/pure/packageableElements/store/relational/model/Column.js';
32
33
  import type { Table } from '../../../../../graph/metamodel/pure/packageableElements/store/relational/model/Table.js';
33
34
  import { mapRelationalDataTypeToPrimitiveType } from '../../../../../graph/helpers/STO_Relational_Helper.js';
34
- import type { V1_IngestDataset } from '../model/packageableElements/ingest/V1_IngestDefinition.js';
35
+ import {
36
+ type V1_IngestDataset,
37
+ type V1_WriteMode,
38
+ V1_WriteModeType,
39
+ } from '../model/packageableElements/ingest/V1_IngestDefinition.js';
35
40
  import type { V1_GraphBuilderContext } from '../transformation/pureGraph/to/V1_GraphBuilderContext.js';
36
41
  import { V1_GenericType as V1_GenericTypeProtocol } from '../model/packageableElements/type/V1_GenericType.js';
37
42
  import { V1_PackageableType } from '../model/packageableElements/type/V1_PackageableType.js';
38
- import { returnUndefOnError } from '@finos/legend-shared';
43
+ import { returnUndefOnError, type PlainObject } from '@finos/legend-shared';
44
+ import {
45
+ MILESTONE_INGEST_COLUMNS,
46
+ PRECISE_PRIMITIVE_TYPE,
47
+ PRIMITIVE_TYPE,
48
+ } from '../../../../../graph/MetaModelConst.js';
49
+ import type { RelationTypeMetadata } from '../../../../action/relation/RelationTypeMetadata.js';
39
50
  import { V1_deserializeIngestDefinitionContent } from '../transformation/pureProtocol/serializationHelpers/V1_IngestSerializationHelper.js';
51
+ import {
52
+ RelationElement,
53
+ RelationElementsData,
54
+ } from '../../../../../graph/metamodel/pure/data/EmbeddedData.js';
55
+ import type { RawLambda } from '../../../../../graph/metamodel/pure/rawValueSpecification/RawLambda.js';
56
+ import type { AbstractPureGraphManager } from '../../../../AbstractPureGraphManager.js';
57
+ import type { PureModel } from '../../../../../graph/PureModel.js';
58
+ import type { ConcreteFunctionDefinition } from '../../../../../graph/metamodel/pure/packageableElements/function/ConcreteFunctionDefinition.js';
59
+ import { V1_deserializeValueSpecification } from '../transformation/pureProtocol/serializationHelpers/V1_ValueSpecificationSerializer.js';
60
+ import type { PureProtocolProcessorPlugin } from '../../PureProtocolProcessorPlugin.js';
61
+ import { V1_Lambda } from '../model/valueSpecification/raw/V1_Lambda.js';
62
+ import { V1_AppliedFunction } from '../model/valueSpecification/application/V1_AppliedFunction.js';
63
+ import { V1_ClassInstance } from '../model/valueSpecification/raw/V1_ClassInstance.js';
64
+ import { V1_Collection } from '../model/valueSpecification/raw/V1_Collection.js';
65
+ import {
66
+ type V1_Accessor,
67
+ V1_DataProductAccessor,
68
+ V1_IngestDefinitionAccessor,
69
+ V1_RelationStoreAccessor,
70
+ } from '../model/valueSpecification/raw/classInstance/relation/V1_RelationStoreAccessor.js';
71
+ import type { V1_ValueSpecification } from '../model/valueSpecification/V1_ValueSpecification.js';
72
+ import {
73
+ type DataProduct,
74
+ LakehouseAccessPoint,
75
+ } from '../../../../../graph/metamodel/pure/dataProduct/DataProduct.js';
76
+ import type { V1_AccessPointImplementation } from '../lakehouse/deploy/V1_DataProductArtifact.js';
77
+ import { V1_RelationType } from '../model/packageableElements/type/V1_RelationType.js';
78
+ import { V1_getGenericTypeFullPath } from './V1_DomainHelper.js';
40
79
 
41
80
  const buildV1GenericType = (fullPath: string): V1_GenericTypeProtocol => {
42
81
  // Strip package prefix — primitive types are indexed by simple name
@@ -50,26 +89,85 @@ const buildV1GenericType = (fullPath: string): V1_GenericTypeProtocol => {
50
89
  return genericType;
51
90
  };
52
91
 
92
+ const addMilestonedColumnsForWriteMode = (
93
+ relationType: RelationType,
94
+ writeMode: V1_WriteMode | undefined,
95
+ context: V1_GraphBuilderContext,
96
+ ): void => {
97
+ if (
98
+ writeMode?._type === V1_WriteModeType.BATCH_MILESTONED ||
99
+ writeMode?._type === V1_WriteModeType.BATCH_MILESTONED_BUSINESS_TEMPORAL
100
+ ) {
101
+ relationType.columns.push(
102
+ new RelationColumn(
103
+ MILESTONE_INGEST_COLUMNS.INGEST_LAKE_IN_ID,
104
+ context.resolveGenericTypeFromProtocolWithRelationType(
105
+ buildV1GenericType(PRIMITIVE_TYPE.INTEGER),
106
+ ),
107
+ ),
108
+ );
109
+ relationType.columns.push(
110
+ new RelationColumn(
111
+ MILESTONE_INGEST_COLUMNS.INGEST_LAKE_OUT_ID,
112
+ context.resolveGenericTypeFromProtocolWithRelationType(
113
+ buildV1GenericType(PRIMITIVE_TYPE.INTEGER),
114
+ ),
115
+ ),
116
+ );
117
+ relationType.columns.push(
118
+ new RelationColumn(
119
+ MILESTONE_INGEST_COLUMNS.INGEST_LAKE_DIGEST,
120
+ context.resolveGenericTypeFromProtocolWithRelationType(
121
+ buildV1GenericType(PRIMITIVE_TYPE.STRING),
122
+ ),
123
+ ),
124
+ );
125
+ if (
126
+ writeMode._type === V1_WriteModeType.BATCH_MILESTONED_BUSINESS_TEMPORAL
127
+ ) {
128
+ relationType.columns.push(
129
+ new RelationColumn(
130
+ MILESTONE_INGEST_COLUMNS.INGEST_LAKE_FROM,
131
+ context.resolveGenericTypeFromProtocolWithRelationType(
132
+ buildV1GenericType(PRECISE_PRIMITIVE_TYPE.TIMESTAMP),
133
+ ),
134
+ ),
135
+ );
136
+ relationType.columns.push(
137
+ new RelationColumn(
138
+ MILESTONE_INGEST_COLUMNS.INGEST_LAKE_THRU,
139
+ context.resolveGenericTypeFromProtocolWithRelationType(
140
+ buildV1GenericType(PRECISE_PRIMITIVE_TYPE.TIMESTAMP),
141
+ ),
142
+ ),
143
+ );
144
+ }
145
+ }
146
+ };
147
+
53
148
  const buildRelationTypeFromIngestDataset = (
54
149
  dataset: V1_IngestDataset,
55
150
  context: V1_GraphBuilderContext,
151
+ effectiveWriteMode?: V1_WriteMode | undefined,
56
152
  ): RelationType => {
153
+ const writeMode = dataset.writeMode ?? effectiveWriteMode;
57
154
  const relationType = new RelationType('__ingest_dataset__');
58
155
  relationType.columns = dataset.source.schema.columns.map((col) => {
59
156
  const rawTypePath =
60
157
  col.genericType.rawType instanceof V1_PackageableType
61
158
  ? col.genericType.rawType.fullPath
62
- : 'String';
159
+ : PRIMITIVE_TYPE.STRING;
63
160
  const v1GenericType = buildV1GenericType(rawTypePath);
64
161
  const resolvedGenericType =
65
162
  returnUndefOnError(() =>
66
163
  context.resolveGenericTypeFromProtocolWithRelationType(v1GenericType),
67
164
  ) ??
68
165
  context.resolveGenericTypeFromProtocolWithRelationType(
69
- buildV1GenericType('String'),
166
+ buildV1GenericType(PRIMITIVE_TYPE.STRING),
70
167
  );
71
168
  return new RelationColumn(col.name, resolvedGenericType);
72
169
  });
170
+ addMilestonedColumnsForWriteMode(relationType, writeMode, context);
73
171
  return relationType;
74
172
  };
75
173
 
@@ -89,6 +187,42 @@ const buildRelationTypeFromTable = (table: Table): RelationType => {
89
187
  return relationType;
90
188
  };
91
189
  // TODO: move to pure graph
190
+ /**
191
+ * Builds a metamodel `RelationType` from the cached `lambdaGenericType` on a
192
+ * `V1_AccessPointImplementation`. Returns `undefined` if the implementation
193
+ * does not carry a relation-typed generic type.
194
+ *
195
+ * Column types are resolved against the supplied `PureModel`.
196
+ */
197
+ export const V1_buildRelationTypeFromAccessPointImplementation = (
198
+ apImpl: V1_AccessPointImplementation,
199
+ graph: PureModel,
200
+ relationTypeName?: string | undefined,
201
+ ): RelationType | undefined => {
202
+ const v1RelationType = apImpl.lambdaGenericType?.typeArguments
203
+ .map((typeArg) => typeArg.rawType)
204
+ .find(
205
+ (rawType): rawType is V1_RelationType =>
206
+ rawType instanceof V1_RelationType,
207
+ );
208
+ if (!v1RelationType) {
209
+ return undefined;
210
+ }
211
+ const relationType = new RelationType(relationTypeName ?? apImpl.id);
212
+ relationType.columns = v1RelationType.columns.map(
213
+ (col) =>
214
+ new RelationColumn(
215
+ col.name,
216
+ GenericTypeExplicitReference.create(
217
+ new GenericType(
218
+ graph.getType(V1_getGenericTypeFullPath(col.genericType)),
219
+ ),
220
+ ),
221
+ ),
222
+ );
223
+ return relationType;
224
+ };
225
+
92
226
  /**
93
227
  * Creates an appropriate Accessor from a packageable element.
94
228
  *
@@ -118,7 +252,11 @@ export const V1_createAccessorFromPackageableElement = (
118
252
  if (!dataset) {
119
253
  return undefined;
120
254
  }
121
- const relationType = buildRelationTypeFromIngestDataset(dataset, context);
255
+ const relationType = buildRelationTypeFromIngestDataset(
256
+ dataset,
257
+ context,
258
+ content.writeMode,
259
+ );
122
260
  return new IngestionAccessor(
123
261
  element.path,
124
262
  undefined,
@@ -154,3 +292,212 @@ export const V1_createAccessorFromPackageableElement = (
154
292
  }
155
293
  return undefined;
156
294
  };
295
+
296
+ const buildRelationTypeFromMetadata = (
297
+ metadata: RelationTypeMetadata,
298
+ context: V1_GraphBuilderContext,
299
+ ): RelationType => {
300
+ const relationType = new RelationType('__data_product__');
301
+ relationType.columns = metadata.columns.map((col) => {
302
+ const v1GenericType = buildV1GenericType(col.type);
303
+ const resolvedGenericType =
304
+ returnUndefOnError(() =>
305
+ context.resolveGenericTypeFromProtocolWithRelationType(v1GenericType),
306
+ ) ??
307
+ context.resolveGenericTypeFromProtocolWithRelationType(
308
+ buildV1GenericType(PRIMITIVE_TYPE.STRING),
309
+ );
310
+ return new RelationColumn(col.name, resolvedGenericType);
311
+ });
312
+ return relationType;
313
+ };
314
+
315
+ export const V1_buildDataProductAccessor = async (
316
+ element: DataProduct,
317
+ context: V1_GraphBuilderContext,
318
+ graphManager: AbstractPureGraphManager,
319
+ options?: {
320
+ tableName?: string | undefined;
321
+ },
322
+ ): Promise<DataProductAccessor | undefined> => {
323
+ const accessPointId = options?.tableName;
324
+ const accessPoint = element.accessPointGroups
325
+ .flatMap((g) => g.accessPoints)
326
+ .filter(
327
+ (ap): ap is LakehouseAccessPoint => ap instanceof LakehouseAccessPoint,
328
+ )
329
+ .find((ap) => ap.id === accessPointId);
330
+ if (!accessPoint) {
331
+ return undefined;
332
+ }
333
+ const relationTypeMetadata = await graphManager.getLambdaRelationType(
334
+ accessPoint.func,
335
+ context.graph,
336
+ );
337
+ const relationType = buildRelationTypeFromMetadata(
338
+ relationTypeMetadata,
339
+ context,
340
+ );
341
+ return new DataProductAccessor(
342
+ element.path,
343
+ undefined,
344
+ accessPoint.id,
345
+ relationType,
346
+ element,
347
+ );
348
+ };
349
+
350
+ const collectV1AccessorsFromValueSpecification = (
351
+ valueSpec: V1_ValueSpecification,
352
+ accessors: V1_Accessor[],
353
+ visited: Set<V1_ValueSpecification>,
354
+ plugins: PureProtocolProcessorPlugin[],
355
+ graph: PureModel | undefined,
356
+ visitedFunctions: Set<ConcreteFunctionDefinition>,
357
+ ): void => {
358
+ if (visited.has(valueSpec)) {
359
+ return;
360
+ }
361
+ visited.add(valueSpec);
362
+
363
+ if (valueSpec instanceof V1_ClassInstance) {
364
+ const val = valueSpec.value;
365
+ if (
366
+ val instanceof V1_DataProductAccessor ||
367
+ val instanceof V1_IngestDefinitionAccessor ||
368
+ val instanceof V1_RelationStoreAccessor
369
+ ) {
370
+ if (!accessors.includes(val)) {
371
+ accessors.push(val);
372
+ }
373
+ }
374
+ } else if (valueSpec instanceof V1_AppliedFunction) {
375
+ // Walk parameters in case they contain inline accessors
376
+ for (const param of valueSpec.parameters) {
377
+ collectV1AccessorsFromValueSpecification(
378
+ param,
379
+ accessors,
380
+ visited,
381
+ plugins,
382
+ graph,
383
+ visitedFunctions,
384
+ );
385
+ }
386
+ // Also follow the function body if it's a user-defined function in the graph
387
+ if (graph) {
388
+ const funcPath = valueSpec.function;
389
+ // ConcreteFunctionDefinition paths include the signature suffix; strip it
390
+ // by matching functions whose path starts with the applied function name
391
+ const funcDef = returnUndefOnError(() =>
392
+ graph.functions.find(
393
+ (f) => f.path === funcPath || f.path.startsWith(`${funcPath}_`),
394
+ ),
395
+ );
396
+ if (funcDef && !visitedFunctions.has(funcDef)) {
397
+ visitedFunctions.add(funcDef);
398
+ // expressionSequence is stored as raw JSON on ConcreteFunctionDefinition
399
+ for (const rawExpr of funcDef.expressionSequence) {
400
+ try {
401
+ const exprSpec = V1_deserializeValueSpecification(
402
+ rawExpr as PlainObject<V1_ValueSpecification>,
403
+ plugins,
404
+ );
405
+ collectV1AccessorsFromValueSpecification(
406
+ exprSpec,
407
+ accessors,
408
+ visited,
409
+ plugins,
410
+ graph,
411
+ visitedFunctions,
412
+ );
413
+ } catch {
414
+ // ignore
415
+ }
416
+ }
417
+ }
418
+ }
419
+ } else if (valueSpec instanceof V1_Lambda) {
420
+ for (const expr of valueSpec.body) {
421
+ collectV1AccessorsFromValueSpecification(
422
+ expr,
423
+ accessors,
424
+ visited,
425
+ plugins,
426
+ graph,
427
+ visitedFunctions,
428
+ );
429
+ }
430
+ } else if (valueSpec instanceof V1_Collection) {
431
+ for (const val of valueSpec.values) {
432
+ collectV1AccessorsFromValueSpecification(
433
+ val,
434
+ accessors,
435
+ visited,
436
+ plugins,
437
+ graph,
438
+ visitedFunctions,
439
+ );
440
+ }
441
+ }
442
+ };
443
+
444
+ export const V1_buildRelationElementsDataFromAccessors = (
445
+ accessorsForParent: Accessor[],
446
+ ): RelationElementsData => {
447
+ const relationElementsData = new RelationElementsData();
448
+ relationElementsData.relationElements = accessorsForParent.map((accessor) => {
449
+ const relationElement = new RelationElement();
450
+ if (accessor instanceof RelationalStoreAccessor) {
451
+ const schema = accessor.schema;
452
+ relationElement.paths =
453
+ schema !== undefined ? [schema, accessor.accessor] : ['UNKNOWN'];
454
+ } else {
455
+ relationElement.paths = [accessor.accessor || 'UNKNOWN'];
456
+ }
457
+ relationElement.columns = accessor.relationType.columns.map(
458
+ (column) => column.name,
459
+ );
460
+ relationElement.rows = [];
461
+ return relationElement;
462
+ });
463
+ return relationElementsData;
464
+ };
465
+
466
+ export const V1_resolveAccessorsFromRawLambda = (
467
+ rawLambda: RawLambda,
468
+ graphManager: AbstractPureGraphManager,
469
+ plugins: PureProtocolProcessorPlugin[],
470
+ graph?: PureModel | undefined,
471
+ ): V1_Accessor[] | undefined => {
472
+ try {
473
+ const json = graphManager.serializeRawValueSpecification(rawLambda);
474
+ const v1ValueSpec = V1_deserializeValueSpecification(json, plugins);
475
+ const accessors: V1_Accessor[] = [];
476
+ const visited = new Set<V1_ValueSpecification>();
477
+ const visitedFunctions = new Set<ConcreteFunctionDefinition>();
478
+ if (v1ValueSpec instanceof V1_Lambda) {
479
+ for (const expr of v1ValueSpec.body) {
480
+ collectV1AccessorsFromValueSpecification(
481
+ expr,
482
+ accessors,
483
+ visited,
484
+ plugins,
485
+ graph,
486
+ visitedFunctions,
487
+ );
488
+ }
489
+ } else {
490
+ collectV1AccessorsFromValueSpecification(
491
+ v1ValueSpec,
492
+ accessors,
493
+ visited,
494
+ plugins,
495
+ graph,
496
+ visitedFunctions,
497
+ );
498
+ }
499
+ return accessors;
500
+ } catch {
501
+ return undefined;
502
+ }
503
+ };
@@ -0,0 +1,51 @@
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 { hashArray, type Hashable } from '@finos/legend-shared';
18
+ import { CORE_HASH_STRUCTURE } from '../../../../../../graph/Core_HashUtils.js';
19
+ import type { V1_EmbeddedData } from './V1_EmbeddedData.js';
20
+ import type { V1_PackageableElementPointer } from '../packageableElements/V1_PackageableElement.js';
21
+
22
+ export abstract class V1_DataResolver implements Hashable {
23
+ abstract get hashCode(): string;
24
+ }
25
+
26
+ export class V1_BaseDataResolver extends V1_DataResolver implements Hashable {
27
+ data!: V1_EmbeddedData;
28
+ elementPointer!: V1_PackageableElementPointer;
29
+
30
+ get hashCode(): string {
31
+ return hashArray([
32
+ CORE_HASH_STRUCTURE.BASE_DATA_RESOLVER,
33
+ this.data,
34
+ this.elementPointer.path,
35
+ ]);
36
+ }
37
+ }
38
+
39
+ export class V1_ReferenceDataResolver
40
+ extends V1_DataResolver
41
+ implements Hashable
42
+ {
43
+ elementPointer!: V1_PackageableElementPointer;
44
+
45
+ get hashCode(): string {
46
+ return hashArray([
47
+ CORE_HASH_STRUCTURE.REFERENCE_DATA_RESOLVER,
48
+ this.elementPointer.path,
49
+ ]);
50
+ }
51
+ }
@@ -139,15 +139,15 @@ export class V1_RelationRowTestData implements Hashable {
139
139
  }
140
140
 
141
141
  export class V1_RelationElement implements Hashable {
142
- paths!: string[];
143
142
  columns!: string[];
143
+ paths!: string[];
144
144
  rows: V1_RelationRowTestData[] = [];
145
145
 
146
146
  get hashCode(): string {
147
147
  return hashArray([
148
148
  CORE_HASH_STRUCTURE.RELATION_ELEMENT,
149
- hashArray(this.paths),
150
149
  hashArray(this.columns),
150
+ hashArray(this.paths),
151
151
  hashArray(this.rows),
152
152
  ]);
153
153
  }
@@ -34,6 +34,7 @@ import type { V1_StereotypePtr } from '../domain/V1_StereotypePtr.js';
34
34
  import type { V1_TaggedValue } from '../domain/V1_TaggedValue.js';
35
35
  import type { V1_EmbeddedData } from '../../data/V1_EmbeddedData.js';
36
36
  import type { V1_AppDirNode } from '../../../lakehouse/entitlements/V1_CoreEntitlements.js';
37
+ import type { V1_DataProductTestSuite } from './test/V1_DataProductTestSuite.js';
37
38
 
38
39
  export const V1_DATA_PRODUCT_ELEMENT_PROTOCOL_TYPE = 'dataProduct';
39
40
 
@@ -441,6 +442,7 @@ export class V1_DataProduct extends V1_PackageableElement implements Hashable {
441
442
  sampleValues: V1_EmbeddedData[] | undefined;
442
443
  operationalMetadata: V1_DataProductOperationalMetadata | undefined;
443
444
  owner: V1_DataProductOwner | undefined;
445
+ testSuites: V1_DataProductTestSuite[] | undefined;
444
446
 
445
447
  override get hashCode(): string {
446
448
  return hashArray([
@@ -457,6 +459,7 @@ export class V1_DataProduct extends V1_PackageableElement implements Hashable {
457
459
  hashArray(this.sampleValues ?? []),
458
460
  this.operationalMetadata ?? '',
459
461
  this.owner ?? '',
462
+ hashArray(this.testSuites ?? []),
460
463
  ]);
461
464
  }
462
465