@finos/legend-graph 32.4.3 → 32.5.1

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 (131) hide show
  1. package/lib/graph/Core_HashUtils.d.ts +1 -0
  2. package/lib/graph/Core_HashUtils.d.ts.map +1 -1
  3. package/lib/graph/Core_HashUtils.js +1 -0
  4. package/lib/graph/Core_HashUtils.js.map +1 -1
  5. package/lib/graph/helpers/STO_Relational_Helper.d.ts +2 -0
  6. package/lib/graph/helpers/STO_Relational_Helper.d.ts.map +1 -1
  7. package/lib/graph/helpers/STO_Relational_Helper.js +37 -0
  8. package/lib/graph/helpers/STO_Relational_Helper.js.map +1 -1
  9. package/lib/graph/metamodel/pure/packageableElements/relation/Accessor.d.ts +62 -0
  10. package/lib/graph/metamodel/pure/packageableElements/relation/Accessor.d.ts.map +1 -0
  11. package/lib/graph/metamodel/pure/packageableElements/relation/Accessor.js +95 -0
  12. package/lib/graph/metamodel/pure/packageableElements/relation/Accessor.js.map +1 -0
  13. package/lib/graph/metamodel/pure/packageableElements/service/Service.d.ts +1 -0
  14. package/lib/graph/metamodel/pure/packageableElements/service/Service.d.ts.map +1 -1
  15. package/lib/graph/metamodel/pure/packageableElements/service/Service.js +2 -0
  16. package/lib/graph/metamodel/pure/packageableElements/service/Service.js.map +1 -1
  17. package/lib/graph/metamodel/pure/valueSpecification/ValueSpecification.d.ts +2 -0
  18. package/lib/graph/metamodel/pure/valueSpecification/ValueSpecification.d.ts.map +1 -1
  19. package/lib/graph/metamodel/pure/valueSpecification/ValueSpecification.js.map +1 -1
  20. package/lib/graph-manager/AbstractPureGraphManager.d.ts +6 -0
  21. package/lib/graph-manager/AbstractPureGraphManager.d.ts.map +1 -1
  22. package/lib/graph-manager/AbstractPureGraphManager.js.map +1 -1
  23. package/lib/graph-manager/action/changeDetection/DSL_Service_ObserverHelper.d.ts.map +1 -1
  24. package/lib/graph-manager/action/changeDetection/DSL_Service_ObserverHelper.js +1 -0
  25. package/lib/graph-manager/action/changeDetection/DSL_Service_ObserverHelper.js.map +1 -1
  26. package/lib/graph-manager/action/changeDetection/ValueSpecificationObserver.d.ts.map +1 -1
  27. package/lib/graph-manager/action/changeDetection/ValueSpecificationObserver.js +3 -0
  28. package/lib/graph-manager/action/changeDetection/ValueSpecificationObserver.js.map +1 -1
  29. package/lib/graph-manager/action/query/Query.d.ts +7 -0
  30. package/lib/graph-manager/action/query/Query.d.ts.map +1 -1
  31. package/lib/graph-manager/action/query/Query.js +7 -0
  32. package/lib/graph-manager/action/query/Query.js.map +1 -1
  33. package/lib/graph-manager/helpers/DataProductHelper.d.ts +7 -2
  34. package/lib/graph-manager/helpers/DataProductHelper.d.ts.map +1 -1
  35. package/lib/graph-manager/helpers/DataProductHelper.js +27 -2
  36. package/lib/graph-manager/helpers/DataProductHelper.js.map +1 -1
  37. package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.d.ts +6 -0
  38. package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.d.ts.map +1 -1
  39. package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.js +13 -0
  40. package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.js.map +1 -1
  41. package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineHelper.d.ts.map +1 -1
  42. package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineHelper.js +20 -2
  43. package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineHelper.js.map +1 -1
  44. package/lib/graph-manager/protocol/pure/v1/engine/query/V1_Query.d.ts +6 -1
  45. package/lib/graph-manager/protocol/pure/v1/engine/query/V1_Query.d.ts.map +1 -1
  46. package/lib/graph-manager/protocol/pure/v1/engine/query/V1_Query.js +16 -0
  47. package/lib/graph-manager/protocol/pure/v1/engine/query/V1_Query.js.map +1 -1
  48. package/lib/graph-manager/protocol/pure/v1/helpers/V1_AccessorHelper.d.ts +28 -0
  49. package/lib/graph-manager/protocol/pure/v1/helpers/V1_AccessorHelper.d.ts.map +1 -0
  50. package/lib/graph-manager/protocol/pure/v1/helpers/V1_AccessorHelper.js +104 -0
  51. package/lib/graph-manager/protocol/pure/v1/helpers/V1_AccessorHelper.js.map +1 -0
  52. package/lib/graph-manager/protocol/pure/v1/helpers/V1_ValueSpecificationObserver.d.ts +1 -1
  53. package/lib/graph-manager/protocol/pure/v1/helpers/V1_ValueSpecificationObserver.d.ts.map +1 -1
  54. package/lib/graph-manager/protocol/pure/v1/helpers/V1_ValueSpecificationObserver.js +3 -2
  55. package/lib/graph-manager/protocol/pure/v1/helpers/V1_ValueSpecificationObserver.js.map +1 -1
  56. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/ingest/V1_IngestDefinition.d.ts +11 -9
  57. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/ingest/V1_IngestDefinition.d.ts.map +1 -1
  58. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/ingest/V1_IngestDefinition.js +16 -0
  59. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/ingest/V1_IngestDefinition.js.map +1 -1
  60. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/service/V1_Service.d.ts +1 -0
  61. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/service/V1_Service.d.ts.map +1 -1
  62. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/service/V1_Service.js +2 -0
  63. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/service/V1_Service.js.map +1 -1
  64. package/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/relation/V1_ColSpec.d.ts +3 -3
  65. package/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/relation/V1_ColSpec.d.ts.map +1 -1
  66. package/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/relation/V1_ColSpec.js.map +1 -1
  67. package/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/relation/V1_RelationStoreAccessor.d.ts +14 -4
  68. package/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/relation/V1_RelationStoreAccessor.d.ts.map +1 -1
  69. package/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/relation/V1_RelationStoreAccessor.js +21 -4
  70. package/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/relation/V1_RelationStoreAccessor.js.map +1 -1
  71. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_ServiceTransformer.d.ts.map +1 -1
  72. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_ServiceTransformer.js +6 -5
  73. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_ServiceTransformer.js.map +1 -1
  74. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_ValueSpecificationTransformer.d.ts.map +1 -1
  75. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_ValueSpecificationTransformer.js +30 -2
  76. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_ValueSpecificationTransformer.js.map +1 -1
  77. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.d.ts.map +1 -1
  78. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.js +1 -0
  79. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.js.map +1 -1
  80. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_ValueSpecificationBuilderHelper.d.ts.map +1 -1
  81. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_ValueSpecificationBuilderHelper.js +67 -1
  82. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_ValueSpecificationBuilderHelper.js.map +1 -1
  83. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_IngestSerializationHelper.d.ts +5 -1
  84. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_IngestSerializationHelper.d.ts.map +1 -1
  85. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_IngestSerializationHelper.js +22 -2
  86. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_IngestSerializationHelper.js.map +1 -1
  87. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ServiceSerializationHelper.d.ts.map +1 -1
  88. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ServiceSerializationHelper.js +5 -4
  89. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ServiceSerializationHelper.js.map +1 -1
  90. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_TypeSerializationHelper.d.ts +2 -1
  91. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_TypeSerializationHelper.d.ts.map +1 -1
  92. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_TypeSerializationHelper.js +1 -1
  93. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_TypeSerializationHelper.js.map +1 -1
  94. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ValueSpecificationSerializer.d.ts.map +1 -1
  95. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ValueSpecificationSerializer.js +16 -4
  96. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ValueSpecificationSerializer.js.map +1 -1
  97. package/lib/index.d.ts +5 -2
  98. package/lib/index.d.ts.map +1 -1
  99. package/lib/index.js +5 -2
  100. package/lib/index.js.map +1 -1
  101. package/lib/package.json +1 -1
  102. package/package.json +1 -1
  103. package/src/graph/Core_HashUtils.ts +1 -0
  104. package/src/graph/helpers/STO_Relational_Helper.ts +44 -0
  105. package/src/graph/metamodel/pure/packageableElements/relation/Accessor.ts +138 -0
  106. package/src/graph/metamodel/pure/packageableElements/service/Service.ts +2 -0
  107. package/src/graph/metamodel/pure/valueSpecification/ValueSpecification.ts +4 -0
  108. package/src/graph-manager/AbstractPureGraphManager.ts +13 -0
  109. package/src/graph-manager/action/changeDetection/DSL_Service_ObserverHelper.ts +1 -0
  110. package/src/graph-manager/action/changeDetection/ValueSpecificationObserver.ts +6 -0
  111. package/src/graph-manager/action/query/Query.ts +9 -0
  112. package/src/graph-manager/helpers/DataProductHelper.ts +47 -4
  113. package/src/graph-manager/protocol/pure/v1/V1_PureGraphManager.ts +31 -0
  114. package/src/graph-manager/protocol/pure/v1/engine/V1_EngineHelper.ts +22 -0
  115. package/src/graph-manager/protocol/pure/v1/engine/query/V1_Query.ts +28 -0
  116. package/src/graph-manager/protocol/pure/v1/helpers/V1_AccessorHelper.ts +156 -0
  117. package/src/graph-manager/protocol/pure/v1/helpers/V1_ValueSpecificationObserver.ts +3 -3
  118. package/src/graph-manager/protocol/pure/v1/model/packageableElements/ingest/V1_IngestDefinition.ts +15 -11
  119. package/src/graph-manager/protocol/pure/v1/model/packageableElements/service/V1_Service.ts +2 -0
  120. package/src/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/relation/V1_ColSpec.ts +3 -3
  121. package/src/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/relation/V1_RelationStoreAccessor.ts +29 -4
  122. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_ServiceTransformer.ts +8 -7
  123. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_ValueSpecificationTransformer.ts +49 -2
  124. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.ts +1 -0
  125. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_ValueSpecificationBuilderHelper.ts +129 -0
  126. package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_IngestSerializationHelper.ts +51 -1
  127. package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ServiceSerializationHelper.ts +5 -4
  128. package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_TypeSerializationHelper.ts +1 -1
  129. package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ValueSpecificationSerializer.ts +29 -3
  130. package/src/index.ts +18 -2
  131. package/tsconfig.json +2 -0
