小编Per*_*rks的帖子

Dynamodb:使用 AttributeType Map、List、JSON 和 CreateTable 创建一个表

如何在 DyanamoDB 中创建带有 AttributeType Set、Map 或 JSON 的表。我不想通过插入 (PutItem) 或更新数据来创建表结构,因为我需要创建一个索引,该索引将包含投影中的 Map、List 或 JSON 属性。我需要做一个创建时间(CreateTable)。我也更喜欢使用 AWS CLI。下面是一个示例:

{
TableName : "Music",
KeySchema: [       
    { 
        AttributeName: "Artist", 
        KeyType: "HASH", //Partition key
    }
],
AttributeDefinitions: [
    { 
        AttributeName: "Artist", 
        AttributeType: "S" 
    },
    { 
        AttributeName: "instruments" 
        AttributeType: // Map or List or JSON type 
    }

],
Run Code Online (Sandbox Code Playgroud)

... }

amazon-dynamodb

7
推荐指数
1
解决办法
4528
查看次数

标签 统计

amazon-dynamodb ×1