amazon-dynamodb - Dynamodb updateItem 正在复制记录
问题描述
所以,这是一个非常简单的问题,我不明白为什么要使用下面的 UpdateItemRequest 复制记录:(注意,已经有一辆 Car_id == 826550096186605568 的汽车,但它总是在创建一个新的汽车。我没有设置属性更新在这里,但设置在我身边。任何人都可以帮助我吗?
{
"requestOverrideConfig" : null,
"tableName" : "Cars",
"key" : {
"car_id" : {
"s" : null,
"n" : "826550096186605568",
"b" : null,
"ss" : [ ],
"ns" : [ ],
"bs" : [ ],
"m" : { },
"l" : [ ],
"bool" : null,
"nul" : null
}
},
"attributeUpdates" : { },
"expected" : { },
"conditionalOperator" : null,
"returnValues" : null,
"returnConsumedCapacity" : null,
"returnItemCollectionMetrics" : null,
"updateExpression" : null,
"conditionExpression" : "#07220 = :07220",
"expressionAttributeNames" : {
"#07220" : "car_id"
},
"expressionAttributeValues" : {
":07220" : {
"s" : null,
"n" : "826550096186605568",
"b" : null,
"ss" : [ ],
"ns" : [ ],
"bs" : [ ],
"m" : { },
"l" : [ ],
"bool" : null,
"nul" : null
}
}
}
描述表如下:
{
"Table": {
"AttributeDefinitions": [
{
"AttributeName": "car_id",
"AttributeType": "N"
}
],
"TableName": "Cars",
"KeySchema": [
{
"AttributeName": "car_id",
"KeyType": "HASH"
}
],
"TableStatus": "ACTIVE",
"CreationDateTime": 1616108934.89,
"ProvisionedThroughput": {
"LastIncreaseDateTime": 0.0,
"LastDecreaseDateTime": 0.0,
"NumberOfDecreasesToday": 0,
"ReadCapacityUnits": 1,
"WriteCapacityUnits": 1
},
"TableSizeBytes": 130585,
"ItemCount": 196,
"TableArn": "arn:aws:dynamodb:ddblocal:000000000000:table/Cars"
}
}
解决方案
推荐阅读
- google-apps-script - 来自 API 的 Google 表格数据源(不是 BigQuery)
- flutter - Flutter 应用程序 - 出现连续错误“应用程序可能在其主线程上做了太多工作”
- r - 如何在 R 中的 cut 函数中放置多个中断?
- laravel - 拉拉维尔 | Blade 视图中不止一个 CubePortfolio 库
- android - 我想在通知中添加一个大图标,但是当我运行应用程序时,大图标不显示。下面是我的代码,有什么错误的帮助吗?
- mysql - 不存在时插入空值时更新
- ansible - 如何动态选择要在 Ansible 任务中使用的 json 对象?
- google-cloud-dataprep - 数据准备的样本收集失败
- arrays - 如何从文件夹(swift,audio)制作一组url
- java - 记分牌代码中要使用什么单链表或数组?