Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this example, Price and Id are returned for the entry with primary key Id, the value of which is 205.

Input

Code Block
titleInput text for Get operation
<ns1:DynamoDBRequest xmlns:ns1="http://www.fiorano.com/EVENT_PROCESS4/DynamoDB1">
	<ns1:GetItem0>
		<ns1:PrimaryKey>
			<ns1:Id>
				<ns1:value>205</ns1:value>
			</ns1:Id>
		</ns1:PrimaryKey>
	</ns1:GetItem0>
</ns1:DynamoDBRequest>

Output

Put operation

In this example, three attributes are given as input with id as the primary key.

The conditional expression attribute_not_exists(#id) is used to put the value only if the given ID value is not already present in the table.

Input

Code Block
titleInput text for Put operation
<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.

Input

Code Block
titleInput text for Update operation
<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.

...

In this example, delete operation is performed on the entry with Id Value as 102 and only if "Author1" is contained in Authors attribute.

Input

Code Block
titleInput text for Delete operation
<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.

...

In this operation, the entry with Id value 205 is returned subjected to the condition that the Price attribute has a value of 500(Given in the filter expression).

Input

Code Block
titleInput text for Query operation
<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.

Input

Code Block
titleInput text for Scan operation
<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

In this example, the get operation is performed on two tables namely ProductCatalog(for id = 204) and Forum (FName = Amazon S3).

Input

Code Block
titleInput text for BatchGetItem operation
<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

In this example, attribute at13 is inserted at Id 204 and the entry with Id=112 is deleted.

Input

Image Added

Code Block
titleInput text for BatchWriteItem operation
<ns1:DynamoDBRequest xmlns:ns1="http://www.fiorano.com/EVENT_PROCESS4/DynamoDB1">
	<ns1:BatchWriteItem0>
		<ns1:WriteItem0>
			<ns1:PutItem0>
				<ns1:InputAttributes>
					<ns1:at13>
						<ns1:value>Batch New Insert</ns1:value>
					</ns1:at13>
					<ns1:Id>
						<ns1:value>204</ns1:value>
					</ns1:Id>
				</ns1:InputAttributes>
			</ns1:PutItem0>
			<ns1:DeleteItem0>
				<ns1:PrimaryKey>
					<ns1:Id>
						<ns1:value>112</ns1:value>
					</ns1:Id>
				</ns1:PrimaryKey>
			</ns1:DeleteItem0>
		</ns1:WriteItem0>
	</ns1:BatchWriteItem0>
</ns1:DynamoDBRequest>

Image Removed

Output

Points to Note

Depending on the operation type, the following parameters are taken from the input. The rest of the parameters are taken from the CPS for processing.

...

Adaptavist ThemeBuilder EngineAtlassian Confluence