我試圖做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文檔很難得到,謝謝反正 –