@@ -116,9 +116,21 @@ import {
116
116
  } from '../../../../helpers/V1_DomainHelper.js';
117
117
  import {
118
118
  ColSpec,
119
+ ColSpecArray,
120
+ ColSpecArrayInstance,
119
121
  ColSpecInstanceValue,
120
122
  } from '../../../../../../../../graph/metamodel/pure/valueSpecification/RelationValueSpecification.js';
121
123
  import { V1_ColSpec } from '../../../../model/valueSpecification/raw/classInstance/relation/V1_ColSpec.js';
124
+ import { V1_ColSpecArray } from '../../../../model/valueSpecification/raw/classInstance/relation/V1_ColSpecArray.js';
125
+ import {
126
+ V1_RelationStoreAccessor,
127
+ V1_IngestDefinitionAccessor,
128
+ V1_DataProductAccessor,
129
+ } from '../../../../model/valueSpecification/raw/classInstance/relation/V1_RelationStoreAccessor.js';
130
+ import { AccessorInstanceValue } from '../../../../../../../../graph/metamodel/pure/packageableElements/relation/Accessor.js';
131
+ import { V1_createAccessorFromPackageableElement } from '../../../../helpers/V1_AccessorHelper.js';
132
+ import { Database } from '../../../../../../../../graph/metamodel/pure/packageableElements/store/relational/model/Database.js';
133
+ import { IngestDefinition } from '../../../../../../../../graph/metamodel/pure/packageableElements/ingest/IngestDefinition.js';
122
134
 
