Tomasz Swider
Tomasz Swider

Reputation: 2372

Can I query DynamoDB for documents with empty objects

Is it possible to query Dynamodb for all documents in given partition key in witch certain sub document is empty? That is, it is an empty object. I have documents that look something like following:

{
    bag : 'some_id',
    secondary: 'up',
    books : {
        one : {
            title : 'Some Title'
        }
    }
},
{
    bag : 'some_id',
    secondary: 'down',
    books : {}
}

In MongoDB it would be query for '{ books : {}}'. It is a simple question but I can not find the answer in the docks and as far as I can tell, that query is not possible through AWS console.

Upvotes: 0

Views: 365

Answers (1)

notionquest
notionquest

Reputation: 39186

Yes, Dynamodb AWS SDK doesn't support this query. When you use ":books":{"M":{}}, you would get "Query key condition not supported" error message.

Upvotes: 1

Related Questions