{"record":{"id":"a4f68adc288b318b","repo":"risingwavelabs/risingwave","slug":"unknown-fields-in-the-with-clause-a4f68a","errorCode":null,"errorMessage":"Unknown fields in the WITH clause: {:?}","messagePattern":"Unknown fields in the WITH clause: (.+?)","errorType":"validation","errorClass":"ConnectorError","httpStatus":null,"severity":"error","filePath":"src/connector/src/source/base.rs","lineNumber":144,"sourceCode":"}\n\npub trait UnknownFields {\n    /// Unrecognized fields in the `WITH` clause.\n    fn unknown_fields(&self) -> HashMap<String, String>;\n}\n\nimpl<P: DeserializeOwned + UnknownFields> TryFromBTreeMap for P {\n    fn try_from_btreemap(\n        props: BTreeMap<String, String>,\n        deny_unknown_fields: bool,\n    ) -> Result<Self> {\n        let json_value = serde_json::to_value(props)?;\n        let res = serde_json::from_value::<P>(json_value)?;\n\n        if !deny_unknown_fields || res.unknown_fields().is_empty() {\n            Ok(res)\n        } else {\n            bail!(\n                \"Unknown fields in the WITH clause: {:?}\",\n                res.unknown_fields()\n            )\n        }\n    }\n}\n\n#[derive(Default)]\npub struct CreateSplitReaderOpt {\n    pub support_multiple_splits: bool,\n    pub seek_to_latest: bool,\n}\n\n#[derive(Default)]\npub struct CreateSplitReaderResult {\n    pub latest_splits: Option<Vec<SplitImpl>>,\n    pub backfill_info: HashMap<SplitId, BackfillInfo>,\n}","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/source/base.rs#L126-L162","documentation":"try_from_btreemap converts a WITH-clause property map into the strongly-typed options struct P via serde. When deny_unknown_fields is set and the parsed struct reports keys that do not correspond to any declared option, the sink/source creation is aborted listing all unrecognized keys. This protects users from silently ignored typos in WITH options.","triggerScenarios":"Executing CREATE SOURCE/CREATE SINK with WITH options that are not defined on the connector's properties struct — typos like connector='kafka', kafka.borker='x' — for connectors that deny unknown fields.","commonSituations":"Typos in option names; copying options from one connector to another that doesn't support them; using outdated option names after a RisingWave version renamed options.","solutions":["Read the listed unknown fields and fix the option names in the WITH clause.","Consult the connector's documented options (`SHOW SOURCE connection` docs or risingwave docs) for valid keys.","Remove options that belong to a different connector type.","If an option should exist but doesn't, check for renames in the release notes of your RisingWave version."],"exampleFix":"// before\nWITH (connector='kafka', kafka.borker='localhost:9092')\n// after\nWITH (connector='kafka', kafka.broker='localhost:9092')","handlingStrategy":"validation","validationCode":"// validate WITH keys against the connector's documented options before running DDL\nconst KAFKA_OPTS: &[&str] = &[\"kafka.broker\", \"kafka.topic\", \"topic\", \"seed\", ...];\nfn unknown_opts(w: &BTreeMap<String, String>, known: &[&str]) -> Vec<&String> {\n    w.keys().filter(|k| !known.contains(&k.as_str())).collect()\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy WITH options from the official connector docs, never from other connectors.","Fix the exact keys named in the error message.","Check release notes for option renames when upgrading RisingWave."],"tags":["with-clause","config","validation","connector"],"backgroundTag":"invalid-config-value","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}