I am trying to write params for my DynamoDB Query. I am getting an error and I believe it is from this query.
let params = {
TableName: tableName,
KeyConditionExpression:
'(TimeId = :timeId AND begins_with ( TypeKey , :typeKey)) AND (awayTeam = :teamName OR homeTeam = :teamName)',
ExpressionAttributeValues: {
':timeId': `${year}-${week}`,
':typeKey': 'GA',
':teamName': teamName,
},
};
ERROR MSG: Invalid operator used in KeyConditionExpression: OR
PK: TimeId
SK: TypeKey
attributes: awayTeam | homeTeam
Can someone let me know what I am doing wrong? year, week and teamName are all defined as path parameters.