forked from estuary/flow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flow.schema.json
1641 lines (1641 loc) · 53.6 KB
/
flow.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"title": "Catalog",
"description": "Each catalog source defines a portion of a Flow Catalog, by defining collections, derivations, tests, and materializations of the Catalog. Catalog sources may reference and import other sources, in order to collections and other entities that source defines.",
"type": "object",
"properties": {
"$schema": {
"title": "JSON-Schema against which the Catalog is validated.",
"default": null,
"type": [
"string",
"null"
]
},
"captures": {
"title": "Captures of this Catalog.",
"default": {},
"examples": [
{
"acmeCo/capture": {
"bindings": [
{
"resource": {
"stream": "a_stream"
},
"target": "target/collection"
}
],
"endpoint": {
"connector": {
"config": "connector-config.yaml",
"image": "connector/image:tag"
}
},
"interval": "5m",
"shards": {}
}
}
],
"type": "object",
"patternProperties": {
"^[a-zA-Z0-9\\-_\\.]+(/[a-zA-Z0-9\\-_\\.]+)*$": {
"$ref": "#/definitions/CaptureDef"
}
},
"additionalProperties": false
},
"collections": {
"title": "Collections of this Catalog.",
"default": {},
"examples": [
{
"acmeCo/collection": {
"derivation": null,
"journals": {
"fragments": {}
},
"key": [
"/json/ptr"
],
"projections": {},
"schema": "../path/to/local.yaml"
}
}
],
"type": "object",
"patternProperties": {
"^[a-zA-Z0-9\\-_\\.]+(/[a-zA-Z0-9\\-_\\.]+)*$": {
"$ref": "#/definitions/CollectionDef"
}
},
"additionalProperties": false
},
"import": {
"title": "Import other Flow catalog sources.",
"description": "By importing another Flow catalog source, the collections, schemas, and derivations it defines become usable within this Catalog source. Each import is an absolute URI, or a URI which is relative to this source location.",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/Import"
}
},
"materializations": {
"title": "Materializations of this Catalog.",
"default": {},
"examples": [
{
"acmeCo/materialization": {
"bindings": [
{
"fields": {
"exclude": [],
"include": {},
"recommended": true
},
"partitions": null,
"resource": {
"table": "a_table"
},
"source": "source/collection"
}
],
"endpoint": {
"connector": {
"config": "connector-config.yaml",
"image": "connector/image:tag"
}
},
"shards": {}
}
}
],
"type": "object",
"patternProperties": {
"^[a-zA-Z0-9\\-_\\.]+(/[a-zA-Z0-9\\-_\\.]+)*$": {
"$ref": "#/definitions/MaterializationDef"
}
},
"additionalProperties": false
},
"npmDependencies": {
"title": "NPM package dependencies of the Catalog.",
"description": "Dependencies are included when building the catalog's build NodeJS package, as {\"package-name\": \"version\"}. I.e. {\"moment\": \"^2.24\"}.\n\nVersion strings can take any form understood by NPM. See https://docs.npmjs.com/files/package.json#dependencies",
"default": {
"a-npm-package": "^1.2.3"
},
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"resources": {
"title": "Inlined resources of the catalog.",
"description": "Inline resources are intended for Flow API clients (only), and are used to bundle multiple resources into a single POSTed catalog document. Each key must be an absolute URL which is referenced from elsewhere in the Catalog, which is also the URL from which this resource was fetched.",
"default": {},
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/ResourceDef"
}
},
"storageMappings": {
"default": {},
"examples": [
{
"acmeCo/widgets/": {
"stores": [
{
"bucket": "my-bucket",
"prefix": null,
"provider": "S3"
}
]
}
}
],
"type": "object",
"patternProperties": {
"^([a-zA-Z0-9\\-_\\.]+/)*$": {
"$ref": "#/definitions/StorageDef"
}
},
"additionalProperties": false
},
"tests": {
"title": "Tests of this Catalog.",
"default": {},
"examples": [
{
"acmeCo/conversions/test": [
{
"ingest": {
"collection": "acmeCo/collection",
"description": "Description of the ingestion.",
"documents": [
{
"a": "document"
},
{
"another": "document"
}
]
}
},
{
"verify": {
"collection": "acmeCo/collection",
"description": "Description of the verification.",
"documents": [
{
"a": "document"
},
{
"another": "document"
}
],
"partitions": null
}
}
]
}
],
"type": "object",
"patternProperties": {
"^[a-zA-Z0-9\\-_\\.]+(/[a-zA-Z0-9\\-_\\.]+)*$": {
"type": "array",
"items": {
"$ref": "#/definitions/TestStep"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"definitions": {
"BucketType": {
"description": "BucketType is a provider of object storage buckets, which are used to durably storage journal fragments.",
"examples": [
"S3"
],
"type": "string",
"enum": [
"GCS",
"S3",
"AZURE"
]
},
"Capture": {
"description": "Capture names are paths of Unicode letters, numbers, '-', '_', or '.'. Each path component is separated by a slash '/', and a name may not begin or end in a '/'.",
"examples": [
"acmeCo/capture"
],
"type": "string",
"pattern": "^[a-zA-Z0-9\\-_\\.]+(/[a-zA-Z0-9\\-_\\.]+)*$"
},
"CaptureBinding": {
"examples": [
{
"resource": {
"stream": "a_stream"
},
"target": "target/collection"
}
],
"type": "object",
"required": [
"resource",
"target"
],
"properties": {
"resource": {
"title": "Endpoint resource to capture from.",
"type": "object",
"additionalProperties": true
},
"target": {
"title": "Name of the collection to capture into.",
"$ref": "#/definitions/Collection"
}
},
"additionalProperties": false
},
"CaptureDef": {
"description": "A Capture binds an external system and target (e.x., a SQL table or cloud storage bucket) from which data should be continuously captured, with a Flow collection into that captured data is ingested. Multiple Captures may be bound to a single collection, but only one capture may exist for a given endpoint and target.",
"type": "object",
"required": [
"bindings",
"endpoint"
],
"properties": {
"bindings": {
"title": "Bound collections to capture from the endpoint.",
"type": "array",
"items": {
"$ref": "#/definitions/CaptureBinding"
}
},
"endpoint": {
"title": "Endpoint to capture from.",
"$ref": "#/definitions/CaptureEndpoint"
},
"interval": {
"title": "Interval of time between invocations of the capture.",
"description": "Configured intervals are applicable only to connectors which are unable to continuously tail their source, and which instead produce a current quantity of output and then exit. Flow will start the connector again after the given interval of time has passed.\n\nIntervals are relative to the start of an invocation and not its completion. For example, if the interval is five minutes, and an invocation of the capture finishes after two minutes, then the next invocation will be started after three additional minutes.",
"default": "5m",
"type": [
"string",
"null"
],
"pattern": "^\\d+(s|m|h)$"
},
"shards": {
"title": "Template for shards of this capture task.",
"default": {},
"$ref": "#/definitions/ShardTemplate"
}
},
"additionalProperties": false
},
"CaptureEndpoint": {
"description": "An Endpoint connector used for Flow captures.",
"oneOf": [
{
"title": "A Connector.",
"type": "object",
"required": [
"connector"
],
"properties": {
"connector": {
"$ref": "#/definitions/ConnectorConfig"
}
},
"additionalProperties": false
},
{
"title": "A push ingestion.",
"type": "object",
"required": [
"ingest"
],
"properties": {
"ingest": {
"$ref": "#/definitions/IngestConfig"
}
},
"additionalProperties": false
}
]
},
"Collection": {
"description": "Collection names are paths of Unicode letters, numbers, '-', '_', or '.'. Each path component is separated by a slash '/', and a name may not begin or end in a '/'.",
"examples": [
"acmeCo/collection"
],
"type": "string",
"pattern": "^[a-zA-Z0-9\\-_\\.]+(/[a-zA-Z0-9\\-_\\.]+)*$"
},
"CollectionDef": {
"description": "Collection describes a set of related documents, where each adheres to a common schema and grouping key. Collections are append-only: once a document is added to a collection, it is never removed. However, it may be replaced or updated (either in whole, or in part) by a future document sharing its key. Each new document of a given key is \"reduced\" into existing documents of the key. By default, this reduction is achieved by completely replacing the previous document, but much richer reduction behaviors can be specified through the use of annotated reduction strategies of the collection schema.",
"examples": [
{
"derivation": null,
"journals": {
"fragments": {}
},
"key": [
"/json/ptr"
],
"projections": {},
"schema": "../path/to/local.yaml"
}
],
"type": "object",
"required": [
"key",
"schema"
],
"properties": {
"derivation": {
"title": "Derivation which builds this collection from others.",
"anyOf": [
{
"$ref": "#/definitions/Derivation"
},
{
"type": "null"
}
]
},
"journals": {
"title": "Template for journals of this collection.",
"default": {
"fragments": {}
},
"$ref": "#/definitions/JournalTemplate"
},
"key": {
"title": "Composite key of this collection.",
"$ref": "#/definitions/CompositeKey"
},
"projections": {
"title": "Projections and logical partitions of this collection.",
"default": {},
"examples": [
{
"a_field": "/json/ptr",
"a_partition": {
"location": "/json/ptr",
"partition": true
}
}
],
"type": "object",
"patternProperties": {
"^([^/~]|(~[01]))+(/([^/~]|(~[01]))+)*$": {
"$ref": "#/definitions/Projection"
}
},
"additionalProperties": false
},
"schema": {
"title": "Schema against which collection documents are validated and reduced.",
"examples": [
"../path/to/schema#/$defs/subPath"
],
"$ref": "#/definitions/Schema"
}
},
"additionalProperties": false
},
"CompositeKey": {
"description": "Ordered JSON-Pointers which define how a composite key may be extracted from a collection document.",
"examples": [
[
"/json/ptr"
]
],
"type": "array",
"items": {
"$ref": "#/definitions/JsonPointer"
}
},
"CompressionCodec": {
"description": "A CompressionCodec may be applied to compress journal fragments before they're persisted to cloud stoage. The compression applied to a journal fragment is included in its filename, such as \".gz\" for GZIP. A collection's compression may be changed at any time, and will affect newly-written journal fragments.",
"examples": [
"GZIP_OFFLOAD_DECOMPRESSION"
],
"type": "string",
"enum": [
"NONE",
"GZIP",
"ZSTANDARD",
"SNAPPY",
"GZIP_OFFLOAD_DECOMPRESSION"
]
},
"Config": {
"description": "A configuration which is either defined inline, or is a relative or absolute URI to a configuration file.",
"examples": [
"http://example/config",
"../path/to/config.yaml",
{
"config_key": "value"
}
],
"anyOf": [
{
"description": "Relative URL to a configuration file.",
"$ref": "#/definitions/RelativeUrl"
},
{
"description": "Inline configuration.",
"type": "object",
"additionalProperties": true
}
]
},
"ConnectorConfig": {
"description": "Connector image and configuration specification.",
"type": "object",
"required": [
"config",
"image"
],
"properties": {
"config": {
"title": "Configuration of the connector.",
"$ref": "#/definitions/Config"
},
"image": {
"title": "Image of the connector.",
"type": "string"
}
}
},
"ContentType": {
"description": "ContentType is the type of an imported resource's content.",
"examples": [
"CATALOG"
],
"type": "string",
"enum": [
"CATALOG",
"JSON_SCHEMA",
"TYPESCRIPT_MODULE",
"CONFIG",
"DOCUMENTS_FIXTURE"
]
},
"Derivation": {
"description": "A derivation specifies how a collection is derived from other collections. A collection without a derivation is a \"captured\" collection, into which documents are directly ingested.",
"type": "object",
"required": [
"transform"
],
"properties": {
"register": {
"title": "Register configuration of this derivation.",
"default": {
"initial": null,
"schema": true
},
"$ref": "#/definitions/Register"
},
"shards": {
"title": "Template for shards of this derivation task.",
"default": {},
"$ref": "#/definitions/ShardTemplate"
},
"transform": {
"title": "Transforms which make up this derivation.",
"type": "object",
"patternProperties": {
"^[a-zA-Z0-9\\-_\\.]+$": {
"$ref": "#/definitions/TransformDef"
}
},
"additionalProperties": false,
"example": [
{
"nameOfTransform": {
"priority": 0,
"publish": {
"lambda": "typescript"
},
"readDelay": null,
"shuffle": null,
"source": {
"name": "source/collection",
"partitions": null,
"schema": null
},
"update": null
}
}
]
}
},
"additionalProperties": false
},
"Field": {
"description": "Field names a projection of a document location. They may include '/', but cannot begin or end with one. Many Fields are automatically inferred by Flow from a collection JSON Schema, and are the JSON Pointer of the document location with the leading '/' removed. User-provided Fields which act as a logical partitions are restricted to Unicode letters, numbers, '-', '_', or '.'",
"examples": [
"my_field"
],
"type": "string",
"pattern": "^([^/~]|(~[01]))+(/([^/~]|(~[01]))+)*$"
},
"FragmentTemplate": {
"description": "A FragmentTemplate configures how journal fragment files are produced as part of a collection.",
"examples": [
{
"compressionCodec": "ZSTANDARD",
"flushInterval": "1h"
}
],
"type": "object",
"properties": {
"compressionCodec": {
"title": "Codec used to compress Journal Fragments.",
"anyOf": [
{
"$ref": "#/definitions/CompressionCodec"
},
{
"type": "null"
}
]
},
"flushInterval": {
"title": "Maximum flush delay before in-progress fragments are closed and persisted",
"description": "into cloud storage. Intervals are converted into uniform time segments: 24h will \"roll\" all fragments at midnight UTC every day, 1h at the top of every hour, 15m a :00, :15, :30, :45 past the hour, and so on. If not set, then fragments are not flushed on time-based intervals.",
"type": [
"string",
"null"
],
"pattern": "^\\d+(s|m|h)$"
},
"length": {
"title": "Desired content length of each fragment, in megabytes before compression.",
"description": "When a collection journal fragment reaches this threshold, it will be closed off and pushed to cloud storage. If not set, a default of 512MB is used.",
"type": [
"integer",
"null"
],
"format": "uint32",
"maximum": 4096.0,
"minimum": 32.0
},
"retention": {
"title": "Duration for which historical fragments of a collection should be kept.",
"description": "If not set, then fragments are retained indefinitely.",
"type": [
"string",
"null"
],
"pattern": "^\\d+(s|m|h)$"
}
},
"additionalProperties": false
},
"Import": {
"description": "Import a referenced Resource into the catalog.",
"examples": [
"./a/flow.yaml",
{
"contentType": "JSON_SCHEMA",
"url": "https://example/schema.json"
}
],
"anyOf": [
{
"$ref": "#/definitions/RelativeUrl"
},
{
"type": "object",
"required": [
"contentType",
"url"
],
"properties": {
"contentType": {
"title": "The content-type of the imported resource.",
"$ref": "#/definitions/ContentType"
},
"url": {
"title": "The resource to import.",
"$ref": "#/definitions/RelativeUrl"
}
},
"additionalProperties": false
}
]
},
"IngestConfig": {
"description": "Ingest source specification.",
"type": "object"
},
"JournalTemplate": {
"description": "A JournalTemplate configures the journals which make up the physical partitions of a collection.",
"examples": [
{
"fragments": {
"compressionCodec": "ZSTANDARD",
"flushInterval": "1h"
}
}
],
"type": "object",
"required": [
"fragments"
],
"properties": {
"fragments": {
"title": "Fragment configuration of collection journals.",
"$ref": "#/definitions/FragmentTemplate"
}
},
"additionalProperties": false
},
"JsonPointer": {
"description": "JSON Pointer which identifies a location in a document.",
"examples": [
"/json/ptr"
],
"type": "string",
"pattern": "^(/([^/~]|(~[01]))+)*$"
},
"Lambda": {
"description": "Lambdas are user functions which are invoked by the Flow runtime to process and transform source collection documents into derived collections. Flow supports multiple lambda run-times, with a current focus on TypeScript and remote HTTP APIs.\n\nTypeScript lambdas are invoked within on-demand run-times, which are automatically started and scaled by Flow's task distribution in order to best co-locate data and processing, as well as to manage fail-over.\n\nRemote lambdas may be called from many Flow tasks, and are up to the API provider to provision and scale.",
"examples": [
"typescript",
{
"remote": "http://example/api"
}
],
"oneOf": [
{
"type": "string",
"enum": [
"typescript"
]
},
{
"type": "object",
"required": [
"remote"
],
"properties": {
"remote": {
"type": "string"
}
},
"additionalProperties": false
}
]
},
"Materialization": {
"description": "Materialization names are paths of Unicode letters, numbers, '-', '_', or '.'. Each path component is separated by a slash '/', and a name may not begin or end in a '/'.",
"examples": [
"acmeCo/materialization"
],
"type": "string",
"pattern": "^[a-zA-Z0-9\\-_\\.]+(/[a-zA-Z0-9\\-_\\.]+)*$"
},
"MaterializationBinding": {
"examples": [
{
"fields": {
"exclude": [],
"include": {},
"recommended": true
},
"partitions": null,
"resource": {
"table": "a_table"
},
"source": "source/collection"
}
],
"type": "object",
"required": [
"resource",
"source"
],
"properties": {
"fields": {
"title": "Selected projections for this materialization.",
"default": {
"exclude": [],
"include": {},
"recommended": true
},
"$ref": "#/definitions/MaterializationFields"
},
"partitions": {
"title": "Selector over partitions of the source collection to read.",
"default": {
"exclude": {
"other_partition": [
32,
64
]
},
"include": {
"a_partition": [
"A",
"B"
]
}
},
"anyOf": [
{
"$ref": "#/definitions/PartitionSelector"
},
{
"type": "null"
}
]
},
"resource": {
"title": "Endpoint resource to materialize into.",
"type": "object",
"additionalProperties": true
},
"source": {
"title": "Name of the collection to be materialized.",
"$ref": "#/definitions/Collection"
}
},
"additionalProperties": false
},
"MaterializationDef": {
"description": "A Materialization binds a Flow collection with an external system & target (e.x, a SQL table) into which the collection is to be continuously materialized.",
"type": "object",
"required": [
"bindings",
"endpoint"
],
"properties": {
"bindings": {
"title": "Bound collections to materialize into the endpoint.",
"type": "array",
"items": {
"$ref": "#/definitions/MaterializationBinding"
}
},
"endpoint": {
"title": "Endpoint to materialize into.",
"$ref": "#/definitions/MaterializationEndpoint"
},
"shards": {
"title": "Template for shards of this materialization task.",
"default": {},
"$ref": "#/definitions/ShardTemplate"
}
},
"additionalProperties": false
},
"MaterializationEndpoint": {
"description": "An Endpoint connector used for Flow materializations.",
"oneOf": [
{
"title": "A Connector.",
"type": "object",
"required": [
"connector"
],
"properties": {
"connector": {
"$ref": "#/definitions/ConnectorConfig"
}
},
"additionalProperties": false
},
{
"title": "A SQLite database.",
"type": "object",
"required": [
"sqlite"
],
"properties": {
"sqlite": {
"$ref": "#/definitions/SqliteConfig"
}
},
"additionalProperties": false
}
]
},
"MaterializationFields": {
"description": "MaterializationFields defines a selection of projections to materialize, as well as optional per-projection, driver-specific configuration.",
"examples": [
{
"exclude": [
"removed"
],
"include": {
"added": {}
},
"recommended": true
}
],
"type": "object",
"required": [
"recommended"
],
"properties": {
"exclude": {
"title": "Fields to exclude.",
"description": "This removes from recommended projections, where enabled.",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/Field"
}
},
"include": {
"title": "Fields to include.",
"description": "This supplements any recommended fields, where enabled. Values are passed through to the driver, e.x. for customization of the driver's schema generation or runtime behavior with respect to the field.",
"default": {},
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": true
}
},
"recommended": {
"title": "Should recommended projections for the endpoint be used?",
"type": "boolean"
}
},
"additionalProperties": false
},
"PartitionSelector": {
"description": "Partition selectors identify a desired subset of the available logical partitions of a collection.",
"examples": [
{
"exclude": {
"other_partition": [
32,
64
]
},
"include": {
"a_partition": [
"A",
"B"
]
}
}
],
"type": "object",
"properties": {
"exclude": {
"description": "Partition field names and values which are excluded from the source collection. Any documents matching *any one* of the partition values will be excluded.",
"default": {},
"type": "object",
"additionalProperties": {
"type": "array",
"items": true
}
},
"include": {
"description": "Partition field names and corresponding values which must be matched from the Source collection. Only documents having one of the specified values across all specified partition names will be matched. For example, source: [App, Web] region: [APAC] would mean only documents of 'App' or 'Web' source and also occurring in the 'APAC' region will be processed.",
"default": {},
"type": "object",
"additionalProperties": {
"type": "array",
"items": true
}
}
},
"additionalProperties": false
},
"Prefix": {
"description": "Prefixes are paths of Unicode letters, numbers, '-', '_', or '.'. Each path component is separated by a slash '/'. Prefixes may not begin in a '/', but must end in one.",
"examples": [
"acmeCo/widgets/"
],
"type": "string",
"pattern": "^([a-zA-Z0-9\\-_\\.]+/)*$"
},
"Projection": {
"description": "Projections are named locations within a collection document which may be used for logical partitioning or directly exposed to databases into which collections are materialized.",
"anyOf": [
{
"$ref": "#/definitions/JsonPointer"
},
{
"type": "object",
"required": [
"location"
],
"properties": {
"location": {
"title": "Location of this projection.",
"$ref": "#/definitions/JsonPointer"
},
"partition": {
"title": "Is this projection a logical partition?",
"default": false,
"type": "boolean"
}
},
"additionalProperties": false
}
]
},
"Publish": {
"description": "Publish lambdas take a source document, a current register and (if there is also an \"update\" lambda) a previous register, and transform them into one or more documents to be published into a derived collection.",
"examples": [
{
"lambda": "typescript"
}
],
"type": "object",
"required": [
"lambda"
],
"properties": {
"lambda": {
"title": "Lambda invoked by the publish.",
"$ref": "#/definitions/Lambda"
}
},
"additionalProperties": false
},
"Register": {
"description": "Registers are the internal states of a derivation, which can be read and updated by all of its transformations. They're an important building block for joins, aggregations, and other complex stateful workflows.\n\nRegisters are implemented using JSON-Schemas, often ones with reduction annotations. When reading source documents, every distinct shuffle key by which the source collection is read is mapped to a corresponding register value (or, if no shuffle key is defined, the source collection's key is used instead).\n\nThen, an \"update\" lambda of the transformation produces updates which are reduced into the register, and a \"publish\" lambda reads the current (and previous, if updated) register value.",
"type": "object",
"required": [
"schema"
],
"properties": {
"initial": {
"title": "Initial value of a keyed register which has never been updated.",
"description": "If not specified, the default is \"null\".",
"default": null
},
"schema": {
"title": "Schema which validates and reduces register documents.",
"$ref": "#/definitions/Schema"
}
},
"additionalProperties": false
},
"RelativeUrl": {
"description": "A URL identifying a resource, which may be a relative local path with respect to the current resource (i.e, ../path/to/flow.yaml), or may be an external absolute URL (i.e., http://example/flow.yaml).",
"examples": [
"https://example/resource"
],
"type": "string",
"pattern": "^[^ ]+$"
},
"ResourceDef": {
"description": "A Resource is binary content with an associated ContentType.",
"type": "object",
"required": [