You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/manage/pages/iceberg/specify-iceberg-schema.adoc
+15-8Lines changed: 15 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -275,7 +275,7 @@ Requirements:
275
275
276
276
- Only JSON Schema Draft-07 is currently supported.
277
277
- You must declare the JSON Schema dialect using the `$schema` keyword, for example `"$schema": "http://json-schema.org/draft-07/schema#"`.
278
-
- You must use a JSON Schema that constrains JSON documents to a strict type in order for Redpanda to translate to Iceberg; that is, each subschema must use the `type` keyword.
278
+
- You must use a JSON Schema that constrains JSON documents to a strict type so Redpanda can translate to Iceberg. In most cases this means each subschema uses the `type` keyword, but a subschema can also use `$ref` if the referenced schema resolves to a strict type.
279
279
280
280
.Valid JSON Schema example
281
281
[,json]
@@ -310,7 +310,7 @@ Requirements:
310
310
311
311
| null
312
312
|
313
-
| The `null` type is not supported except when it is paired with another type to indicate nullability.
313
+
| The `null` type is only supported as a nullability marker, either in a `type` array (for example, `["string", "null"]`) or in an exclusive `oneOf` nullable pattern.
314
314
315
315
| number
316
316
| double
@@ -325,8 +325,8 @@ Requirements:
325
325
| The `format` keyword can be used for custom Iceberg types. See <<format-translation,`format` annotation translation>> for details.
326
326
327
327
| object
328
-
| struct
329
-
| The `properties` keyword must be used to define `struct` fields and constrain their types. The `additionalProperties` keyword is accepted only when it is set to `false`.
328
+
| struct or map
329
+
| Use `properties` to define `struct` fields and constrain their types. `additionalProperties: false` is supported for closed objects. A schema-valued `additionalProperties` object is translated to an Iceberg `map<string, T>`. You cannot combine `properties` and schema-valued `additionalProperties` in the same object.
330
330
331
331
|===
332
332
@@ -341,13 +341,20 @@ Requirements:
341
341
342
342
|===
343
343
344
+
Keyword behavior:
345
+
346
+
* The `$ref` keyword is supported for internal references resolved from schema resources declared in the same document (using `$id`), including relative and absolute URI forms. References to external resources and references to unknown keywords are not supported. A root-level `$ref` schema is not supported.
347
+
* The `oneOf` keyword is supported only for the nullable serializer pattern where exactly one branch is `{"type":"null"}` and the other branch is a non-null schema (`T|null`).
348
+
* In Iceberg output, Redpanda writes all fields as nullable regardless of serializer nullability annotations.
349
+
344
350
The following are not supported for JSON Schema:
345
351
346
-
* Relative and absolute (including external) references using `$ref` and `$dynamicRef` keywords
0 commit comments