Amazon DynamoDB Query

The Amazon DynamoDB Query activity allows you to execute a query on DynamoDB database.

Settings

The Settings tab has the following field:

Field Description
Connection Select the Amazon Web Services connection from the drop-down list.

Input Settings

The Input Settings tab has the following fields:

Field Description
Query Expression Provide the required expression in JSON format.

Sample JSON query:

{
    "TableName": "orders",
    "ProjectionExpression": "orderId,address",
    "KeyConditionExpression": "orderId = :orderId",
    "FilterExpression": "state = :state"
}

Attribute Fields Autopopulated with expression attribute names and expression attribute values. You can use Add row to add an attribute field. Provide the FieldName and select a corresponding data type from the Type field.

Input

The Input tab contains the input schema. The fields that were selected on the Input Settings tab are available in the schema. You can either hard code their values or map them to a field from the output of a preceding activity in the flow using the Mapper. The Input tab has the following fields:

Field Description
TableName To map the table name through the app property or from the output of the previous activity. The TableName value overwrites the "TableName" mentioned in the Query Expression field of the Input Settings tab.
ExpressionAttributeNames To map the value for the expression attribute names for attributes starting with '#', you must configure the child elements if expression attribute names are present for the Operation Expression on the Input Settings tab.
ExpressionAttributeValues To map the value for the expression attribute values for attributes starting with ':', you must configure the child elements if expression attribute values are present for the Operation Expression on the Input Settings tab.
Limit The maximum number of items to be evaluated.
ScanIndexForward To reverse the order, set the Scan Index Forward parameter to false.
ConsistentRead Select one of the following options:

True: To allow the operations to use strongly consistent reads

False: To allow the operations to use eventually consistent reads

ReturnConsumedCapacity The details of the consumed capacity returned in the response.

Valid values: INDEXES, TOTAL, or NONE

RetryCount The retry count for recoverable errors.

Output Settings

The Output Settings tab has the following fields:

Field Description
Response Schema Provide the DynamoDB JSON schema. To select a record, go to the "Edit Item" window in the AWS DynamoDB table, select "Text" mode from the drop-down list and select DynamoDB JSON check box.

Sample JSON schema:

{
    "customer_id": 
    {
        "S": "1527368"
    },
    "firstName": 
    {
        "S": "William"
    },
    "order_id": 
    {
        "S": "order21"
    }
}

You can enable the Use app level schema toggle switch to configure the DynamoDB JSON response from app level schema. You can populate parsed output to map to the input of the subsequent activity.

Output

The Output tab displays the output schema of the activity as a tree structure. The output is read-only. The properties that are displayed in the schema correspond to the output of this activity and can be used as input by subsequent activities in the flow. The Output tab has the following fields:

Field Description
Items The attributes mentioned in the ProjectionExpression of the Query Expression field of the Input Settings tab are populated and the corresponding schema is configured on the Output Settings tab.
Count If a filter expression is present, the number of items that remain after applying the filter expression.
ScannedCount If a filter expression is present, the number of items that match the key condition expression before applying the filter expression.
ConsumedCapacity The details of the throughput used by an operation.

Loop

If you want this activity to iterate multiple times within the flow, enter an expression that evaluates to the iteration details. Select a type of iteration from the Type menu. The default type is None, which means the activity does not iterate. For more information, refer to the "Using the Loop Feature in an Activity" topic in the TIBCO Flogo® Enterprise documentation.