-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
When schema-ddl cannot find a BigQuery type for a field, it falls back to a string type. This basically means we stringify whatever value we get (number, object, array, whatever). Currently the "nullability" of the string field is set by whether the field is listed as a required field. However, there are examples of schemas where a field is listed as required but it can also be null.
Example 1:
{
"type": "object",
"required": ["xyz"],
"properties: {
"xyz": {
"oneOf: [
{"type": "string"},
{"type": "number"},
{"type": "null"}
]
}
}
}
Example 2:
{
"type": "object",
"required": ["xyz"],
"properties": {
"xyz": {
"type": ["object", "null"]
}
}
}
Example 3:
{
"type": "object",
"required": ["xyz"],
"properties": {
"xyz": {
"type": ["array", "null"]
}
}
}
Schema DDL should suggest a nullable string for these examples. Otherwise, Snowplow events with these weird types can fail to get loaded.
Metadata
Metadata
Assignees
Labels
No labels