I want to query a dynamo db table without a Primary partition key Primary sort key
Those are in my table
Primary partition key userid (String)
Primary sort key jobcodeid (String)
This table also contain a key jobid.
So i want to make a query which looks like this.
var opts = {
'ConsistentRead': true,
TableName : 'interviews',
KeyConditionExpression: "jobid = :jobid",
ExpressionAttributeValues: { ":jobid": {"S":jobid} },
}
I am using this code
dynamodb.query(opts, function(err, data) {
if(err){
//somthing
}else{
//Somthing
}
}
But the above query returning an error like this.
ValidationException: Query condition missed key schema element
How can I execute this query?