2

Suppose I have the following database schema for each item:


{
 config: [
   {
    value1: "value_1"
    value2: "value_2"
   }
 ]
}

For each item in the database, there is a field config with each of the item in its list being an object. Are there any AWS DynamoDB query methods or filter expressions to filter an item by matching the value1 field in the config list? Thank you everyone for your help!

1 Answer 1

2

aws dynamodb scan help is your friend, try this:

aws dynamodb scan \
    --table-name=your-table-name \
    --projection-expression="#config.value1,whateverelse" \
    --expression-attribute-names='{"#config":"config"}' \
    --expression-attribute-values='{":v1":{"N": "1"}}' \
    --filter-expression="#config.value1 > :v1"

If any part of path is reserved keyword then it needs to be included in --expression-attribute-names like in example above.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.