我试图做dynamodb 表扫描多个条件下面是这是在JavaScript如何有FilterExpression在dynamodb
var params = {
TableName: 'Contacts',
FilterExpression: 'begins_with(CustomerName,:value)OR begins_with(CustomerName,:val) ',
ExpressionAttributeValues: {
':value': {'S':'S'},
':val':{'S':'E'},
},
Select: 'ALL_ATTRIBUTES',
};
dynamodb.scan(params, function(err, data) {
if (err) ppJson(err); // an error occurred
else ppJson(data); // successful response
});
但我不能尝试使用botot3相同的代码。
下面是我能做到到目前为止
response = table.scan(
Select= 'ALL_ATTRIBUTES',
FilterExpression=Attr('CustomerName').begins_with("S")
)
我无法理解如何添加OR条件。如果我添加,它显示错误
这是什么来源?,谢谢 –
@Joe我不明白你在问什么 – JithPS
boto3文档很难得到,谢谢反正 –