123
135
  const buildPrimtiveInstanceValue = (
124
136
  type: PRIMITIVE_TYPE,
@@ -471,9 +483,125 @@ export class V1_ValueSpecificationBuilder
471
483
  const protocol = guaranteeType(valueSpecification.value, V1_ColSpec);
472
484
  const value = new ColSpec();
473
485
  value.name = protocol.name;
486
+ value.type = protocol.type;
487
+ value.function1 = protocol.function1
488
+ ? protocol.function1.accept_ValueSpecificationVisitor(
489
+ new V1_ValueSpecificationBuilder(
490
+ this.context,
491
+ this.processingContext,
492
+ this.openVariables,
493
+ ),
494
+ )
495
+ : undefined;
496
+ value.function2 = protocol.function2
497
+ ? protocol.function2.accept_ValueSpecificationVisitor(
498
+ new V1_ValueSpecificationBuilder(
499
+ this.context,
500
+ this.processingContext,
501
+ this.openVariables,
502
+ ),
503
+ )
504
+ : undefined;
474
505
  instanceValue.values = [value];
475
506
  return instanceValue;
476
507
  }
508
+ case V1_ClassInstanceType.COL_SPEC_ARRAY: {
509
+ const instanceValue = new ColSpecArrayInstance(
510
+ Multiplicity.ONE,
511
+ undefined,
512
+ );
513
+ const protocol = guaranteeType(
514
+ valueSpecification.value,
515
+ V1_ColSpecArray,
516
+ );
517
+ const value = new ColSpecArray();
518
+ value.colSpecs = protocol.colSpecs.map((colSpec) => {
519
+ const colSpecInstance = new ColSpec();
520
+ colSpecInstance.name = colSpec.name;
521
+ colSpecInstance.type = colSpec.type;
522
+ colSpecInstance.function1 = colSpec.function1
523
+ ? colSpec.function1.accept_ValueSpecificationVisitor(
524
+ new V1_ValueSpecificationBuilder(
525
+ this.context,
526
+ this.processingContext,
527
+ this.openVariables,
528
+ ),
529
+ )
530
+ : undefined;
531
+ colSpecInstance.function2 = colSpec.function2
532
+ ? colSpec.function2.accept_ValueSpecificationVisitor(
533
+ new V1_ValueSpecificationBuilder(
534
+ this.context,
535
+ this.processingContext,
536
+ this.openVariables,
537
+ ),
538
+ )
539
+ : undefined;
540
+ return colSpecInstance;
541
+ });
542
+ instanceValue.values = [value];
543
+ return instanceValue;
544
+ }
545
+ case V1_ClassInstanceType.RELATION_STORE_ACCESSOR: {
546
+ const protocol = guaranteeType(
547
+ valueSpecification.value,
548
+ V1_RelationStoreAccessor,
549
+ );
550
+ const dbPath = guaranteeNonNullable(protocol.path[0]);
551
+ const schemaName = protocol.path[1];
552
+ const tableName = protocol.path[2];
553
+ const db = guaranteeType(
554
+ this.context.resolveElement(dbPath, false).value,
555
+ Database,
556
+ );
557
+ const accessor = guaranteeNonNullable(
558
+ V1_createAccessorFromPackageableElement(db, this.context, {
559
+ schemaName,
560
+ tableName,
561
+ }),
562
+ `Can't build accessor for database '${dbPath}'`,
563
+ );
564
+ const accessorInstanceValue = new AccessorInstanceValue();
565
+ accessorInstanceValue.values = [accessor];
566
+ accessorInstanceValue.genericType = GenericTypeExplicitReference.create(
567
+ new GenericType(accessor.relationType),
568
+ );
569
+ return accessorInstanceValue;
570
+ }
571
+ case V1_ClassInstanceType.INGEST_ACCESSOR: {
572
+ const protocol = guaranteeType(
573
+ valueSpecification.value,
574
+ V1_IngestDefinitionAccessor,
575
+ );
576
+ const ingestPath = guaranteeNonNullable(protocol.path[0]);
577
+ const datasetName = protocol.path[1];
578
+ const ingestDef = guaranteeType(
579
+ this.context.resolveElement(ingestPath, false).value,
580
+ IngestDefinition,
581
+ );
582
+ const accessor = guaranteeNonNullable(
583
+ V1_createAccessorFromPackageableElement(ingestDef, this.context, {
584
+ tableName: datasetName,
585
+ }),
586
+ `Can't build accessor for ingest definition '${ingestPath}'`,
587
+ );
588
+ const accessorInstanceValue = new AccessorInstanceValue();
589
+ accessorInstanceValue.values = [accessor];
590
+ accessorInstanceValue.genericType = GenericTypeExplicitReference.create(
591
+ new GenericType(accessor.relationType),
592
+ );
593
+ return accessorInstanceValue;
594
+ }
595
+ case V1_ClassInstanceType.DATA_PRODUCT_ACCESSOR: {
596
+ const protocol = guaranteeType(
597
+ valueSpecification.value,
598
+ V1_DataProductAccessor,
599
+ );
600
+ const _path = protocol.path;
601
+ throw new UnsupportedOperationError(
602
+ `Can't build accessor for data product with path '${_path.join('.')}': data product accessor building is not yet supported`,
603
+ );
604
+ }
477
605
  default: {
478
606
  const builders = this.context.extensions.plugins.flatMap(
479
607
  (plugin) => plugin.V1_getExtraClassInstanceValueBuilders?.() ?? [],
@@ -609,6 +737,7 @@ export function V1_processProperty(
609
737
  const _funcExp = new FunctionExpression(col.name);
610
738
  _funcExp.func = col;
611
739
  _funcExp.parametersValues = processedParameters;
740
+ _funcExp.genericType = col.genericType;
612
741
  return _funcExp;
613
742
  }
614
743
  throw new UnsupportedOperationError(
@@ -20,7 +20,13 @@ import {
20
20
  usingModelSchema,
21
21
  type PlainObject,
22
22
  } from '@finos/legend-shared';
23
- import { V1_IngestDefinition } from '../../../model/packageableElements/ingest/V1_IngestDefinition.js';
23
+ import {
24
+ V1_IngestDataset,
25
+ V1_IngestDatasetSchema,
26
+ V1_IngestDatasetSource,
27
+ V1_IngestDefinition,
28
+ V1_IngestDefinitionContent,
29
+ } from '../../../model/packageableElements/ingest/V1_IngestDefinition.js';
24
30
  import type { V1_PackageableElement } from '../../../model/packageableElements/V1_PackageableElement.js';
25
31
  import type { V1_AppDirNode } from '../../../lakehouse/entitlements/V1_CoreEntitlements.js';
26
32
  import { V1_AppDirNodeModelSchema } from './lakehouse/V1_CoreEntitlementsSerializationHelper.js';
@@ -28,9 +34,12 @@ import {
28
34
  createModelSchema,
29
35
  custom,
30
36
  deserialize,
37
+ list,
38
+ optional,
31
39
  primitive,
32
40
  serialize,
33
41
  } from 'serializr';
42
+ import { V1_relationTypeColumnModelSchema } from './V1_TypeSerializationHelper.js';
34
43
  import {
35
44
  type V1_IngestEnvironment,
36
45
  V1_AWSSnowflakeIngestEnvironment,
@@ -167,3 +176,44 @@ export const V1_deserializeProducerEnvironment = (
167
176
  throw new Error(`Unknown V1_ProducerEnvironment type: ${json._type}`);
168
177
  }
169
178
  };
179
+
180
+ // --------------------------------------------- Ingest Dataset Content ---------------------------------------------
181
+
182
+ const V1_IngestDatasetSchemaModelSchema = createModelSchema(
183
+ V1_IngestDatasetSchema,
184
+ {
185
+ _type: primitive(),
186
+ columns: list(usingModelSchema(V1_relationTypeColumnModelSchema)),
187
+ },
188
+ );
189
+
190
+ const V1_IngestDatasetSourceModelSchema = createModelSchema(
191
+ V1_IngestDatasetSource,
192
+ {
193
+ _type: primitive(),
194
+ schema: usingModelSchema(V1_IngestDatasetSchemaModelSchema),
195
+ },
196
+ );
197
+
198
+ export const V1_IngestDatasetModelSchema = createModelSchema(V1_IngestDataset, {
199
+ name: primitive(),
200
+ primaryKey: list(primitive()),
201
+ source: usingModelSchema(V1_IngestDatasetSourceModelSchema),
202
+ });
203
+
204
+ export const V1_IngestDefinitionContentModelSchema = createModelSchema(
205
+ V1_IngestDefinitionContent,
206
+ {
207
+ datasets: optional(list(usingModelSchema(V1_IngestDatasetModelSchema))),
208
+ },
209
+ );
210
+
211
+ export const V1_deserializeIngestDefinitionContent = (
212
+ json: PlainObject<V1_IngestDefinitionContent>,
213
+ ): V1_IngestDefinitionContent =>
214
+ deserialize(V1_IngestDefinitionContentModelSchema, json);
215
+
216
+ export const V1_serializeIngestDefinitionContent = (
217
+ content: V1_IngestDefinitionContent,
218
+ ): PlainObject<V1_IngestDefinitionContent> =>
219
+ serialize(V1_IngestDefinitionContentModelSchema, content);
@@ -355,6 +355,7 @@ export const V1_serviceModelSchema = (
355
355
  (val) => V1_serializeServiceExecution(val),
356
356
  (val) => V1_deserializeServiceExecution(val),
357
357
  ),
358
+ mcpServer: optional(primitive()),
358
359
  name: primitive(),
359
360
  owners: list(primitive()),
360
361
  ownership: optionalCustom(
@@ -363,6 +364,9 @@ export const V1_serviceModelSchema = (
363
364
  ),
364
365
  package: primitive(),
365
366
  pattern: primitive(),
367
+ postValidations: customListWithSchema(V1_servicePostValidationModelSchema, {
368
+ INTERNAL__forceReturnEmptyInTest: true,
369
+ }),
366
370
  stereotypes: customListWithSchema(V1_stereotypePtrModelSchema, {
367
371
  INTERNAL__forceReturnEmptyInTest: true,
368
372
  }),
@@ -380,8 +384,5 @@ export const V1_serviceModelSchema = (
380
384
  INTERNAL__forceReturnEmptyInTest: true,
381
385
  },
382
386
  ),
383
- postValidations: customListWithSchema(V1_servicePostValidationModelSchema, {
384
- INTERNAL__forceReturnEmptyInTest: true,
385
- }),
386
- mcpServer: optional(primitive()),
387
+ title: optional(primitive()),
387
388
  });
@@ -91,7 +91,7 @@ const packageableTypeModelSchema = createModelSchema(V1_PackageableType, {
91
91
  fullPath: primitive(),
92
92
  });
93
93
 
94
- const V1_relationTypeColumnModelSchema = createModelSchema(
94
+ export const V1_relationTypeColumnModelSchema = createModelSchema(
95
95
  V1_RelationTypeColumn,
96
96
  {
97
97
  genericType: custom(
@@ -69,6 +69,7 @@ import { V1_ColSpecArray } from '../../../model/valueSpecification/raw/classInst
69
69
  import { V1_ColSpec } from '../../../model/valueSpecification/raw/classInstance/relation/V1_ColSpec.js';
70
70
  import {
71
71
  V1_DataProductAccessor,
72
+ V1_IngestDefinitionAccessor,
72
73
  V1_RelationStoreAccessor,
73
74
  V1_SQLAccessor,
74
75
  } from '../../../model/valueSpecification/raw/classInstance/relation/V1_RelationStoreAccessor.js';
@@ -773,6 +774,14 @@ const relationStoreAccessorModelSchema = createModelSchema(
773
774
  },
774
775
  );
775
776
 
777
+ const ingestAccessorModelSchema = createModelSchema(
778
+ V1_IngestDefinitionAccessor,
779
+ {
780
+ path: list(primitive()),
781
+ metadata: optional(primitive()),
782
+ },
783
+ );
784
+
776
785
  const dataProductAccessorModelSchema = createModelSchema(
777
786
  V1_DataProductAccessor,
778
787
  {
@@ -789,8 +798,22 @@ const colSpecModelSchema = (
789
798
  plugins: PureProtocolProcessorPlugin[],
790
799
  ): ModelSchema<V1_ColSpec> =>
791
800
  createModelSchema(V1_ColSpec, {
792
- function1: optional(usingModelSchema(V1_lambdaModelSchema(plugins))),
793
- function2: optional(usingModelSchema(V1_lambdaModelSchema(plugins))),
801
+ function1: optional(
802
+ custom(
803
+ (val) => {
804
+ return val ? V1_serializeValueSpecification(val, plugins) : SKIP;
805
+ },
806
+ (val) => V1_deserializeValueSpecification(val, plugins),
807
+ ),
808
+ ),
809
+ function2: optional(
810
+ custom(
811
+ (val) => {
812
+ return val ? V1_serializeValueSpecification(val, plugins) : SKIP;
813
+ },
814
+ (val) => V1_deserializeValueSpecification(val, plugins),
815
+ ),
816
+ ),
794
817
  name: primitive(),
795
818
  type: optional(primitive()),
796
819
  });
@@ -856,8 +879,9 @@ export function V1_deserializeClassInstanceValue(
856
879
  case V1_ClassInstanceType.COL_SPEC_ARRAY:
857
880
  return deserialize(colSpecArrayModelSchema(plugins), json);
858
881
  case V1_ClassInstanceType.RELATION_STORE_ACCESSOR:
859
- case V1_ClassInstanceType.INGEST_ACCESSOR:
860
882
  return deserialize(relationStoreAccessorModelSchema, json);
883
+ case V1_ClassInstanceType.INGEST_ACCESSOR:
884
+ return deserialize(ingestAccessorModelSchema, json);
861
885
  case V1_ClassInstanceType.DATA_PRODUCT_ACCESSOR:
862
886
  return deserialize(dataProductAccessorModelSchema, json);
863
887
  case V1_ClassInstanceType.SQL_ACCESSOR:
@@ -920,6 +944,8 @@ export function V1_serializeClassInstanceValue(
920
944
  return serialize(dataProductAccessorModelSchema, protocol);
921
945
  } else if (protocol instanceof V1_SQLAccessor) {
922
946
  return serialize(sqlAccessorModelSchema, protocol);
947
+ } else if (protocol instanceof V1_IngestDefinitionAccessor) {
948
+ return serialize(ingestAccessorModelSchema, protocol);
923
949
  }
924
950
  const serializers = plugins.flatMap(
925
951
  (plugin) =>
package/src/index.ts CHANGED
@@ -97,8 +97,10 @@ export { SnowflakeM2MUdfDeploymentConfiguration } from './graph/metamodel/pure/f
97
97
  export { INTERNAL__UnknownElement } from './graph/metamodel/pure/packageableElements/INTERNAL__UnknownElement.js';
98
98
  export {
99
99
  V1_IngestDefinition,
100
- type V1_IngestDataset,
101
- type V1_IngestDefinitionContent,
100
+ V1_IngestDatasetSchema,
101
+ V1_IngestDatasetSource,
102
+ V1_IngestDataset,
103
+ V1_IngestDefinitionContent,
102
104
  } from './graph-manager/protocol/pure/v1/model/packageableElements/ingest/V1_IngestDefinition.js';
103
105
  export {
104
106
  Ownership,
@@ -376,6 +378,10 @@ export { V1_transformDataContractToLiteDatacontract } from './graph-manager/prot
376
378
  export {
377
379
  V1_deserializeIngestEnvironment,
378
380
  V1_deserializeProducerEnvironment,
381
+ V1_IngestDatasetModelSchema,
382
+ V1_IngestDefinitionContentModelSchema,
383
+ V1_deserializeIngestDefinitionContent,
384
+ V1_serializeIngestDefinitionContent,
379
385
  } from './graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_IngestSerializationHelper.js';
380
386
  export * from './graph-manager/protocol/pure/v1/model/lineage/V1_Lineage.js';
381
387
 
@@ -847,7 +853,17 @@ export {
847
853
  RelationType,
848
854
  RelationColumn,
849
855
  } from './graph/metamodel/pure/packageableElements/relation/RelationType.js';
856
+ export {
857
+ Accessor,
858
+ DataProductAccessor,
859
+ IngestionAccessor,
860
+ RelationalStoreAccessor,
861
+ AccessorInstanceValue,
862
+ type AccessorOwner,
863
+ } from './graph/metamodel/pure/packageableElements/relation/Accessor.js';
864
+ export { V1_createAccessorFromPackageableElement as createAccessorFromPackageableElement } from './graph-manager/protocol/pure/v1/helpers/V1_AccessorHelper.js';
850
865
  export { Store } from './graph/metamodel/pure/packageableElements/store/Store.js';
866
+ export { Database } from './graph/metamodel/pure/packageableElements/store/relational/model/Database.js';
851
867
  export { Mapping } from './graph/metamodel/pure/packageableElements/mapping/Mapping.js';
852
868
  export {
853
869
  Runtime,
package/tsconfig.json CHANGED
@@ -249,6 +249,7 @@
249
249
  "./src/graph/metamodel/pure/packageableElements/mapping/xStore/XStoreAssociationImplementation.ts",
250
250
  "./src/graph/metamodel/pure/packageableElements/mapping/xStore/XStorePropertyFetchDetails.ts",
251
251
  "./src/graph/metamodel/pure/packageableElements/mapping/xStore/XStorePropertyMapping.ts",
252
+ "./src/graph/metamodel/pure/packageableElements/relation/Accessor.ts",
252
253
  "./src/graph/metamodel/pure/packageableElements/relation/Relation.ts",
253
254
  "./src/graph/metamodel/pure/packageableElements/relation/RelationType.ts",
254
255
  "./src/graph/metamodel/pure/packageableElements/runtime/PackageableRuntime.ts",
@@ -511,6 +512,7 @@
511
512
  "./src/graph-manager/protocol/pure/v1/engine/test/V1_DebugTestsResult.ts",
512
513
  "./src/graph-manager/protocol/pure/v1/engine/test/V1_RunTestsInput.ts",
513
514
  "./src/graph-manager/protocol/pure/v1/engine/test/V1_RunTestsResult.ts",
515
+ "./src/graph-manager/protocol/pure/v1/helpers/V1_AccessorHelper.ts",
514
516
  "./src/graph-manager/protocol/pure/v1/helpers/V1_DataProductHelper.ts",
515
517
  "./src/graph-manager/protocol/pure/v1/helpers/V1_DomainHelper.ts",
516
518
  "./src/graph-manager/protocol/pure/v1/helpers/V1_DomainObserverHelper.ts",