Skip to content

Map attribute to key (pk/sk) #229

Answered by mobsense
shishkin asked this question in Q&A
Dec 23, 2021 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

Some comments:

  • You are using scan. Note: scan does not use the keys and will scan the entire table. You probably want "find" rather than scan.
  • Your example uses gs1pk: { type: String, value: "${state}" }, but your text refers to value: "${updated}". I presume you mean ${updated}?

Your return results will not reverse parse fields that use value templates with multiple components like gs1sk: { type: String, value: "${key1}#${key2}#${key3}" }

You return results are always just the top level fields. Value templates are input only. However you should get all the returned components key1, key2, key3 if they are projected to the index and they are defined in the schema.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@shishkin
Comment options

Comment options

You must be logged in to vote
2 replies
@shishkin
Comment options

@mobsense
Comment options

Answer selected by mobsense
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants