v.23.7Improvement
Add input_format_csv_use_default_on_bad_values setting for default value on CSV parsing errors
Add new setting input_format_csv_use_default_on_bad_values to CSV format that allows to insert default value when parsing of a single field failed. #51716 (KevinyhZou).Why it matters
This feature allows users to handle CSV import errors more gracefully by substituting default values instead of failing the entire row or query when a field contains invalid data. It improves data ingestion robustness and minimizes import interruptions due to bad field values.How to use it
To enable this feature, set theinput_format_csv_use_default_on_bad_values setting to true when importing CSV data. This can be done by specifying the setting in the query or in the client configuration. When enabled, ClickHouse will insert default values for fields that cannot be parsed instead of raising an error.