v.23.1New Feature
Insert Default Values for Missing JSON Elements in Named Tuple Parsing
Insert default values in case of missing elements in JSON object while parsing named tuple. Add setting input_format_json_defaults_for_missing_elements_in_named_tuple that controls this behaviour. Closes #45142#issuecomment-1380153217. #45231 (Kruglov Pavel).Why it matters
This feature solves the problem of JSON input data missing certain elements in named tuples during parsing. It prevents errors and simplifies data ingestion by automatically filling missing tuple elements with their default values, improving robustness and user experience.How to use it
Enable this feature by setting the settinginput_format_json_defaults_for_missing_elements_in_named_tuple to 1 or true. When enabled, missing named tuple elements in JSON input will default to their predefined values instead of causing parsing errors.