Ich versuche, Dynamo für modified_time > 1 day
und jstatus = Error
Fragetaste Zustand nicht unterstützt: Bereits ein Hash haben und einen Range Key
Hier abzufragen, ist JobStatusIndex
die Global Secondary Index
mit, modified_time
als Partition Key
und jstatus
als sort key
.
dynamo.query({
TableName: "Jobs",
IndexName: "JobStatusIndex", // Global Secondry Index
KeyConditionExpression: `modified_time >= :ter and jstatus = :ste`,
ExpressionAttributeValues: {
':ter': moment().subtract(1, 'day').unix(),
':ste': "Error"
}
},(err) => console.log(err))
Aber ich erhalte eine Fehlermeldung, die besagt:
ValidationException: Query key condition not supported
Was ist der Grund dafür sein könnte? Ich verstehe das einfach nicht.
Ich habe einige SO-Fragen, aber es hat das Problem nicht gelöst. Ich habe bereits die erforderlichen Schlüssel an Ort und Stelle. Was vermisse ich?
kann dies helfen Ihnen [Link hier] (https://stackoverflow.com/questions/31830888/dynamodb-query-error-query-key-condition-not-supported) –