risingwavelabs/risingwave · error · SinkError::Config
sink type unsupported: {}
Error message
sink type unsupported: {} What it means
Legacy sink creation maps the user-provided `type` option (append-only, upsert, debezium) to a SinkFormat. Any other value is rejected with this config error, since the legacy connector option only supports the three known sink types.
Source
Thrown at src/connector/src/sink/catalog/mod.rs:149
impl Display for SinkEncode {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self)
}
}
impl SinkFormatDesc {
pub fn from_legacy_type(connector: &str, r#type: &str) -> Result<Option<Self>, SinkError> {
use crate::sink::Sink as _;
use crate::sink::kafka::KafkaSink;
use crate::sink::kinesis::KinesisSink;
use crate::sink::pulsar::PulsarSink;
let format = match r#type {
SINK_TYPE_APPEND_ONLY => SinkFormat::AppendOnly,
SINK_TYPE_UPSERT => SinkFormat::Upsert,
SINK_TYPE_DEBEZIUM => SinkFormat::Debezium,
_ => {
return Err(SinkError::Config(anyhow!(
"sink type unsupported: {}",
r#type
)));
}
};
let encode = match connector {
KafkaSink::SINK_NAME | KinesisSink::SINK_NAME | PulsarSink::SINK_NAME => {
SinkEncode::Json
}
_ => return Ok(None),
};
Ok(Some(Self {
format,
encode,
options: Default::default(),
secret_refs: Default::default(),
key_encode: None,
connection_id: None,View on GitHub (pinned to 6469eb736d)
Solutions
- Set type to one of: 'append-only', 'upsert', or 'debezium'.
- Drop the legacy `type` option and use the explicit `format`/`encode` options instead.
- Check the sink connector's documentation for valid type values.
Example fix
// before WITH (connector='kafka', type='append_only', ...) // after WITH (connector='kafka', type='append-only', ...) // or format='append_only' encode='json'
Defensive patterns
Strategy: validation
Validate before calling
const LEGACY_SINK_TYPES = ['append-only', 'upsert', 'debezium'];
if (!LEGACY_SINK_TYPES.includes(props.type)) throw new Error(`Invalid sink type: ${props.type}. Must be one of ${LEGACY_SINK_TYPES.join(', ')}`); Prevention
- Use only the documented literal values for the legacy `type` option.
- Prefer the modern format/encode options over the legacy `type` field.
- Trim/normalize user-provided type values (hyphen vs underscore) before submitting DDL.
When it happens
Trigger: CREATE SINK ... WITH (type='<something else>') where the value is not one of the SINK_TYPE_APPEND_ONLY / SINK_TYPE_UPSERT / SINK_TYPE_DEBEZIUM constants.
Common situations: Typo in the type option (e.g. 'append_only', 'upsert ', 'insert'), copying configs from other systems, or using newer format names in the legacy `type` field.
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
- sink format unsupported: {}
- sink encode unsupported: {}
- unsupported {} as sink key encode
- serde_json deserialization error of ClickHouseConfig from pr
- `{}` must be {}, or {}
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/d74aa6be5773b7bc.
Report an issue: GitHub.