0
0
DynamoDBquery~10 mins

Composite sort key pattern 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 a composite sort key by concatenating 'CATEGORY' and 'DATE'.

DynamoDB
SortKey = CATEGORY [1] DATE
Drag options to blanks, or click blank then click option'
A||
B#
C+
D-
Attempts:
3 left
💡 Hint
Common Mistakes
Using '#' directly as an operator instead of a string.
Using '||' which is not a string concatenation operator in this context.
2fill in blank
medium

Complete the code to create a composite sort key string with a '#' separator between 'CATEGORY' and 'DATE'.

DynamoDB
SortKey = CATEGORY + [1] + DATE
Drag options to blanks, or click blank then click option'
A\#
B"#"
C#
D'#'
Attempts:
3 left
💡 Hint
Common Mistakes
Using # without quotes causes syntax errors.
Using escape characters unnecessarily.
3fill in blank
hard

Fix the error in the composite sort key assignment by choosing the correct operator to concatenate strings.

DynamoDB
SortKey = CATEGORY [1] DATE
Drag options to blanks, or click blank then click option'
A+
B&&
C*
D-
Attempts:
3 left
💡 Hint
Common Mistakes
Using logical operators like '&&' instead of concatenation.
Using arithmetic operators that don't work with strings.
4fill in blank
hard

Fill both blanks to create a composite sort key with a '#' separator between 'CATEGORY' and 'DATE'.

DynamoDB
SortKey = [1] + [2] + DATE
Drag options to blanks, or click blank then click option'
ACATEGORY
BDATE
C'#'
DSortKey
Attempts:
3 left
💡 Hint
Common Mistakes
Putting DATE in the first blank instead of CATEGORY.
Using the variable name 'SortKey' inside the expression.
5fill in blank
hard

Fill all three blanks to build a composite sort key string combining 'CATEGORY', '#', and 'DATE' correctly.

DynamoDB
SortKey = [1] + [2] + [3]
Drag options to blanks, or click blank then click option'
ACATEGORY
B'#'
CDATE
DSortKey
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'SortKey' as a part of the concatenation.
Forgetting to put '#' in quotes.