Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DynamoDB ProjectionExpression exclude attribute (all fields except one)

I have a requirement where my dynamodb table has many attributes, and i need all of them in the projection expression except one or two columns which i dont need in response. (I am scanning the table). Is there a way how can i define this in ProjectionExpression (all except this one column). I have seen examples where ProjectionExpression only takes what all "is required" and not the other way.

like image 893
Jyotsana Nandwani Avatar asked Oct 19 '25 05:10

Jyotsana Nandwani


1 Answers

As per the documentation, this is not possible:

ProjectionExpression - A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas. If no attribute names are specified, then all attributes will be returned.

Here is a link to help you better undestand what goes underneath the ProjectionExpression: https://medium.com/pageup-tech/dynamodb-and-projection-expressions-why-c08c40243195

like image 118
Sanchay Avatar answered Oct 21 '25 20:10

Sanchay



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!