Ich übe nur Beispielcode in AWS DynamoDB mit Aber Code-Update funktioniert nicht mit Fehlerpython3 DynamoDB Update_item funktioniert nicht
botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the UpdateItem operation: The document path provided in the update expression is invalid for update
Mein Python-Code ist hier. Ich könnte DB ohne 'Karte' Attribut aktualisieren.
table = dynamodb.Table('Movies')
title = "The Big New Movie"
year = 2015
response = table.update_item(
Key={
"year": year,
"title": title
},
UpdateExpression="set #attrName.rating = :r, #attrName.plot=:p",
ExpressionAttributeNames = {
"#attrName" : "info"
},
ExpressionAttributeValues={
':r': decimal.Decimal(5.5),
':p': "Everything happens all at once."
},
ReturnValues="UPDATED_NEW"
)
dank ! I löste! –