1 Answer
- Newest
- Most votes
- Most comments
0
Hey tj! The MAP type need to have each property also mapped to the right type (see this link). If the map has a well defined format, you can map each property at the PutItem.
If the format is unknown, my recommendation is to try the ExecuteStatement with a PartiQL statement as it accepts JSON like maps. Only note that you'll need to do some transformation to convert the double-quotes (") to single-quotes (').
I did the test here:
INSERT INTO "Teste" VALUE {
'id': 'Second',
'info': {
'name': 'John',
'age': '30',
'cars': [
'Ford',
'BMW',
'Fiat'
]
}
}
and at the table I have:
{
"id": {"S": "Second"},
"info": {
"M": {
"age": {"S": "30"},
"cars": {
"L": [
{"S": "Ford"},
{"S": "BMW"},
{"S": "Fiat"}
]
},
"name": {"S": "John"}
}
}
}
answered 2 years ago
Relevant content
- asked 2 years ago
- Accepted Answerasked 3 years ago
- How to write item, with Null attribute, to Dynamodb through BatchWriteItem task in AWS Step functionAccepted Answerasked 2 years ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 16 days ago
thank you for the reply, can you please post your step function json? I can't figure out how to insert the PartiQL query into ExecuteStatement