Snap type: | Write
| |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | This Snap deletes an item or a bunch of items (based on batch size) from an existing table in AWS DynamoDB.
| |||||||||||||
Prerequisites: | [None]
| |||||||||||||
Support and limitations: |
| |||||||||||||
Account: | This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See DynamoDB Account for information on setting up this type of account.
| |||||||||||||
Views: |
| |||||||||||||
Settings | ||||||||||||||
Label required | The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline. | |||||||||||||
Table name required
| The name of the table to delete the data from. This property is suggestible, that shows the list of the tables in the database. | |||||||||||||
Delete condition
| Specifies a condition to be used on non-key attributes for performing the delete operation. Default value: [None] | |||||||||||||
Batch size
| Specifies the number of records to be deleted in a single request. Default value:1 | |||||||||||||
Output deleted records
| Specifies whether or not to display the original records in the output view.
| |||||||||||||
Expression attribute values | This property is used to specify the placeholders to be used in delete condition property above. Refer here for more information. Example:
Scenario: Suppose, a table T1 has two columns A1 and A2 where A1 is a key- attribute and A2 is a non-key attribute. A record having value for A2 as 'Snap' needs to be deleted. We cannot enter A2=Snap in the delete condition directly , instead assign a placeholder for the value and hence, we define an Attribute :v1 of Type S, and Value as Snap. We will then give A2=:v1 in the delete condition.
| |||||||||||||
Execute during preview
| This property enables you to execute the Snap during the Save operation so that the output view can produce the preview data. Default value: Not selected
|
Example
In this pipeline, the DynamoDB Delete Item Snap, deletes a record from the table DynamoDB_Delete1 using a delete condition by defining a placeholder.
In the upstream Mapper Snap, supply the key (737314009510) of an item to be deleted and define its placeholder value ($values1) for the attribute to be used in the delete condition.
In the DynamoDb Delete Table Item Snap, we want to delete a record from the table DynamoDB_Delete1, when the delete condition is Product = :val1, where the attribute :val1 = $Values1.
Successful execution of the pipeline displays the HTTP status code 200 in the output view:
Snap History |
---|
4.8.0Introduced the Snap in this release. |