0
0
DynamoDBquery~10 mins

Many-to-many with GSI overloading 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 the partition key for the main table.

DynamoDB
PartitionKey: [1]
Drag options to blanks, or click blank then click option'
A"SK"
B"PK"
C"GSI1PK"
D"GSI1SK"
Attempts:
3 left
💡 Hint
Common Mistakes
Using the sort key attribute instead of the partition key.
Confusing GSI keys with main table keys.
2fill in blank
medium

Complete the code to set the sort key for the GSI to overload multiple entity types.

DynamoDB
GSI1SortKey: [1]
Drag options to blanks, or click blank then click option'
A"SK"
B"PK"
C"GSI1SK"
D"EntityType"
Attempts:
3 left
💡 Hint
Common Mistakes
Using the main table's sort key instead of the GSI sort key.
Using the partition key as the sort key.
3fill in blank
hard

Fix the error in the query to fetch all related items by GSI partition key.

DynamoDB
KeyConditionExpression: "GSI1PK = [1]"
Drag options to blanks, or click blank then click option'
A"pkValue"
BpkValue
C:GSI1PK
D:pkValue
Attempts:
3 left
💡 Hint
Common Mistakes
Using the variable name without colon.
Using the attribute name instead of the value placeholder.
4fill in blank
hard

Fill both blanks to complete the expression that filters items by entity type and status.

DynamoDB
FilterExpression: "EntityType = [1] AND Status = [2]"
Drag options to blanks, or click blank then click option'
A:entityType
B:status
C"Active"
D"User"
Attempts:
3 left
💡 Hint
Common Mistakes
Using raw strings instead of placeholders.
Mixing up entity type and status values.
5fill in blank
hard

Fill all three blanks to build a dictionary for expression attribute values in a DynamoDB query.

DynamoDB
ExpressionAttributeValues: [1]: "User", [2]: "Active", [3]: "12345"
Drag options to blanks, or click blank then click option'
A":entityType"
B":status"
C":userId"
D":id"
Attempts:
3 left
💡 Hint
Common Mistakes
Using keys without colon prefix.
Using incorrect placeholder names.