I have added a new column to a dynamo db table that already exists in aws. I now want a one-time script to fill in data for all current records in the newly formed column. I experimented with the PartiQL editor's cursor, as seen below, in aws.
DECLARE cursor CURSOR FOR SELECT CRMCustomerGuid FROM "Customer";
OPEN cursor;
WHILE NEXT cursor DO
UPDATE "Customer"
SET "TimeToLive" = 1671860761
WHERE "CustomerGuid" = cursor.CRMCustomerGuid;
END WHILE
CLOSE cursor;
However, I am seeing the following error message: ValidationException Statement was poorly constructed and cannot be processed: unexpected word
We appreciate any assistance.