risingwavelabs/risingwave · error · RwError

connector is not supported for cdc table

Error message

connector {} is not supported for cdc table

What it means

`derive_with_options_for_cdc_table` only rewrites options for recognized CDC connectors (e.g. mysql-cdc, postgres-cdc, sqlserver-cdc). Any other `connector` value on a CREATE TABLE that goes down the CDC derivation path is rejected with this RwError naming the offending connector string.

Solutions

  1. Fix the connector string to an exact supported value, e.g. 'mysql-cdc', 'postgres-cdc', 'sqlserver-cdc'.
  2. For non-CDC sources (kafka, etc.) use CREATE SOURCE / CREATE SINK instead of a CDC table.
  3. Check `SHOW CREATE` docs or the connectors page for your RisingWave version; connector names are version-sensitive.
  4. If you intended to use a Debezium-compatible custom connector, it must still be registered as a CDC connector type in the code.

Example fix

// before
WITH (connector = 'mysql_cdc', table_name = 'db.orders')
// after
WITH (connector = 'mysql-cdc', table_name = 'db.orders')
Defensive patterns

Strategy: validation

Validate before calling

const CDC_CONNECTORS = ['mysql-cdc', 'postgres-cdc', 'sqlserver-cdc'];
if (!CDC_CONNECTORS.includes(opts.connector)) throw new Error(`connector ${opts.connector} not supported for cdc table`);

Type guard

const isCdcConnector = (c) => typeof c === 'string' && ['mysql-cdc','postgres-cdc','sqlserver-cdc'].includes(c);

Prevention

When it happens

Trigger: CREATE TABLE ... WITH (connector = 'kafka', ...) or a misspelled connector like 'sqlservercdc' / 'mysql_cdc' reaching this match arm at create_table.rs:1103.

Common situations: Typo in connector name (underscore vs hyphen, missing '-cdc'); using a connector meant for CREATE SINK/CREATE CONNECTION instead of a CDC table; copy-pasted DDL from docs for a different RisingWave version.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/6045b5ba70f36f72. Report an issue: GitHub.

Appendix: source

Thrown at src/frontend/src/handler/create_table.rs:1103

                        // 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",
                    connector
                )));
            }
        };
    }
    unreachable!("All valid CDC connectors should have returned by now")
}

/// Parse the schema/table name from the CDC `TABLE` clause.
///
/// Column names do not need the same parsing here: wildcard schema derivation reads
/// them from PostgreSQL catalogs after the exact table has been identified.
fn parse_postgres_cdc_external_table_name(external_table_name: &str) -> Result<(String, String)> {
    let mut parts = vec![];
    let mut current = String::new();
    let mut chars = external_table_name.chars().peekable();
    let mut in_quote = false;

View on GitHub (pinned to 6469eb736d)