risingwavelabs/risingwave · error · SinkError::DynamoDb
map is not supported yet
Error message
map is not supported yet
What it means
Sentinel error in the DynamoDB sink's map_data conversion: a DataType::Map datum was encountered while translating a row into DynamoDB AttributeValues, and Map is not among the supported data types. The sink cannot yet represent map-typed columns; remove the map column or change its type.
Source
Thrown at src/connector/src/sink/dynamodb.rs:389
.iter()
.map(|x| map_data(x, lt.elem()))
.collect::<Result<Vec<_>>>()?;
AttributeValue::L(list_attr)
}
DataType::Struct(st) => {
let mut map = HashMap::with_capacity(st.len());
for (sub_datum_ref, (name, data_type)) in scalar_ref
.into_struct()
.iter_fields_ref()
.zip_eq_debug(st.iter())
{
let attr = map_data(sub_datum_ref, data_type)?;
map.insert(name.to_owned(), attr);
}
AttributeValue::M(map)
}
DataType::Map(_m) => {
return Err(SinkError::DynamoDb(anyhow!("map is not supported yet")));
}
DataType::Vector(_) => {
return Err(SinkError::DynamoDb(anyhow!("vector is not supported yet")));
}
};
Ok(attr)
}
fn rw_pk_names(schema: &Schema, pk_indices: &[usize]) -> Result<Vec<String>> {
pk_indices
.iter()
.map(|pk_idx| {
schema
.fields()
.get(*pk_idx)
.map(|field| field.name.clone())
.ok_or_else(|| {
SinkError::DynamoDb(anyhow!(View on GitHub (pinned to 6469eb736d)
Solutions
- Restructure the data as a STRUCT type, which the sink handles as a DynamoDB map (AttributeValue::M) via nested map_data.
- Convert the MAP to JSONB (e.g. via cast) so it is serialized as a string attribute.
- Sink flattened key/value columns instead of a single MAP column.
- Track/await MAP support in the DynamoDB sink connector.
Example fix
// before CREATE MATERIALIZED VIEW mv AS SELECT attrs::MAP<VARCHAR,VARCHAR> AS attrs FROM src; // after: use struct or jsonb CREATE MATERIALIZED VIEW mv AS SELECT attrs::JSONB AS attrs FROM src;
Defensive patterns
Strategy: validation
Validate before calling
-- ensure no MAP columns before sinking to DynamoDB SELECT count(*) FROM rw_catalog.rw_columns WHERE relation_id = <mv_id> AND data_type LIKE 'MAP%';
Prevention
- Model nested data as STRUCT (supported) rather than MAP.
- Cast MAP columns to JSONB in the sink's upstream view.
- Review relation schema for unsupported types before creating DynamoDB sinks.
When it happens
Trigger: Any row containing a MAP-typed column flows into a table that is sunk to DynamoDB (via format_row -> map_data).
Common situations: Sources with map/struct-like data mapped to RisingWave MAP columns, then sunk directly to DynamoDB; schema evolution introducing a MAP column to an already-sunk relation.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- variant is not supported yet
- vector is not supported yet
- MAP is not supported for BigQuery sink.
- remote sink supports Int16, Int32, Int64, Float32, Float64,
- {data_type_name} is not supported in SQL Server
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/f7a645fb552fd1aa.
Report an issue: GitHub.