risingwavelabs/risingwave · error · ConnectorError

Unknown source connector: {connector_name}

Error message

Unknown source connector: {connector_name}

What it means

check_source_allow_alter_on_fly_fields could not map the given connector_name to a registered source type name, so there is no allow_alter_on_fly allowlist for it. This indicates the connector name is misspelled or unsupported for on-the-fly field alteration.

Source

Thrown at src/connector/src/allow_alter_on_fly_fields.rs:468

/// Get all sink connector names that have `allow_alter_on_fly` fields
pub fn get_sink_connectors_with_allow_alter_on_fly_fields() -> Vec<&'static str> {
    SINK_ALLOW_ALTER_ON_FLY_FIELDS.keys().map(|s| s.as_str()).collect()
}

/// Get all connection names that have `allow_alter_on_fly` fields
pub fn get_connection_names_with_allow_alter_on_fly_fields() -> Vec<&'static str> {
    CONNECTION_ALLOW_ALTER_ON_FLY_FIELDS.keys().map(|s| s.as_str()).collect()
}

/// Checks if all given fields are allowed to be altered on the fly for the specified source connector.
/// Returns Ok(()) if all fields are allowed, otherwise returns a `ConnectorError`.
pub fn check_source_allow_alter_on_fly_fields(
    connector_name: &str,
    fields: &[String],
) -> crate::error::ConnectorResult<()> {
    // Convert connector name to the type name key
    let Some(type_name) = source_properties::source_name_to_prop_type_name(connector_name) else {
        return Err(ConnectorError::from(anyhow::anyhow!(
            "Unknown source connector: {connector_name}"
        )));
    };
    let Some(allowed_fields) = SOURCE_ALLOW_ALTER_ON_FLY_FIELDS.get(type_name) else {
    return Err(ConnectorError::from(anyhow::anyhow!(
        "No allow_alter_on_fly fields registered for connector: {connector_name}"
    )));
    };
    for field in fields {
        if !allowed_fields.contains(field) {
            return Err(ConnectorError::from(anyhow::anyhow!(
                "Field '{field}' is not allowed to be altered on the fly for connector: {connector_name}"
            )));
        }
    }
    Ok(())
}

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Check the connector option value in the source's WITH clause and correct the spelling
  2. List supported connectors for your RW version and use an exact match
  3. If using a custom connector build, ensure it registers its allow-alter-on-fly fields

Example fix

// before
CREATE SOURCE s WITH (connector = 'kafak', ...);
// after
CREATE SOURCE s WITH (connector = 'kafka', ...);
Defensive patterns

Strategy: validation

Validate before calling

const KNOWN: &[&str] = &["kafka","kinesis","nexmark","datagen","pulsar","debezium","snowflake" /*...*/];
fn ensure_known(connector: &str) -> Result<(), String> {
    if KNOWN.contains(&connector) { Ok(()) } else { Err(format!("unknown connector: {connector}")) }
}

Try / catch

match check_source_allow_alter_on_fly_fields(name, fields) {
    Err(e) if e.to_string().starts_with("Unknown source connector") => {
        // surface a friendly "check connector spelling" message
    }
    other => other?,
}

Prevention

When it happens

Trigger: Calling ALTER SOURCE ... to alter fields on the fly where the source's connector option value is not a recognized connector (typo, custom/external connector not compiled in, or removed connector).

Common situations: Typo in WITH connector='kafk' instead of 'kafka'; using an enterprise/unregistered connector; renaming connector keys after a version upgrade.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


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