v.23.10New Feature
Allow Saving of Unparsed Records and Errors in RabbitMQ, NATS, and FileLog Engines
Allow to save unparsed records and errors in RabbitMQ, NATS and FileLog engines. Add virtual columns_errorand_raw_message(for NATS and RabbitMQ),_raw_record(for FileLog) that are filled when ClickHouse fails to parse new record. The behaviour is controlled under storage settingsnats_handle_error_modefor NATS,rabbitmq_handle_error_modefor RabbitMQ,handle_error_modefor FileLog similar tokafka_handle_error_mode. If it's set todefault, en exception will be thrown when ClickHouse fails to parse a record, if it's set tostream, erorr and raw record will be saved into virtual columns. Closes #36035. #55477 (Kruglov Pavel).
Why it matters
This feature addresses the problem of losing data or stopping processing when ClickHouse fails to parse incoming messages from RabbitMQ, NATS, or FileLog engines. By enabling error handling modes that store problematic records along with error details, users gain better visibility into data issues and can continue processing streams without interruption.How to use it
Configure the storage settingrabbitmq_handle_error_mode, nats_handle_error_mode, or handle_error_mode (for FileLog) in the corresponding table engine. Set the mode to stream to enable saving errors and raw records into the new virtual columns instead of throwing exceptions. The default mode (default) throws exceptions on parsing errors.