English 中文(简体)
Dynamo GSI没有计划作为指数一部分的非关键特性
原标题:Dynamo GSI does not project non-key attributes that are part of the index

我有以下关于DynamoDb表的全球二级指数,该表在使用表时显示:

 "GlobalSecondaryIndexes": [
        {
            "IndexSizeBytes": 14339252, 
            "IndexName": "Id-AddedOn-index", 
            "Projection": {
                "ProjectionType": "INCLUDE", 
                "NonKeyAttributes": [
                    "AgentId, TicketId, TotalSecondsSinceOpen"
                ]
            }, 

然而,当我使用这一指数执行“财富”时,我提出了以下例外:

 (One or more parameter values were invalid: Global secondary index Id-AddedOn-index does not project [TicketId, AgentId, TotalSecondsSinceOpen])

很显然,描述表显示它们,但有一个问题未能收回。 我做了什么错误?

而且,当我问一下AWS表格中使用该指数标出的项目时,这些田地也不存在。

问题回答

"NonKeyAttributes" must be given a list of strings. Change your definition to the following and your GSI will project those attributes properly.

"GlobalSecondaryIndexes": [
    {
        "IndexSizeBytes": 14339252, 
        "IndexName": "Id-AddedOn-index", 
        "Projection": {
            "ProjectionType": "INCLUDE", 
            "NonKeyAttributes": [
                "AgentId", "TicketId", "TotalSecondsSinceOpen"
            ]
        }, 

使用“投影器”: 全球二级指数中的“所有”





相关问题
CSV file to AWS Dynamo DB Design

我对美国妇女论坛来说是新鲜事,即将通过美国妇女论坛主办一个网站。 我的卷宗中有一些数据(约200万个)。 我每个月都得到新的数据。 新的骑士团对......进行了更新。

Explain Merkle Trees for use in Eventual Consistency

Merkle Trees are used as an anti-entropy mechanism in several distributed, replicated key/value stores: Dynamo Riak Cassandra No doubt an anti-entropy mechanism is A Good Thing - transient failures ...

热门标签