我是 NoSQL 数据库的新手,遇到了一个问题。我只想从 DynamoDB 中包含特定值的表中获取键。我知道对于关键等于我可以使用:
response = table.query(
KeyConditionExpression=Key('year').eq(1992)
)
Run Code Online (Sandbox Code Playgroud)
但我不能使用:
response = table.query(
KeyConditionExpression=Key('year').contain('1992')
)
Run Code Online (Sandbox Code Playgroud)
错误是:
键对象没有包含属性。