{"record":{"id":"f7a645fb552fd1aa","repo":"risingwavelabs/risingwave","slug":"map-is-not-supported-yet","errorCode":null,"errorMessage":"map is not supported yet","messagePattern":"map is not supported yet","errorType":"validation","errorClass":"SinkError::DynamoDb","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/dynamodb.rs","lineNumber":389,"sourceCode":"                .iter()\n                .map(|x| map_data(x, lt.elem()))\n                .collect::<Result<Vec<_>>>()?;\n            AttributeValue::L(list_attr)\n        }\n        DataType::Struct(st) => {\n            let mut map = HashMap::with_capacity(st.len());\n            for (sub_datum_ref, (name, data_type)) in scalar_ref\n                .into_struct()\n                .iter_fields_ref()\n                .zip_eq_debug(st.iter())\n            {\n                let attr = map_data(sub_datum_ref, data_type)?;\n                map.insert(name.to_owned(), attr);\n            }\n            AttributeValue::M(map)\n        }\n        DataType::Map(_m) => {\n            return Err(SinkError::DynamoDb(anyhow!(\"map is not supported yet\")));\n        }\n        DataType::Vector(_) => {\n            return Err(SinkError::DynamoDb(anyhow!(\"vector is not supported yet\")));\n        }\n    };\n    Ok(attr)\n}\n\nfn rw_pk_names(schema: &Schema, pk_indices: &[usize]) -> Result<Vec<String>> {\n    pk_indices\n        .iter()\n        .map(|pk_idx| {\n            schema\n                .fields()\n                .get(*pk_idx)\n                .map(|field| field.name.clone())\n                .ok_or_else(|| {\n                    SinkError::DynamoDb(anyhow!(","sourceCodeStart":371,"sourceCodeEnd":407,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/dynamodb.rs#L371-L407","documentation":"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.","triggerScenarios":"Any row containing a MAP-typed column flows into a table that is sunk to DynamoDB (via format_row -> map_data).","commonSituations":"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.","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."],"exampleFix":"// before\nCREATE MATERIALIZED VIEW mv AS SELECT attrs::MAP<VARCHAR,VARCHAR> AS attrs FROM src;\n// after: use struct or jsonb\nCREATE MATERIALIZED VIEW mv AS SELECT attrs::JSONB AS attrs FROM src;","handlingStrategy":"validation","validationCode":"-- ensure no MAP columns before sinking to DynamoDB\nSELECT count(*) FROM rw_catalog.rw_columns WHERE relation_id = <mv_id> AND data_type LIKE 'MAP%';","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["dynamodb","sink","unsupported-type","data-type","map"],"backgroundTag":"unsupported-operation","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}