risingwavelabs/risingwave · error · SinkError

The value type is not supported

Error message

The value type {} is not supported

What it means

The Redis sink formatter in RisingWave only supports a fixed set of Redis value types (e.g. string, list, hash, sorted-set). When the sink's `redis_value_type` property parses to something outside that set, the builder returns this SinkError::Config so the sink fails fast instead of writing data in an undefined format.

Solutions

  1. Check the `value.type` property for typos and use one of the supported values (e.g. 'string', 'list', 'hash', 'sorted_set')
  2. Consult the Redis sink docs in this repository version for the exact accepted value type strings
  3. If the type should be supported, add a match arm implementing it in src/connector/src/sink/formatter/mod.rs

Example fix

// before
CREATE SINK s FROM mv INTO redis WITH (connector='redis', value.type='hashe');
// after
CREATE SINK s FROM mv INTO redis WITH (connector='redis', value.type='hash');
Defensive patterns

Strategy: validation

Validate before calling

const VALID: &[&str] = &["string", "list", "hash", "sorted_set"];
fn validate_value_type(t: &str) -> Result<(), String> {
    if VALID.contains(&t) { Ok(()) } else { Err(format!("unsupported redis value.type: {t}; must be one of {VALID:?}")) }
}

Type guard

fn is_supported_value_type(t: &str) -> bool {
    matches!(t, "string" | "list" | "hash" | "sorted_set")
}

Prevention

When it happens

Trigger: Creating a Redis sink with a `value.type` (redis_value_type) property spelled as a type the formatter does not match, e.g. a typo like `hashe`, `str`, or an entirely unimplemented type in the match arms of the redis formatter builder.

Common situations: Typo in the sink `value.type` option when running `CREATE SINK ... WITH (connector='redis', value.type='...')`; using a value type added to docs but not yet implemented in the connector code.

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/7cf30fc355cb7cd4. Report an issue: GitHub.

Appendix: source

Thrown at src/connector/src/sink/formatter/mod.rs:425

                    let value_template =
                        b.format_desc.options.get(VALUE_FORMAT).ok_or_else(|| {
                            SinkError::Config(anyhow!(
                                "Cannot find '{VALUE_FORMAT}',please set it."
                            ))
                        })?;
                    let key_template = b.format_desc.options.get(KEY_FORMAT).ok_or_else(|| {
                        SinkError::Config(anyhow!("Cannot find '{KEY_FORMAT}',please set it."))
                    })?;

                    Ok(TemplateEncoder::new_stream_value(
                        b.schema,
                        pk_indices,
                        key_template.clone(),
                        value_template.clone(),
                    ))
                }
            },
            _ => Err(SinkError::Config(anyhow!(
                "The value type {} is not supported",
                redis_value_type
            ))),
        }
    }
}

struct FormatterParams<'a> {
    builder: EncoderParams<'a>,
    pk_indices: Vec<usize>,
}

/// Each formatter shall be able to be built from parameters.
///
/// This is not part of `SinkFormatter` trait, because that is about how a formatter completes its
/// own job as a self-contained unit, with a custom `new` asking for only necessary info; while this
/// one is about how different formatters can be selected from a common SQL interface.
trait FormatterBuild: Sized {

View on GitHub (pinned to 6469eb736d)