DynamoDB add String Set of 0,1,0, get error Input collection [0, 1, 0] contains duplicates

0

I am attempting to create a matrix using a 3-string set. In each set, the value for {0} will relate to each of the 3 string set, same for a value of {1} and {2}. When entering test data into the console where I am creating the attributes, I receive an error on the 2nd of the string sets when I initialize the values to [0, 1, 0] . Why is this entry not valid and why is the error of: contain duplicates?

To be clear:

  • SS1 can contain values of: [ "2","3","22"]. - Containing Account ID's
  • SS2 can contain values of: ["0","1","0"] - Containing status of an item related to an account
  • SS3 can contain values of: ["1","1","0"] - Containing status of an item related to an account SS2 & SS3 are effectively a boolean, 1 or a 0.

Is this not allowed?

Thanks in advance.

profile picture
Petrus
질문됨 2달 전110회 조회
1개 답변
0

You are using a Set which has the following properties, importantly items in a set must be unique:

DynamoDB supports types that represent sets of number, string, or binary values. All the elements within a set must be of the same type. For example, a Number Set can only contain numbers and a String Set can only contain strings.

There is no limit on the number of values in a set, as long as the item containing the values fits within the DynamoDB item size limit (400 KB).

Each value within a set must be unique. The order of the values within a set is not preserved. Therefore, your applications must not rely on any particular order of elements within the set. DynamoDB does not support empty sets, however, empty string and binary values are allowed within a set.

profile pictureAWS
전문가
답변함 2달 전
  • Thank you for the clarity

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