In Documented oriented NoSql databases , one stores docs (e.g JSONs). Then one can run a sql like query using a field from inside JSON in the where clause of the query. This happens in document oriented nosql dbs like cosmos db and mongodb. DynamoDb despite being a document oriented store does not support such queries. In that case what is the use of storing the JSON docs?
I've never worked with DynamoDB, but a quick Google search shows that there is a SQL-like query language called PartiQL
Amazon wrote:PartiQL provides SQL-compatible query access across multiple data stores containing structured data, semistructured data, and nested data. It is widely used within Amazon and is now available as part of many AWS services, including DynamoDB.
I read that we can query using the partition key and sort key (optional). The documents which we store (e.g the JSON) can have any structure but should have a partition key and can optionally have a sort key. It looks like we need to model our data such that one can fetch that using the partition key and sort key.