{"record":{"id":"805945dcb561b192","repo":"risingwavelabs/risingwave","slug":"invalid-table-name-format-expected-schema-t","errorCode":null,"errorMessage":"Invalid table name format '{}'. Expected 'schema.table' or 'database.schema.table'.","messagePattern":"Invalid table name format '(.+?)'\\. Expected 'schema\\.table' or 'database\\.schema\\.table'\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/frontend/src/handler/create_table.rs","lineNumber":1086,"sourceCode":"                        let schema_name = parts[0];\n                        let table_name = parts[1];\n                        (schema_name, table_name)\n                    }\n                    1 => {\n                        // Format: table only\n                        // Reject with clear error message\n                        return Err(anyhow!(\n                            \"Invalid table name format '{}'. For SQL Server CDC, you must specify the schema name. \\\n                             Use 'schema.table' format (e.g., 'dbo.{}') or 'database.schema.table' format (e.g., '{}.dbo.{}').\",\n                            external_table_name,\n                            external_table_name,\n                            source_database_name,\n                            external_table_name\n                        ).into());\n                    }\n                    _ => {\n                        // Invalid format (4+ parts or empty)\n                        return Err(anyhow!(\n                            \"Invalid table name format '{}'. Expected 'schema.table' or 'database.schema.table'.\",\n                            external_table_name\n                        ).into());\n                    }\n                };\n\n                // Insert schema and table names into connector properties\n                with_options.insert(SCHEMA_NAME_KEY.into(), schema_name.into());\n                with_options.insert(TABLE_NAME_KEY.into(), table_name.into());\n\n                // Normalize external_table_name to 'schema.table' format\n                // This ensures consistency with extract_table_name() in message.rs\n                let normalized_external_table_name = format!(\"{}.{}\", schema_name, table_name);\n                return Ok((with_options, normalized_external_table_name));\n            }\n            _ => {\n                return Err(RwError::from(anyhow!(\n                    \"connector {} is not supported for cdc table\",","sourceCodeStart":1068,"sourceCodeEnd":1104,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/frontend/src/handler/create_table.rs#L1068-L1104","documentation":"Catch-all rejection in the same SQL Server CDC table-name parser: after splitting on '.', any result other than 2 or 3 parts (0, 4+, e.g. 'server.db.dbo.table' or a trailing dot) fails. The parser strictly supports only 'schema.table' and 'database.schema.table'.","triggerScenarios":"table_name = 'a.b.c.d' (4 parts), an empty string, or a name with consecutive dots like 'dbo..customers' passed to a sqlserver-cdc CREATE TABLE.","commonSituations":"Users paste a fully qualified linked-server style name ('srv.db.dbo.table'); accidental double dots from templated DDL; copy-paste with trailing whitespace or a trailing period.","solutions":["Reduce the name to 'schema.table' or 'database.schema.table'.","Remove duplicated separators (e.g. 'dbo..t' -> 'dbo.t') and any trailing dot.","For cross-server access, connect with the correct host/port options instead of encoding the server in the table name.","Wrap a quoted ('\"My Schema\".Table') identifier is not supported here for SQL Server; use unquoted simple names."],"exampleFix":"// before\nWITH (connector = 'sqlserver-cdc', table_name = 'srv.mydb.dbo.events')\n// after\nWITH (connector = 'sqlserver-cdc', database_name = 'mydb', table_name = 'dbo.events')","handlingStrategy":"validation","validationCode":"const parts = name.split('.');\nif (parts.length !== 2 && parts.length !== 3) throw new Error(`Use 'schema.table' or 'database.schema.table', got: ${name}`);","typeGuard":"const isSqlServerCdcName = (n) => typeof n === 'string' && /^[^.]+(\\.[^.]+){1,2}$/.test(n);","tryCatchPattern":null,"preventionTips":["Strip server/link prefixes before generating DDL; encode server info in connection options.","Reject empty segments (double dots) in your DDL builder.","Trim whitespace and trailing dots from config-driven table names."],"tags":["cdc","sql-server","table-name-format","frontend"],"backgroundTag":"invalid-argument-format","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"}