{"record":{"id":"d50cda3bee2e4fad","repo":"risingwavelabs/risingwave","slug":"missing-field-table-name","errorCode":null,"errorMessage":"missing field 'table.name'","messagePattern":"missing field 'table\\.name'","errorType":"exception","errorClass":"ConnectorError","httpStatus":null,"severity":"error","filePath":"src/connector/src/source/cdc/source/reader.rs","lineNumber":94,"sourceCode":"        let split_id = split.id();\n\n        let mut properties = conn_props.properties.clone();\n\n        let mut citus_server_addr = None;\n        // For citus, we need to rewrite the `table.name` to capture sharding tables\n        if matches!(T::source_type(), CdcSourceType::Citus)\n            && let Some(ref citus_split) = split.citus_split\n            && let Some(ref server_addr) = citus_split.server_addr\n        {\n            citus_server_addr = Some(server_addr.clone());\n            let host_addr =\n                HostAddr::from_str(server_addr).context(\"invalid server address for cdc split\")?;\n            properties.insert(\"hostname\".to_owned(), host_addr.host);\n            properties.insert(\"port\".to_owned(), host_addr.port.to_string());\n            // rewrite table name with suffix to capture all shards in the split\n            let mut table_name = properties\n                .remove(\"table.name\")\n                .ok_or_else(|| anyhow!(\"missing field 'table.name'\"))?;\n            table_name.push_str(\"_[0-9]+\");\n            properties.insert(\"table.name\".into(), table_name);\n        }\n\n        let source_id = split.split_id() as u64;\n        let source_type = conn_props.get_source_type_pb();\n        let (tx, mut rx) = mpsc::channel(DEFAULT_CHANNEL_SIZE);\n\n        let jvm = Jvm::get_or_init()?;\n        let get_event_stream_request = GetEventStreamRequest {\n            source_id,\n            source_type: source_type as _,\n            start_offset: split.start_offset().clone().unwrap_or_default(),\n            properties,\n            snapshot_done: split.snapshot_done(),\n            is_source_job: conn_props.is_cdc_source_job,\n        };\n","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/source/cdc/source/reader.rs#L76-L112","documentation":"When building a MySQL CDC reader whose split spans multiple shards, the code rewrites the `table.name` connector property into a shard-matching regex (`name_[0-9]+`). It errors if the property `table.name` is absent from the connector properties, since the rewrite cannot proceed.","triggerScenarios":"Creating a sharded-table CDC source (e.g. MySQL with `table.name` like `db.t_[0-9]+` triggering the shard path) where the connector properties map lacks `table.name` — e.g. using different property keys, or properties stripped by a proxy/config template.","commonSituations":"Typo (`tableName` vs `table.name`), missing quoted key in the WITH clause, or the shard-detection heuristics firing (table name contains `_1`, `_2` …) on a non-sharded table whose properties were defined without table.name.","solutions":["Add `table.name` to the source's WITH connector options, e.g. `WITH (connector='mysql-cdc', 'table.name'='mydb.mytable', ...)`, and recreate the source.","Fix the key spelling/casing so it is exactly `table.name`.","If the table is not actually sharded, rename it or adjust naming so the shard regex path is not triggered."],"exampleFix":"// before\nCREATE SOURCE s WITH (connector='mysql-cdc', 'database.name'='db'); -- missing table.name\n// after\nCREATE SOURCE s WITH (connector='mysql-cdc', 'database.name'='db', 'table.name'='db.t_[0-9]+');","handlingStrategy":"validation","validationCode":"// Before creating a sharded CDC source, verify options contain table.name:\nconst opts = connProps;\nif (!('table.name' in opts)) throw new Error(\"CDC source requires 'table.name' connector option\");","typeGuard":"fn has_table_name(props: &HashMap<String, String>) -> bool {\n    props.contains_key(\"table.name\")\n}","tryCatchPattern":"match properties.get(\"table.name\") {\n    Some(t) => t.clone(),\n    None => return Err(anyhow!(\"missing field 'table.name' in CDC connector properties\")),\n}","preventionTips":["Always specify 'table.name' (exact spelling, dotted key) in the WITH clause for CDC sources.","Quote keys in SQL to avoid parser normalization.","Verify resolved connector properties in the source catalog after creation."],"tags":["cdc","mysql","config","missing-field"],"backgroundTag":"missing-required-config-field","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"}