DynamoDB nested query support

后端 未结 4 1854
逝去的感伤
逝去的感伤 2020-12-15 18:52

Do Amazon DynamoDB scan operation allow you to query on nested attributes of type Array or Object? For example,

{
    Id: 206,
             


        
4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-15 19:35

    Yes, you can use a Filter Expression, which is just like Condition Expression. The section that talks about the functions that you can use in these types of expressions mentions the following:

    "For a nested attribute, you must provide its full path; for more information, see Document Paths."

    The Document Paths reference has examples on how to reference nested attributes in DynamoDB data types like List (what you are calling an array) and Map (what you are calling an object). Check out that reference for examples on how to do so:

    • MyList[0]
    • AnotherList[12]
    • ThisList[5][11]
    • MyMap.nestedField
    • MyMap.nestedField.deeplyNestedField

提交回复
热议问题