-
Notifications
You must be signed in to change notification settings - Fork 56
/
flow.schema.json
1594 lines (1594 loc) · 55.4 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.",
"type": "string"
},
"captures": {
"title": "Captures of this Catalog.",
"examples": [
{
"acmeCo/capture": {
"autoDiscover": {
"addNewBindings": true,
"evolveIncompatibleCollections": true
},
"bindings": [
{
"resource": {
"stream": "a_stream"
},
"target": "target/collection"
}
],
"endpoint": {
"connector": {
"config": "connector-config.yaml",
"image": "connector/image:tag"
}
}
}
}
],
"type": "object",
"patternProperties": {
"^[\\p{Letter}\\p{Number}\\-_\\.]+(/[\\p{Letter}\\p{Number}\\-_\\.]+)*$": {
"$ref": "#/definitions/CaptureDef"
}
},
"additionalProperties": false
},
"collections": {
"title": "Collections of this Catalog.",
"examples": [
{
"acmeCo/collection": {
"key": [
"/json/ptr"
],
"schema": {
"properties": {
"bar": {
"const": 42
},
"foo": {
"type": "integer"
}
},
"type": "object"
}
}
}
],
"type": "object",
"patternProperties": {
"^[\\p{Letter}\\p{Number}\\-_\\.]+(/[\\p{Letter}\\p{Number}\\-_\\.]+)*$": {
"$ref": "#/definitions/CollectionDef"
}
},
"additionalProperties": false
},
"import": {
"title": "Import other Flow catalog sources.",
"description": "By importing another Flow catalog source, its collections, schemas, and derivations are bundled into the publication context of this specification. Imports are relative or absolute URLs, relative to this specification's location.",
"type": "array",
"items": {
"$ref": "#/definitions/RelativeUrl"
}
},
"materializations": {
"title": "Materializations of this Catalog.",
"examples": [
{
"acmeCo/materialization": {
"bindings": [
{
"fields": {
"recommended": true
},
"resource": {
"table": "a_table"
},
"source": "source/collection"
}
],
"endpoint": {
"connector": {
"config": "connector-config.yaml",
"image": "connector/image:tag"
}
}
}
}
],
"type": "object",
"patternProperties": {
"^[\\p{Letter}\\p{Number}\\-_\\.]+(/[\\p{Letter}\\p{Number}\\-_\\.]+)*$": {
"$ref": "#/definitions/MaterializationDef"
}
},
"additionalProperties": false
},
"tests": {
"title": "Tests of this Catalog.",
"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"
}
]
}
}
]
}
],
"type": "object",
"patternProperties": {
"^[\\p{Letter}\\p{Number}\\-_\\.]+(/[\\p{Letter}\\p{Number}\\-_\\.]+)*$": {
"$ref": "#/definitions/TestDef"
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"definitions": {
"AutoDiscover": {
"description": "Settings to determine how Flow should stay abreast of ongoing changes to collections and schemas.",
"type": "object",
"properties": {
"addNewBindings": {
"description": "Automatically add new bindings discovered from the source.",
"default": false,
"type": "boolean"
},
"evolveIncompatibleCollections": {
"description": "Whether to automatically evolve collections and/or materialization bindings to handle changes to collections that would otherwise be incompatible with the existing catalog.",
"default": false,
"type": "boolean"
}
},
"additionalProperties": false
},
"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": "^[\\p{Letter}\\p{Number}\\-_\\.]+(/[\\p{Letter}\\p{Number}\\-_\\.]+)*$"
},
"CaptureBinding": {
"examples": [
{
"resource": {
"stream": "a_stream"
},
"target": "target/collection"
}
],
"type": "object",
"required": [
"resource",
"target"
],
"properties": {
"backfill": {
"title": "Backfill counter for this binding.",
"description": "Every increment of this counter will result in a new backfill of this binding from the captured endpoint. For example when capturing from a SQL table, incrementing this counter will cause the table to be re-captured in its entirety from the source database.\n\nNote that a backfill does *not* truncate the target collection, and documents published by a backfilled binding will coexist with (and be ordered after) any documents which were published as part of a preceding backfill.",
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"disable": {
"title": "Whether to disable the binding",
"description": "Disabled bindings are inactive, and not validated. They can be used to represent discovered resources that are intentionally not being captured.",
"type": "boolean"
},
"resource": {
"title": "Endpoint resource to capture from."
},
"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": {
"autoDiscover": {
"title": "Continuously keep the collection spec and schema up-to-date",
"$ref": "#/definitions/AutoDiscover"
},
"bindings": {
"title": "Bound collections to capture from the endpoint.",
"type": "array",
"items": {
"$ref": "#/definitions/CaptureBinding"
}
},
"delete": {
"title": "Delete this capture within the control plane.",
"description": "When true, a publication will delete this capture.",
"type": "boolean"
},
"endpoint": {
"title": "Endpoint to capture from.",
"$ref": "#/definitions/CaptureEndpoint"
},
"expectPubId": {
"title": "Expected publication ID of this capture within the control plane.",
"description": "When present, a publication of the capture will fail if the last publication ID in the control plane doesn't match this value.",
"$ref": "#/definitions/Id"
},
"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.",
"type": [
"string",
"null"
],
"pattern": "^\\d+(s|m|h)$"
},
"shards": {
"title": "Template for shards of this capture task.",
"$ref": "#/definitions/ShardTemplate"
}
},
"additionalProperties": false
},
"CaptureEndpoint": {
"description": "An endpoint from which Flow will capture.",
"oneOf": [
{
"title": "A Connector.",
"type": "object",
"required": [
"connector"
],
"properties": {
"connector": {
"$ref": "#/definitions/ConnectorConfig"
}
},
"additionalProperties": false
},
{
"title": "A local command (development only).",
"type": "object",
"required": [
"local"
],
"properties": {
"local": {
"$ref": "#/definitions/LocalConfig"
}
},
"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": "^[\\p{Letter}\\p{Number}\\-_\\.]+(/[\\p{Letter}\\p{Number}\\-_\\.]+)*$"
},
"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": [
{
"key": [
"/json/ptr"
],
"schema": {
"properties": {
"bar": {
"const": 42
},
"foo": {
"type": "integer"
}
},
"type": "object"
}
}
],
"type": "object",
"oneOf": [
{
"required": [
"schema"
],
"properties": {
"readSchema": false,
"writeSchema": false
}
},
{
"required": [
"readSchema",
"writeSchema"
],
"properties": {
"schema": false
}
}
],
"required": [
"key"
],
"properties": {
"delete": {
"title": "Delete this collection within the control plane.",
"description": "When true, a publication will delete this collection.",
"type": "boolean"
},
"derive": {
"$ref": "#/definitions/Derivation"
},
"expectPubId": {
"title": "Expected publication ID of this collection within the control plane.",
"description": "When present, a publication of the collection will fail if the last publication ID in the control plane doesn't match this value.",
"$ref": "#/definitions/Id"
},
"journals": {
"title": "Template for journals of this collection.",
"$ref": "#/definitions/JournalTemplate"
},
"key": {
"title": "Composite key of this collection.",
"$ref": "#/definitions/CompositeKey"
},
"projections": {
"title": "Projections and logical partitions of this collection.",
"examples": [
{
"a_field": "/json/ptr",
"a_partition": {
"location": "/json/ptr",
"partition": true
}
}
],
"type": "object",
"patternProperties": {
"^([^/~]|(~[01]))+(/([^/~]|(~[01]))+)*$": {
"$ref": "#/definitions/Projection"
}
},
"additionalProperties": false
},
"readSchema": {
"title": "Schema against which collection documents are validated and reduced on read.",
"$ref": "#/definitions/Schema"
},
"schema": {
"title": "Schema against which collection documents are validated and reduced on write and read.",
"examples": [
"../path/to/schema#/$defs/subPath"
],
"$ref": "#/definitions/Schema"
},
"writeSchema": {
"title": "Schema against which collection documents are validated and reduced on write.",
"$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"
]
},
"ConnectorConfig": {
"description": "Connector image and configuration specification.",
"type": "object",
"required": [
"config",
"image"
],
"properties": {
"config": {
"title": "Configuration of the connector."
},
"image": {
"title": "Image of the connector.",
"type": "string"
}
}
},
"DekafConfig": {
"description": "Dekaf service configuration",
"type": "object",
"required": [
"config",
"variant"
],
"properties": {
"config": {
"title": "Dekaf endpoint config."
},
"variant": {
"title": "Dekaf variant type",
"type": "string"
}
}
},
"Derivation": {
"description": "Derive specifies how a collection is derived from other collections.",
"type": "object",
"required": [
"transforms",
"using"
],
"properties": {
"shards": {
"title": "Template for shards of this derivation task.",
"$ref": "#/definitions/ShardTemplate"
},
"shuffleKeyTypes": {
"title": "Key component types of the shuffle keys used by derivation lambdas.",
"description": "Typically you omit this and Flow infers it from your transform shuffle keys. In some circumstances, Flow may require that you explicitly tell it of your shuffled key types.",
"type": "array",
"items": {
"$ref": "#/definitions/ShuffleType"
}
},
"transforms": {
"title": "Transforms which make up this derivation.",
"type": "array",
"items": {
"$ref": "#/definitions/TransformDef"
}
},
"using": {
"title": "The selected runtime for this derivation.",
"$ref": "#/definitions/DeriveUsing"
}
},
"additionalProperties": false
},
"DeriveUsing": {
"description": "A derivation runtime implementation.",
"oneOf": [
{
"title": "A Connector.",
"type": "object",
"required": [
"connector"
],
"properties": {
"connector": {
"$ref": "#/definitions/ConnectorConfig"
}
},
"additionalProperties": false
},
{
"title": "A SQLite derivation.",
"type": "object",
"required": [
"sqlite"
],
"properties": {
"sqlite": {
"$ref": "#/definitions/DeriveUsingSqlite"
}
},
"additionalProperties": false
},
{
"title": "A TypeScript derivation.",
"type": "object",
"required": [
"typescript"
],
"properties": {
"typescript": {
"$ref": "#/definitions/DeriveUsingTypescript"
}
},
"additionalProperties": false
},
{
"title": "A local command (development only).",
"type": "object",
"required": [
"local"
],
"properties": {
"local": {
"$ref": "#/definitions/LocalConfig"
}
},
"additionalProperties": false
}
]
},
"DeriveUsingSqlite": {
"type": "object",
"properties": {
"migrations": {
"title": "Ordered migrations which are used to initialize the database.",
"description": "Migrations may be provided as an inline string, or as a relative URL to a file containing the migration SQL.",
"type": "array",
"items": {
"oneOf": [
{
"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": "^[^ ]+$"
},
{
"type": "string",
"contentMediaType": "text/x.sql"
}
]
}
}
},
"additionalProperties": false
},
"DeriveUsingTypescript": {
"type": "object",
"required": [
"module"
],
"properties": {
"module": {
"title": "TypeScript module implementing this derivation.",
"description": "Module is either a relative URL of a TypeScript module file, or is an inline representation of a Typescript module. The module must have a exported Derivation variable which is an instance implementing the corresponding Derivation interface.",
"oneOf": [
{
"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": "^[^ ]+$"
},
{
"type": "string",
"contentMediaType": "text/x.typescript"
}
]
}
},
"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.",
"$ref": "#/definitions/CompressionCodec"
},
"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",
"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
},
"FullSource": {
"description": "A source collection and details of how it's read.",
"examples": [
{
"name": "source/collection"
}
],
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"title": "Name of the collection to be read.",
"$ref": "#/definitions/Collection"
},
"notAfter": {
"title": "Upper bound date-time for documents which should be processed.",
"description": "Source collection documents published after this date-time are filtered. `notAfter` is *only* a filter. Updating its value will not cause Flow to re-process documents that have already been read. Optional. Default is to process all documents.",
"type": [
"string",
"null"
],
"format": "date-time"
},
"notBefore": {
"title": "Lower bound date-time for documents which should be processed.",
"description": "Source collection documents published before this date-time are filtered. `notBefore` is *only* a filter. Updating its value will not cause Flow to re-process documents that have already been read. Optional. Default is to process all documents.",
"type": [
"string",
"null"
],
"format": "date-time"
},
"partitions": {
"title": "Selector over partition of the source collection to read.",
"examples": [
{
"exclude": {
"other_partition": [
32,
64
]
},
"include": {
"a_partition": [
"A",
"B"
]
}
}
],
"$ref": "#/definitions/PartitionSelector"
}
},
"additionalProperties": false
},
"Id": {
"type": "string"
},
"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]))+)*$"
},
"LocalConfig": {
"description": "Local command and its configuration.",
"type": "object",
"required": [
"command",
"config"
],
"properties": {
"command": {
"title": "Command to execute",
"type": "array",
"items": {
"type": "string"
}
},
"config": {
"title": "Configuration of the command."
},
"env": {
"title": "Environment variables",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"protobuf": {
"title": "Use protobuf codec instead of JSON.",
"type": "boolean"
}
}
},
"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": "^[\\p{Letter}\\p{Number}\\-_\\.]+(/[\\p{Letter}\\p{Number}\\-_\\.]+)*$"
},
"MaterializationBinding": {
"examples": [
{
"fields": {
"recommended": true
},
"resource": {
"table": "a_table"
},
"source": "source/collection"
}
],
"type": "object",
"required": [
"resource",
"source"
],
"properties": {
"backfill": {
"title": "Backfill counter for this binding.",
"description": "Every increment of this counter will result in a new backfill of this binding from its source collection to its materialized resource. For example when materializing to a SQL table, incrementing this counter causes the table to be dropped and then rebuilt by re-reading the source collection.",
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"disable": {
"title": "Whether to disable the binding",
"description": "Disabled bindings are inactive, and not validated.",
"type": "boolean"
},
"fields": {
"title": "Selected projections for this materialization.",
"default": {
"recommended": true
},
"$ref": "#/definitions/MaterializationFields"
},
"onIncompatibleSchemaChange": {
"title": "Action to take when a schema change is rejected due to incompatibility.",
"description": "This setting is used to determine the action to take when a schema change is rejected due to incompatibility with the target resource. By default, the binding will have its `backfill` counter incremented, causing it to be re-materialized from the source collection.",
"$ref": "#/definitions/OnIncompatibleSchemaChange"
},
"priority": {
"title": "Priority applied to documents processed by this binding.",
"description": "When all bindings are of equal priority, Flow processes documents according to their associated publishing time, as encoded in the document UUID.\n\nHowever, when one binding has a higher priority than others, then *all* ready documents are processed through the binding before *any* documents of other bindings are processed.",
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"resource": {
"title": "Endpoint resource to materialize into."
},
"source": {
"title": "The collection to be materialized.",
"$ref": "#/definitions/Source"
}
},
"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"
}
},
"delete": {
"title": "Delete this materialization within the control plane.",
"description": "When true, a publication will delete this materialization.",
"type": "boolean"
},
"endpoint": {
"title": "Endpoint to materialize into.",
"$ref": "#/definitions/MaterializationEndpoint"
},
"expectPubId": {
"title": "Expected publication ID of this materialization within the control plane.",
"description": "When present, a publication of the materialization will fail if the last publication ID in the control plane doesn't match this value.",
"$ref": "#/definitions/Id"
},
"onIncompatibleSchemaChange": {
"title": "Default handling of schema changes that are incompatible with the target resource.",
"description": "This can be overridden on a per-binding basis.",
"$ref": "#/definitions/OnIncompatibleSchemaChange"
},
"shards": {
"title": "Template for shards of this materialization task.",
"$ref": "#/definitions/ShardTemplate"
},
"sourceCapture": {
"title": "Automatically materialize new bindings from a named capture",
"$ref": "#/definitions/SourceCapture"
}
},
"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 local command (development only).",
"type": "object",
"required": [
"local"
],
"properties": {
"local": {
"$ref": "#/definitions/LocalConfig"
}
},
"additionalProperties": false
},
{
"title": "A Dekaf connection",
"type": "object",
"required": [
"dekaf"
],
"properties": {
"dekaf": {
"$ref": "#/definitions/DekafConfig"
}
},
"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.",
"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.",
"type": "object",
"additionalProperties": true
},
"recommended": {
"title": "Should recommended projections for the endpoint be used?",
"type": "boolean"
}
},
"additionalProperties": false
},
"OnIncompatibleSchemaChange": {
"description": "Determines how to handle incompatible schema changes for a given binding.",
"examples": [
"backfill"
],
"oneOf": [
{
"description": "Fail the publication of the incompatible schema change. This prevents any schema change from being applied if it is incompatible with the existing schema, as determined by the connector.",
"type": "string",
"enum": [
"abort"
]
},