how to create table with fields having list/map types? #1923
Unanswered
davidxiaobj
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
maybe a stupid question, but i don't know to use it, thanks very much, it'd be great if can have an example
so, i'd like to create a table with below schema:
dynamodb.CreateTableInput{
AttributeDefinitions: []types.AttributeDefinition{
{
AttributeName: aws.String("accountId"),
AttributeType: types.ScalarAttributeTypeS,
},
{
AttributeName: aws.String("types"),
AttributeType: []string,/// question
},
{
AttributeName: aws.String("items"),
AttributeType: map[string]string,/// question
},
},
KeySchema: []types.KeySchemaElement{
{
AttributeName: aws.String("accountId"),
KeyType: types.KeyTypeHash,
},
},
TableName: aws.String(tableName),
BillingMode: types.BillingModeProvisioned,
}
Beta Was this translation helpful? Give feedback.
All reactions