calculate an exponent from another column

Viewed 18

Does anyone know if DynamoDB supports calculating exponents in an UpdateExpression?

I know I can add or subtract from a column, but that seems to be the mathematical limit on updates that I can find.

I am trying to take and existing column value, take 2 to the power of that column value, and then update a second column.

Thanks

1 Answers

Unfortunately, you can only add/subtract. From the docs for Update Expressions:

Incrementing and Decrementing Numeric Attributes You can add to or subtract from an existing numeric attribute. To do this, > use the + (plus) and - (minus) operators.

You'll need to perform the exponent function in your application code after reading the item.

Related