Dynamodb - Query by object property nested in an array

I'm having trouble understanding. dynamoDb supports filtering by properties of objects nested in an array. Example:

We believe that we have the following table called "Street", where one element (row) in this table has the following structure:

{ name: "Street name", population: 20, houses: 5, people: [ { first_name: "FName1", last_name: "LName1", ... other person properties }, { first_name: "FName2", last_name: "LName2", ... other person properties }, { first_name: "FName3", last_name: "LName3", ... other person properties } ... etc ] } 

In this scenario, we can consider that the β€œname” is the dynamodb = prefix, which means we can query based on the street name.

I am wondering if dynamodb supports the following logic: "The request is based on a street with a specific name and filters it for a person with the following specific name."

The result will be similar to (the goal is to return only one person / object from the array that matches the filter)

 { name: "Street nameX", population: 20, houses: 5, people: [ { first_name: "FNameX", last_name: "LNameX", ... other person properties } ] } 

The main question is whether the results of the dynamoDb filter, after a query, can be based on the properties of objects embedded in an array.

Please note that I understand that I can achieve this using a different table schema, but this example is used for simplicity, and it is as it is - focusing on the question of whether dynamoDB supports something like this or not ? "

+5
source share
1 answer

It seems like this is still not supported (at least in 2014).

Filtering / querying the contents of a list in DynamoDB

+2
source

Source: https://habr.com/ru/post/1269334/


All Articles