Próba użycia KeyConditionExpression zgodnie z dynamodb api document przy użyciu polecenia ndejs sdk. KeyConditionExpression nie jest obsługiwany przez SDK nodejs.Problemy z zapytaniem dynamodb za pomocą KeyConditionExpression
Oto co zrobiłem
utworzono tabelę z Hash i Range.
Table : TABLE1
Hash Attribute Name : Provider (String)
Range Attribute Key : ScheduledEndTime (Number) // In Milli Seconds
Oto ładowność do uruchomienia kwerendy dynamo DB:
{
TableName: 'TABLE1',
ConsistentRead: true,
Select: "ALL_ATTRIBUTES",
KeyConditionExpression: 'Provider = :v_provider AND ScheduledEndTime > :v_scheduledEndTime',
ExpressionAttributeValues: {
":v_provider": {
S: "amazon"
},
":v_scheduledEndTime": {
N: "10"
}
}
};
Ale powyższe ładowność rzucony poniżej błędów
[Error: MultipleValidationErrors: There were 2 validation errors:
* MissingRequiredParameter: Missing required key 'KeyConditions' in params
* UnexpectedParameter: Unexpected key 'KeyConditionExpression' found in params]
[Error: MultipleValidationErrors: There were 2 validation errors:
* MissingRequiredParameter: Missing required key 'KeyConditions' in params
* UnexpectedParameter: Unexpected key 'KeyConditionExpression' found in params]
Zgodnie z dokumentem, jeśli używamy KeyConditionExpression SDK powinien nie rozważaj klucza KeyConditions i próbowałem również z najnowszym sdk nodejs. Czy coś jest nie tak w strukturze ładunku?