risingwavelabs/risingwave · error · SinkError::Config

sink format unsupported: {}

Error message

sink format unsupported: {}

What it means

When converting a protobuf Sink plan descriptor into the catalog SinkFormat, formats like Unspecified, Native, DebeziumMongo, Maxwell, Canal, and None are not supported as sink formats. The try_from conversion rejects them with this config error.

Source

Thrown at src/connector/src/sink/catalog/mod.rs:237

}

impl TryFrom<PbSinkFormatDesc> for SinkFormatDesc {
    type Error = SinkError;

    fn try_from(value: PbSinkFormatDesc) -> Result<Self, Self::Error> {
        use risingwave_pb::plan_common::{EncodeType as E, FormatType as F};

        let format = match value.format() {
            F::Plain => SinkFormat::AppendOnly,
            F::Upsert => SinkFormat::Upsert,
            F::Debezium => SinkFormat::Debezium,
            f @ (F::Unspecified
            | F::Native
            | F::DebeziumMongo
            | F::Maxwell
            | F::Canal
            | F::None) => {
                return Err(SinkError::Config(anyhow!(
                    "sink format unsupported: {}",
                    f.as_str_name()
                )));
            }
        };
        let encode = match value.encode() {
            E::Json => SinkEncode::Json,
            E::Protobuf => SinkEncode::Protobuf,
            E::Template => SinkEncode::Template,
            E::Avro => SinkEncode::Avro,
            E::Parquet => SinkEncode::Parquet,
            E::Bytes => SinkEncode::Bytes,
            e @ (E::Unspecified | E::Native | E::Csv | E::None | E::Text) => {
                return Err(SinkError::Config(anyhow!(
                    "sink encode unsupported: {}",
                    e.as_str_name()
                )));
            }

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Explicitly set a supported sink format (e.g. format='append_only' or 'upsert', 'debezium').
  2. Remove format values like 'native' or 'none' that are only valid for sources.
  3. Inspect the generated sink plan to confirm the format field is populated.

Example fix

// before
WITH (connector='kafka', format='canal', encode='json', ...)
// after
WITH (connector='kafka', format='upsert', encode='json', ...)
Defensive patterns

Strategy: validation

Validate before calling

const SINK_FORMATS = ['append_only', 'upsert', 'debezium'];
if (!SINK_FORMATS.includes(props.format)) throw new Error(`Unsupported sink format: ${props.format}`);

Prevention

When it happens

Trigger: Submitting a CREATE SINK whose resolved format encodes to one of the unsupported enum variants (format left unspecified, or set to native/maxwell/canal/debezium-mongo/none).

Common situations: Omitting the format option so it defaults to Unspecified; copying CDC-source-only formats (maxwell, canal) into sink definitions.

Related errors


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