I have data stored as [ { "S": "" } ] in DynamoDB. I want to check whether the record contain empty value or not so I tried
FilterExpression : `contains (columnName, :data)`
ExpressionAttributeValues:{
":data": ""
}
But i am getting no result from query. What is wrong with this?
I've created 2 items in the DDB table. 1 with empty value, 1 with non-empty value as follows:
Then I ran this query:
{
"TableName": "xxx",
"FilterExpression": "#DDB_data5vizmh5osmv = :data5vizmh5osmv",
"ExpressionAttributeNames": {
"#DDB_data5vizmh5osmv": "data"
},
"ExpressionAttributeValues": {
":data5vizmh5osmv": ""
}
}
And here are the results I got. I filtered 1 item with empty value.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.