-
Notifications
You must be signed in to change notification settings - Fork 61
Home
Anish Karandikar edited this page Apr 30, 2018
·
2 revisions
aws dynamodb query --table-name realworld-dev-articles --index-name updatedAt \
--key-condition-expression "dummy = :dummy" \
--filter-expression 'contains(tagList, :tag)' \
--expression-attribute-values \
'{ ":dummy": { "S": "OK" }, ":tag": { "S": "tag_mod_2_0" } }' \
--projection-expression "tagList" --no-scan-index-forward --max-items 2
{
"Count": 10,
"Items": [
{
"tagList": {
"SS": [
"tag_18",
"tag_mod_2_0",
"tag_mod_3_0",
"wi37xb"
]
}
},
{
"tagList": {
"SS": [
"nnqziw",
"tag_16",
"tag_mod_2_0",
"tag_mod_3_1"
]
}
}
],
"NextToken": "eyJFeGNsdXNpdmVTdabcdEtleSI6IG51bGwsICJib3RvX3RydW5jYXRlX2Ftb3VudCI6IDJ9",
"ScannedCount": 22,
"ConsumedCapacity": null
}
Repeat the same query as above, but add --starting-token
aws dynamodb query --table-name realworld-dev-articles --index-name updatedAt \
--key-condition-expression "dummy = :dummy" \
--filter-expression 'contains(tagList, :tag)' \
--expression-attribute-values \
'{ ":dummy": { "S": "OK" }, ":tag": { "S": "tag_mod_2_0" } }' \
--projection-expression "tagList" --no-scan-index-forward --max-items 2 \
--starting-token \
eyJFeGNsdXNpdmVTdabcdEtleSI6IG51bGwsICJib3RvX3RydW5jYXRlX2Ftb3VudCI6IDJ9
{
"Count": 0,
"Items": [
{
"tagList": {
"SS": [
"61azpe",
"tag_14",
"tag_mod_2_0",
"tag_mod_3_2"
]
}
},
{
"tagList": {
"SS": [
"5w3s6m",
"tag_12",
"tag_mod_2_0",
"tag_mod_3_0"
]
}
}
],
"NextToken": "eyJFeGNsdXNpdmVTdGFydEtleSI6xyztbGwsICJib3RvX3RydW5jYXRlX2Ftb3VudCI6IDR9",
"ScannedCount": 0,
"ConsumedCapacity": null
}