0
0
DynamoDBquery~10 mins

Expression attribute names in DynamoDB - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define an expression attribute name for the reserved word "Name".

DynamoDB
expression_attribute_names = {"[1]": "Name"}
Drag options to blanks, or click blank then click option'
A"Name"
B"$Name"
C"#N"
D"Name#"
Attempts:
3 left
💡 Hint
Common Mistakes
Using the actual attribute name without a placeholder.
Using a placeholder without the # symbol.
2fill in blank
medium

Complete the code to use the expression attribute name placeholder in the UpdateExpression.

DynamoDB
update_expression = "SET [1] = :val"
Drag options to blanks, or click blank then click option'
A"#N"
B"$Name"
C":Name"
D"Name"
Attempts:
3 left
💡 Hint
Common Mistakes
Using the actual attribute name instead of the placeholder.
Using a colon (:) instead of a hash (#) for the placeholder.
3fill in blank
hard

Fix the error in the expression attribute names dictionary key for the reserved word "Status".

DynamoDB
expression_attribute_names = {"[1]": "Status"}
Drag options to blanks, or click blank then click option'
A"#S"
B"#Status"
C"Status"
D"$Status"
Attempts:
3 left
💡 Hint
Common Mistakes
Using the attribute name without #.
Using a placeholder starting with $ instead of #.
4fill in blank
hard

Fill both blanks to define expression attribute names and use them in a FilterExpression.

DynamoDB
expression_attribute_names = {"[1]": "Date", "[2]": "Status"}
filter_expression = "[1] = :date_val AND [2] = :status_val"
Drag options to blanks, or click blank then click option'
A"#D"
B"Date"
C"#S"
D"Status"
Attempts:
3 left
💡 Hint
Common Mistakes
Using actual attribute names in the filter expression instead of placeholders.
Using placeholders without #.
5fill in blank
hard

Fill all three blanks to define expression attribute names, use them in a ProjectionExpression, and in a ConditionExpression.

DynamoDB
expression_attribute_names = {"[1]": "User", "[2]": "Role", "[3]": "Access"}
projection_expression = "[1], [2]"
condition_expression = "attribute_exists([3])"
Drag options to blanks, or click blank then click option'
A"#U"
B"#R"
C"#A"
D"User"
Attempts:
3 left
💡 Hint
Common Mistakes
Using actual attribute names in expressions instead of placeholders.
Using inconsistent placeholders between dictionary and expressions.