Deleting multiple records in dynamo db

后端 未结 4 916
轮回少年
轮回少年 2021-01-12 22:54

can we delete multiple records in dynamo db only through range key?

I\'m trying to do like this sql statement

delete from employee where emplo

4条回答
  •  时光说笑
    2021-01-12 23:19

    @Kannaiyan thanks for your comments....

    i found the solution with dynamoDB with java http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/JavaDocumentAPICRUDExample.html

    DeleteItemSpec deleteItemSpec = new DeleteItemSpec().withPrimaryKey("Id", 120)
                    .withConditionExpression("#ip = :val").withNameMap(new NameMap().with("#ip", "InPublication"))
                    .**withValueMap(new ValueMap()**.withBoolean(":val", false)).withReturnValues(ReturnValue.ALL_OLD);
    

    fetching the records with key, value pair and storing it in "withValueMap(new ValueMap()" and this helps me.

    Thanks.

提交回复
热议问题