Help with scan filter-expression to access data in a nested MAP.

0

Hi, I need to scan a DynamoDB table via AWS CLI and filter where a certain MAP (or field data within this MAP) do not exist.
This particular MAP named "on_demand" lives inside a MAP [0] which in turn live inside a List named "playlist".

The expected results would be items that do not have this "on_demand" MAP present.

Here is my data structure.
{
"Items": [
{
"playlist": {
"L": [
{
"M": {
"duration": {
"N": "46"
},
"on_demand": {
"M": {
"bucket": {
"S": "s3 Bucket"
},
"key": {
"S": "bucket url to video file"
}
}
},
"download": {
"M": {
"bucket": {
"S": "s3 bucket"
},
"key": {
"S": "bucket url to video file"
}
}
},
"status": {
"S": "on_demand"
}
}
}
]
},
"video_type": {
"S": "OFFSITE"
},
"id": {
"S": "random hash id"
},
"is_offsite": {
"BOOL": true
},
}
]
}

質問済み 3年前2035ビュー
1回答
0

This was accomplished by using the following filter-expression

attribute_not_exists(playlist[0].on_demand)

回答済み 3年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