{"record":{"id":"cc737d8e4fa0f7e0","repo":"risingwavelabs/risingwave","slug":"unsupported-source-type-only-kafka-sources-are-su","errorCode":null,"errorMessage":"unsupported source type, only kafka sources are supported","messagePattern":"unsupported source type, only kafka sources are supported","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/ctl/src/cmd_impl/meta/connection.rs","lineNumber":69,"sourceCode":"}\n\npub async fn validate_source(context: &CtlContext, props: String) -> anyhow::Result<()> {\n    let with_props: HashMap<String, String> =\n        serde_json::from_str::<HashMap<String, Value>>(props.as_str())\n            .expect(\"error parsing with props json\")\n            .into_iter()\n            .map(|(key, val)| match val {\n                Value::String(s) => (key, s),\n                _ => (key, val.to_string()),\n            })\n            .collect();\n    let source_type = match with_props\n        .get(\"connector\")\n        .expect(\"missing 'connector' in with clause\")\n        .as_str()\n    {\n        \"kafka\" => Ok(SourceType::Kafka),\n        _ => Err(anyhow!(\n            \"unsupported source type, only kafka sources are supported\"\n        )),\n    }?;\n    let meta_client = context.meta_client().await?;\n    let resp = meta_client\n        .rw_cloud_validate_source(source_type, with_props)\n        .await?;\n    if !resp.ok {\n        eprintln!(\"{}\", serde_json::to_string(&resp).unwrap());\n        std::process::exit(1);\n    }\n    Ok(())\n}\n","sourceCodeStart":51,"sourceCodeEnd":83,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/ctl/src/cmd_impl/meta/connection.rs#L51-L83","documentation":"Guard in risectl validate_source: after reading the `connector` property, only `kafka` is accepted; any other connector value makes the standalone source-validation command fail, since risectl's validation path is implemented exclusively for Kafka sources.","triggerScenarios":"WITH clause sets connector to a non-kafka value (e.g. 'kinesis', 'pulsar', 'nexmark', or a typo like 'Kafka') and the source is validated via this risectl path.","commonSituations":"Trying to validate a newer connector type through an older risectl build; typos or case mismatches in the connector name.","solutions":["Use connector = 'kafka' in the WITH clause, or create the source through the SQL frontend instead of this risectl path","Fix the connector value spelling/casing to exactly 'kafka'","Upgrade risectl/risingwave if you need other connector types"],"exampleFix":"// before\nWITH (connector = 'kinesis', stream = 's')\n// after\nWITH (connector = 'kafka', topic = 't')","handlingStrategy":"validation","validationCode":"match with_props.get(\"connector\").map(|v| v.as_str()) {\n    Some(\"kafka\") => {},\n    other => return Err(anyhow!(\"connector {:?} unsupported here\", other)),\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Confirm connector support for the risectl version in use","Keep connector values lowercase and exact"],"tags":["rust","risingwave","unsupported-value","cli"],"backgroundTag":"unsupported-enum-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"}