risingwavelabs/risingwave · error

Unsupported cdc connector type

Error message

Unsupported cdc connector type: {}

What it means

`ExternalTableImpl::connect` dispatches on the config's connector type and only implements external tables for MySQL and SQL Server CDC. The catch-all arm converts any other CdcSourceType into this anyhow error, so requesting an external table for an unimplemented connector fails at connect time.

Solutions

  1. Use connector='mysql-cdc' or 'sqlserver-cdc' for external CDC tables.
  2. For other databases, create a regular CDC source/table instead of an external table.
  3. For developers: implement the missing match arm (e.g. Postgres) in ExternalTableImpl::connect.

Example fix

// before
connector = 'citus-cdc'  // Err: Unsupported cdc connector type: Citus
// after
connector = 'sqlserver-cdc', hostname = '...', port = '1433', ...
Defensive patterns

Strategy: validation

Validate before calling

match config.connector.as_str() {
    "mysql-cdc" | "sqlserver-cdc" => Ok(()),
    other => Err(anyhow!("external CDC tables unsupported for connector {}", other)),
}?

Try / catch

match ExternalTableImpl::connect(config).await {
    Err(e) if e.to_string().starts_with("Unsupported cdc connector type") => {
        bail!("use mysql-cdc or sqlserver-cdc for external tables: {e}");
    }
    other => other,
}

Prevention

When it happens

Trigger: connect(config) is called with config.connector set to a CdcSourceType other than MySql or SqlServer (e.g. Postgres/Citus CDC) when building an ExternalTableImpl.

Common situations: Creating a CDC external table with a connector variant that RisingWave has not implemented external-table support for, or a new CdcSourceType added upstream without a matching connect arm.

Related errors


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

Appendix: source

Thrown at src/connector/src/source/cdc/external/mod.rs:528

                MySqlExternalTable::connect(config).await?,
            )),
            CdcSourceType::Postgres => {
                let pg_conn = config.pg_connection_config()?;
                Ok(ExternalTableImpl::Postgres(
                    PostgresExternalTable::connect(
                        &pg_conn,
                        &config.schema,
                        &config.table,
                        false,
                        Some("SELECT"),
                    )
                    .await?,
                ))
            }
            CdcSourceType::SqlServer => Ok(ExternalTableImpl::SqlServer(
                SqlServerExternalTable::connect(config).await?,
            )),
            _ => Err(anyhow!("Unsupported cdc connector type: {}", config.connector).into()),
        }
    }

    pub fn column_descs(&self) -> &Vec<ColumnDesc> {
        match self {
            ExternalTableImpl::MySql(mysql) => mysql.column_descs(),
            ExternalTableImpl::Postgres(postgres) => postgres.column_descs(),
            ExternalTableImpl::SqlServer(sql_server) => sql_server.column_descs(),
        }
    }

    pub fn pk_names(&self) -> &Vec<String> {
        match self {
            ExternalTableImpl::MySql(mysql) => mysql.pk_names(),
            ExternalTableImpl::Postgres(postgres) => postgres.pk_names(),
            ExternalTableImpl::SqlServer(sql_server) => sql_server.pk_names(),
        }
    }

View on GitHub (pinned to 6469eb736d)