-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
materializations: fail validation on nullable collection keys with no…
… default value Materializations do not support collections with nullable keys, and will generally fail if a null value is every encountered for a collection key. This changes validation to enforce that a nullable collection key not be allowed, unless it has a default value annotation. If there is a default value annotation, the connector is assured that it will never actually see a null value, and it will not try to drop NOT NULL constraints from the materialized field in future `Apply` calls.
- Loading branch information
1 parent
f7166d3
commit 5d53313
Showing
4 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
Binary file added
BIN
+1.92 KB
materialize-boilerplate/testdata/validate/generated_specs/nullable-key.flow.proto
Binary file not shown.
24 changes: 24 additions & 0 deletions
24
materialize-boilerplate/testdata/validate/nullable-key.flow.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
collections: | ||
key/value: | ||
schema: | ||
type: object | ||
properties: | ||
key: | ||
type: string | ||
default: "value" | ||
key: [/key] | ||
|
||
materializations: | ||
test/sqlite: | ||
endpoint: | ||
connector: | ||
image: ghcr.io/estuary/materialize-sqlite:dev | ||
config: {} | ||
bindings: | ||
- source: key/value | ||
resource: { table: key_value } | ||
fields: | ||
recommended: true | ||
|
||
storageMappings: | ||
"": { stores: [{ provider: S3, bucket: a-bucket }] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters