1개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
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"}
}
}
}
답변함 2년 전
관련 콘텐츠
- AWS 공식업데이트됨 일 년 전
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