diff --git a/docs/api-reference/loaders-storage-targets/schemas-in-warehouse/index.md b/docs/api-reference/loaders-storage-targets/schemas-in-warehouse/index.md index fc2926325..65bc8191e 100644 --- a/docs/api-reference/loaders-storage-targets/schemas-in-warehouse/index.md +++ b/docs/api-reference/loaders-storage-targets/schemas-in-warehouse/index.md @@ -939,7 +939,7 @@ The row order in this table is important. Type lookup stops after the first matc } ``` -If the `"properties"` key is missing, the type for the entire object will be `STRING` instead of `RECORD`. +If the `"properties"` key is missing, the type for the entire object will be `JSON` instead of `RECORD`. Objects can be nullable. Nested fields can also be nullable (same rules as for everything else). @@ -961,9 +961,7 @@ Objects can be nullable. Nested fields can also be nullable (same rules as for e } ``` -If the `"items"` key is missing, the type for the entire array will be `STRING` instead of `REPEATED`. - -Arrays can be nullable. Nested fields can also be nullable (same rules as for everything else). +The type of the repeated value is determined by the `"items"` key of the schema. If the `"items"` key is missing, then the repeated type is `JSON`. @@ -1120,18 +1118,36 @@ OR ```json { - "enum": [A1, A2, ...] + "enum": [S1, S2, ...] } ``` -- Any of `Ax`, `Ax` has a type other than integer or number. +- All `Sx` are strings `STRING` -_Values will be quoted as in JSON._ + + + + + +```json +{ + "enum": [A1, A2, ...] +} +``` + +- `Ax` are a mix of different types + + + + +`JSON` + +_String values will be quoted as in JSON._ @@ -1141,9 +1157,7 @@ If nothing matches above, this is a catch-all. -`STRING` - -_Values will be quoted as in JSON._ +`JSON` @@ -1172,6 +1186,52 @@ The row order in this table is important. Type lookup stops after the first matc +```json +{ + "type": "object", + "properties": {...} +} +``` + +The `STRUCT` has nested fields, whose types are determined by the `"properties"` key of the schema. + +If the `"properties"` key is missing, the type for the entire object will be `STRING` instead of `STRUCT`, and data will be JSON-serialized in the string column. + +Objects can be nullable. Nested fields can also be nullable (same rules as for everything else). + + + + +`STRUCT` + + + + + + + +```json +{ + "type": "array", + "items": {...} +} +``` + +The type of values within the `ARRAY` is determined by the `"items"` key of the schema. If the `"items"` key is missing, then the values within the array will have type `STRING`, and array items will be JSON-serialized. + +Arrays can be nullable. Nested fields can also be nullable (same rules as for everything else). + + + + +`REPEATED` + + + + + + + ```json { "type": "string", @@ -1679,7 +1739,7 @@ _`P` is rounded up to either `9`, `18` or `38`._ `STRING` -_Values will be quoted as in JSON._ +_String values will be quoted as in JSON._