I need to update a row in Dynomodb while doing so need to include a new column which is already not there.
resp = table.update_item(
Key={
'Pkey': 'key1',
'Skey': 'skwy2'
},
UpdateExpression='ADD dateModified = :input2, SET IsActive = :input1',
ExpressionAttributeValues={
':input1': False,
':input2' : datetime.datetime.now(timezone.utc)
},
ReturnValues="UPDATED_NEW"
)
now I need to update IsActive field to false and insert new dateModified value to that .
getting error as Invalid UpdateExpression: Syntax error; token: "=", near: "dateModified = :input2"