0
0
DynamoDBquery~5 mins

Filter expressions in DynamoDB - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a filter expression in DynamoDB?
A filter expression is a condition that DynamoDB applies after retrieving items to decide which items to return to you. It filters out items that don't match the condition.
Click to reveal answer
intermediate
When is a filter expression applied during a DynamoDB query or scan?
Filter expressions are applied after DynamoDB reads the items. They do not reduce the read capacity units consumed but only reduce the data returned to you.
Click to reveal answer
beginner
Which operators can you use in a DynamoDB filter expression?
You can use comparison operators like =, <, >, <=, >=, <> and logical operators like AND, OR, NOT in filter expressions.
Click to reveal answer
beginner
True or False: Filter expressions reduce the number of read capacity units consumed by DynamoDB.
False. Filter expressions do not reduce read capacity units because filtering happens after reading the data.
Click to reveal answer
beginner
How do you write a filter expression to find items where the attribute 'status' equals 'active'?
You write: "#status = :val" and provide a value map with ":val" set to "active" and an expression attribute names map with "#status" set to "status".
Click to reveal answer
When does DynamoDB apply a filter expression?
ADuring table creation
BBefore reading items from the table
CAfter reading items, before returning results
DWhen updating items
Which of these is a valid operator in a DynamoDB filter expression?
A=
B++
C&&&
D===
Does using a filter expression reduce the read capacity units consumed?
AYes, always
BNo, never
COnly for queries, not scans
DOnly if the filter expression is simple
Which DynamoDB operation can use filter expressions?
ABoth Query and Scan
BQuery
CScan
DPutItem
What is the purpose of a filter expression?
ATo filter items before reading them
BTo update items conditionally
CTo create indexes
DTo filter items after reading them
Explain what a filter expression is and when it is applied in DynamoDB operations.
Think about when DynamoDB reads data and when it decides what to return.
You got /4 concepts.
    Describe how to write a simple filter expression to return items where an attribute equals a specific value.
    Remember the syntax uses placeholders for values.
    You got /4 concepts.