risingwavelabs/risingwave · error · ConnectorError

Unknown source connector

Error message

Unknown source connector: {connector_name}

What it means

This error is raised by check_source_allow_alter_on_fly_fields when the given connector name cannot be mapped to a known source property type name via source_properties::source_name_to_prop_type_name. It means RisingWave has no registered schema entry for the requested source connector, so it cannot validate which fields may be altered on the fly.

Solutions

  1. Check the connector name spelling against the registered source names (see source_properties and the WITH options documentation).
  2. Use a supported connector name exactly as listed (e.g. 'kafka', 'kinesis', 'nats', 'pulsar', 'datagen').
  3. If adding a new connector, register its properties and allow_alter_on_fly fields so source_name_to_prop_type_name resolves it.
  4. Verify both frontend and connector crates are built from the same version to avoid registry drift.

Example fix

// before
check_source_allow_alter_on_fly_fields("kafk", &fields)?;
// after
check_source_allow_alter_on_fly_fields("kafka", &fields)?;
Defensive patterns

Strategy: validation

Validate before calling

fn is_known_source_connector(name: &str) -> bool {
    risingwave_connector::source::source_properties::source_name_to_prop_type_name(name).is_some()
}

Try / catch

match check_source_allow_alter_on_fly_fields(connector, &fields) {
    Ok(()) => {},
    Err(e) => eprintln!("connector '{}' not supported for on-the-fly alteration: {}", connector, e),
}

Prevention

When it happens

Trigger: Calling check_source_allow_alter_on_fly_fields (or the generated code path via generate_allow_alter_on_fly_fields_combined) with a connector_name string that is not a registered source connector name (typo, wrong case, or a connector only existing in a newer/older version).

Common situations: Typo in CREATE SOURCE `connector`/`with` connector name (e.g. 'kafk' instead of 'kafka'); custom/internal connector names not registered in the property registry; version mismatch where the connector was renamed or removed.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


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

Appendix: source

Thrown at src/connector/src/with_options_test.rs:796

/// 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)