v.23.2Improvement

Add Ignore Unknown Keys in JSON for Named Tuples

Add ability to ignore unknown keys in JSON object for named tuples (input_format_json_ignore_unknown_keys_in_named_tuple). #45678 (Azat Khuzhin).
Added the ability to ignore unknown keys in JSON objects when parsing named tuples using the setting input_format_json_ignore_unknown_keys_in_named_tuple.

Why it matters

This feature allows users to parse JSON input with named tuples more flexibly by ignoring any extra keys that are not defined in the tuple structure. It helps prevent errors caused by unexpected JSON keys and improves compatibility with JSON inputs that may include additional irrelevant fields.

How to use it

Enable the feature by setting input_format_json_ignore_unknown_keys_in_named_tuple = 1 in your session or query settings before parsing JSON data containing named tuples. This instructs ClickHouse to silently ignore any unknown keys in such JSON objects.