{"record":{"id":"07831296bcfcc984","repo":"risingwavelabs/risingwave","slug":"unsupported-format-encode","errorCode":null,"errorMessage":"Unsupported format {:?} encode {:?}","messagePattern":"Unsupported format (.+?) encode (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/connector/src/parser/config.rs","lineNumber":311,"sourceCode":"                timestamptz_handling: format_encode_options_with_secret\n                    .get(TimestamptzHandling::OPTION_KEY)\n                    .map(|value| TimestamptzHandling::from_options(value))\n                    .transpose()?,\n                time_handling: None,\n                bigint_unsigned_handling: None,\n                handle_toast_columns: false,\n            }),\n            (SourceFormat::DebeziumMongo, SourceEncode::Json) => {\n                let props = MongoProperties::from(&format_encode_options_with_secret);\n                EncodingProperties::MongoJson(props)\n            }\n            (SourceFormat::Plain, SourceEncode::Bytes) => {\n                EncodingProperties::Bytes(BytesProperties { column_name: None })\n            }\n            (SourceFormat::Native, SourceEncode::Native) => EncodingProperties::Native,\n            (SourceFormat::None, SourceEncode::None) => EncodingProperties::None,\n            (format, encode) => {\n                bail!(\"Unsupported format {:?} encode {:?}\", format, encode);\n            }\n        };\n        Ok(Self {\n            encoding_config,\n            protocol_config,\n        })\n    }\n}\n\n#[derive(Debug, Default, Clone)]\npub struct AvroProperties {\n    pub schema_location: SchemaLocation,\n    pub record_name: Option<String>,\n    pub key_record_name: Option<String>,\n    pub map_handling: Option<MapHandling>,\n}\n\n/// WIP: may cover protobuf and json schema later.","sourceCodeStart":293,"sourceCodeEnd":329,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/parser/config.rs#L293-L329","documentation":"ParserConfig::new matches (SourceFormat, SourceEncode) pairs against a fixed list of supported combinations; anything not explicitly enumerated falls into the catch-all bail. This is a guard against unsupported format/encode combos reaching parser construction.","triggerScenarios":"Passing combinations like (Plain, Avro-with-unsupported...), (DebeziumMongoJson, Avro), (Upsert, Native), or any pairing absent from the match arms in config.rs.","commonSituations":"Typo or wrong FORMAT/ENCODE keywords in CREATE SOURCE; combining a format with an encode only valid elsewhere; attempting experimental combos not yet supported by RisingWave.","solutions":["Choose a supported combination, e.g. Plain/Upsert + Avro/Protobuf/Json/Bytes, DebeziumJson + Json, Native + Native, None + None","Check RisingWave docs for the supported FORMAT ... ENCODE ... matrix before creating the source","If the combination should be supported, it needs a new match arm with corresponding EncodingProperties in the source code"],"exampleFix":"-- before\nFORMAT DEBEZIUM ENCODE AVRO\n-- after\nFORMAT DEBEZIUM ENCODE JSON","handlingStrategy":"validation","validationCode":"const supported = new Set([\"plain:json\",\"plain:avro\",\"plain:protobuf\",\"plain:bytes\",\"upsert:json\",\"upsert:avro\",\"upsert:protobuf\",\"debezium:json\",\"debezium:avro\",\"native:native\",\"none:none\"]);\nif (!supported.has(`${format}:${encode}`.toLowerCase())) throw new Error(`unsupported combination ${format}:${encode}`);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check the RisingWave CREATE SOURCE docs matrix before composing FORMAT/ENCODE","Validate format:encode pairs in config linting tooling","Keep source templates aligned with supported combinations"],"tags":["config","source-definition","unsupported-combination"],"backgroundTag":"invalid-enum-value","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}