Sample query for Table

Demonstrates how to use the DynamoDB Query Snap to query a table directly using compound key conditions (EventID and EmpID).


DynamoDB Query Snap configuration for table query

The Snap processes Snap properties and sends the following HTTP request entity to DynamoDB:

{
    "TableName": "EmployeeEvents",
    "ProjectionExpression": "EffectiveDate, EmpID, EventID, #nam",
    "KeyConditionExpression": "EventID = :val2 AND EmpID > :val3",
    "ExpressionAttributeNames": {
        "#name": "Name"
    },
    "ExpressionAttributeValues": {
        ":val2": {
            "S": "102"
        },
        ":val3": {
            "N": "1"
        }
    },
    "ReturnConsumedCapacity": "INDEXES"
}

Then, the Snap produces the output documents as following:

EmpID Name EventID EffectiveDate
{"N":"2"} {"S":"John"} {"S":"102"} {"N":"20170703"}
{"N":"3"} {"S":"Paul"} {"S":"102"} {"N":"20170703"}