risingwavelabs/risingwave · error
Invalid table name format '{}'. Expected 'schema.table' or '
Error message
Invalid table name format '{}'. Expected 'schema.table' or 'database.schema.table'. What it means
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'.
Source
Thrown at src/frontend/src/handler/create_table.rs:1086
let schema_name = parts[0];
let table_name = parts[1];
(schema_name, table_name)
}
1 => {
// Format: table only
// Reject with clear error message
return Err(anyhow!(
"Invalid table name format '{}'. For SQL Server CDC, you must specify the schema name. \
Use 'schema.table' format (e.g., 'dbo.{}') or 'database.schema.table' format (e.g., '{}.dbo.{}').",
external_table_name,
external_table_name,
source_database_name,
external_table_name
).into());
}
_ => {
// Invalid format (4+ parts or empty)
return Err(anyhow!(
"Invalid table name format '{}'. Expected 'schema.table' or 'database.schema.table'.",
external_table_name
).into());
}
};
// Insert schema and table names into connector properties
with_options.insert(SCHEMA_NAME_KEY.into(), schema_name.into());
with_options.insert(TABLE_NAME_KEY.into(), table_name.into());
// Normalize external_table_name to 'schema.table' format
// This ensures consistency with extract_table_name() in message.rs
let normalized_external_table_name = format!("{}.{}", schema_name, table_name);
return Ok((with_options, normalized_external_table_name));
}
_ => {
return Err(RwError::from(anyhow!(
"connector {} is not supported for cdc table",View on GitHub (pinned to 6469eb736d)
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.
Example fix
// before WITH (connector = 'sqlserver-cdc', table_name = 'srv.mydb.dbo.events') // after WITH (connector = 'sqlserver-cdc', database_name = 'mydb', table_name = 'dbo.events')
Defensive patterns
Strategy: validation
Validate before calling
const parts = name.split('.');
if (parts.length !== 2 && parts.length !== 3) throw new Error(`Use 'schema.table' or 'database.schema.table', got: ${name}`); Type guard
const isSqlServerCdcName = (n) => typeof n === 'string' && /^[^.]+(\.[^.]+){1,2}$/.test(n); Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.
Related errors
- Invalid table name format '{}'. For SQL Server CDC, you must
- Invalid Postgres CDC table name '{}'. Expected 'schema.table
- conversion of SQL Server money to {data_type} is not support
- missing `hostname` in CDC properties
- missing `port` in CDC properties
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/805945dcb561b192.
Report an issue: GitHub.