...
Specify Attributes to return
Refer to the Specifying Attributes to return section for more details.
...
Provide the primary key attributes of the item to be retrieved. The primary key attributes are populated in the list when the table name is selected from the drop-down if the component connects to Dynamo DB instance successfully. The list can be optionally modified using Add, Delete and Delete All buttons.
Refer to the Specifying Input Attributes section for more details.
...
Attribute name placeholders
Refer to the Specifying Attribute name placeholders section for details.
Figure 6: Adding Primary Key Attributes and giving Attribute Name Placeholders to them
...
Specify the condition that must be satisfied in order for the put-item operation to succeed.
Refer to the Expressions, Operators and Functions section for information on how to configure condition expression.
...
Attribute value placeholders
Refer to the Specifying Attribute value placeholders section for details.
UPDATEITEM
...
Provide the primary key attributes of the item to be retrieved. The primary key attributes are populated in the list when the table name is selected from the drop-down if the component connects to Dynamo DB instance successfully. The user can optionally modify the list using Add, Delete and Delete All buttons.
Refer to the Specifying Input Attributes section for more details.
...
Consider the sample item whose structure is mentioned in the Sample Product Category Item section. Some of the operations that can be performed using SET action are listed below.
...
Specify the condition that must be satisfied in order for the update-item operation to succeed.
Refer to the Expressions, Operators and Functions section for information on how to configure condition expression.
...
Attribute name placeholders
Refer to the Specifying Attribute name placeholders section for details.
DELETEITEM
...
Figure 15: Adding the Primary Key value and selecting the Return value type
Refer to the Specifying Input Attributes section for more details.
...
Figure 16: Providing the Conditional expression and adding the Attribute value placeholders
Refer to the Expressions, Operators and Functions section for information on how to configure condition expression.
...
Attribute name placeholders
Refer to the Specifying Attribute name placeholders section for details.
Select to use attribute value placeholder
...
Attribute value placeholders
Refer to the Specifying Attribute value placeholders section for details.
QUERY
...
Specify Attributes to return
Refer to the Specifying Attributes to return section for more details.
...
Attribute name placeholders
Refer to the Specifying Attribute name placeholders section for details.
Select to use attribute value placeholder
...
Attribute value placeholder
Refer to the Specifying Attribute value placeholders section for details.
Select to specify page size
...
The same rules that apply for specifying the primary key for delete-item, update-item, get-item operations apply here too.
Refer to the Specifying Input Attributes section for more details.
...
Specify Attributes to return
Refer to the Specifying Attributes to return section for more details.
...
The syntax for a filter expression is identical to that of a condition expression. Refer to the Expressions, Operators and Functions section to understand the syntax for specifying the filter expression.
...
Attribute name placeholders
Refer to the Specifying Attribute name placeholders section for details.
Select to use attribute value placeholder
...
Attribute value placeholder
Refer to the Specifying Attribute value placeholders section for details.
Select to specify page size
...
The same rules that apply for specifying the primary key for delete-item, update-item, get-item operations apply here too.
Refer to the Specifying Input Attributes section for more details.
...
Specify Attributes to return
Refer to the Specifying Attributes to return section for more details.
...
Provide the primary key attributes of the item to be retrieved. The primary key attributes are populated in the list when the table name is selected from the drop-down if the component connects to Dynamo DB instance successfully. The user can optionally modify the list using Add, Delete and Delete All buttons.
Refer to the Specifying Input Attributes section for more details.
...
The following are the situations to use expression attribute names. Consider the sample item structure as mentioned in the Sample Product Category Item section.
- Attribute name conflicts with a reserved word
- Example: If the condition expression/filter expression/projection expression contains "Comment" attribute, then the operation would fail as Comment is a reserved word in Dynamo DB. Refer to the Reserved Words section for a complete list of reserved words. To work around this, Comment can be replaced with an expression attribute name such as #c. The # (pound sign) is required and indicates that this is a placeholder for an attribute name.
- Attribute Names Containing Dots
- To retrieve the Safety.Warning attribute from a ProductCatalog item with the expected string value "Always wear a helmet", Dynamo DB would return an empty result as it interprets a dot in an expression as a document path separator. In this case, a substitute such as #sw can be defined for Safety.Warning and used in expressions.
- Nested Attributes
- To access nested attribute ProductReviews.OneStar using expression attribute name, one cannot substitute say #pr1star in projection expression. Dynamo DB would return an empty result, instead of the expected map of one-star reviews as it interprets a dot in an expression attribute value as a character within an attribute's name.
The correct approach would be to define an expression attribute name for each element in the document path and use #pr.#1star in projection expression.
#pr - ProductReviews
#1star - OneStar
- To access nested attribute ProductReviews.OneStar using expression attribute name, one cannot substitute say #pr1star in projection expression. Dynamo DB would return an empty result, instead of the expected map of one-star reviews as it interprets a dot in an expression attribute value as a character within an attribute's name.
Repeating Attribute Names
Expression attribute names are helpful when the same attribute name has to be used repeatedly. For example, consider the following projection expression for retrieving some of the reviews from a ProductCatalog item:
- "ProductReviews.FiveStar, ProductReviews.ThreeStar, ProductReviews.OneStar"
...
Consider the sample item structure as mentioned in the Sample Product Category Item section. Suppose a user wants to return all of the ProductCatalog items that are available in Black and cost 500 or less. A Scan operation can be used with a filter expression as follows:
...
Code Block | ||
---|---|---|
| ||
<ns1:DynamoDBRequest xmlns:ns1="http://www.fiorano.com/EVENT_PROCESS4/DynamoDB1"> <ns1:PutItem0> <ns1:InputAttributes> <ns1:Id> <ns1:value>222</ns1:value> </ns1:Id> <ns1:jat> <ns1:value>["cookies","cream"]</ns1:value> </ns1:jat> <ns1:at1> <ns1:value>New String</ns1:value> </ns1:at1> </ns1:InputAttributes> </ns1:PutItem0> </ns1:DynamoDBRequest> |
Output
Update operation
In this example, the price value of the entry is updated with Id 201 to 12000, with "Bicycle" as the ProductCategory.
...
Code Block | ||
---|---|---|
| ||
<ns1:DynamoDBRequest xmlns:ns1="http://www.fiorano.com/EVENT_PROCESS4/DynamoDB1"> <ns1:UpdateItem0> <ns1:PrimaryKey> <ns1:Id> <ns1:value>201</ns1:value> </ns1:Id> </ns1:PrimaryKey> <ns1:ExpressionAttributeValues> <ns1:p> <ns1:value>12000</ns1:value> </ns1:p> <ns1:aval> <ns1:value>Bicycle</ns1:value> </ns1:aval> </ns1:ExpressionAttributeValues> </ns1:UpdateItem0> </ns1:DynamoDBRequest> |
Output
Only the attribute whose value is updated is displayed.
...
Code Block | ||
---|---|---|
| ||
<ns1:DynamoDBRequest xmlns:ns1="http://www.fiorano.com/EVENT_PROCESS4/DynamoDB1"> <ns1:DeleteItem0> <ns1:PrimaryKey> <ns1:Id> <ns1:value>102</ns1:value> </ns1:Id> </ns1:PrimaryKey> <ns1:ExpressionAttributeValues> <ns1:svalue> <ns1:value>Author1</ns1:value> </ns1:svalue> </ns1:ExpressionAttributeValues> </ns1:DeleteItem0> </ns1:DynamoDBRequest> |
Output
The output is displayed as the contents of the entry before the Delete Operation was performed.
...
Code Block | ||
---|---|---|
| ||
<ns1:DynamoDBRequest xmlns:ns1="http://www.fiorano.com/EVENT_PROCESS4/DynamoDB1"> <ns1:Query0> <ns1:ExpressionAttributeValues> <ns1:ival> <ns1:value>205</ns1:value> </ns1:ival> <ns1:pval> <ns1:value>500</ns1:value> </ns1:pval> </ns1:ExpressionAttributeValues> </ns1:Query0> </ns1:DynamoDBRequest> |
Output
Scan operation
In this example, the Bicycle Type and the Price of all the contents in the table are returned whose price lies between 0 and 499.
...
Code Block | ||
---|---|---|
| ||
<ns1:DynamoDBRequest xmlns:ns1="http://www.fiorano.com/EVENT_PROCESS4/DynamoDB1"> <ns1:Scan0> <ns1:ExpressionAttributeValues> <ns1:start_pr> <ns1:value>0</ns1:value> </ns1:start_pr> <ns1:end_pr> <ns1:value>499</ns1:value> </ns1:end_pr> </ns1:ExpressionAttributeValues> <ns1:ExclusiveStartKey0> <ns1:Id> <ns1:value>112</ns1:value> </ns1:Id> </ns1:ExclusiveStartKey0> </ns1:Scan0> </ns1:DynamoDBRequest> |
Output
BatchGetItem operation
...
Code Block | ||
---|---|---|
| ||
<ns1:DynamoDBRequest xmlns:ns1="http://www.fiorano.com/EVENT_PROCESS4/DynamoDB1"> <ns1:BatchGetItem0> <ns1:GetItem0> <ns1:PrimaryKey0> <ns1:Id> <ns1:value>204</ns1:value> </ns1:Id> </ns1:PrimaryKey0> </ns1:GetItem0> <ns1:GetItem1> <ns1:PrimaryKey0> <ns1:FName> <ns1:value>Amazon S3</ns1:value> </ns1:FName> </ns1:PrimaryKey0> </ns1:GetItem1> </ns1:BatchGetItem0> </ns1:DynamoDBRequest> |
Output
BatchWriteItem operation
...