Delete Item

Operation Name

Delete Item

Function overview

Deletes the items in the specified Amazon SimpleDB domain.

Data Model

Data model of this type of component is table model type.

Properties

For information about using variables, refer to "variables".
Basic settings
Item name Required / Optional Use of Variables Description Remarks
Name Required Not available Enter the name on the script canvas.  
Input data Required Not available Select the component on the script canvas.  
Required settings
Item name Required / Optional Use of Variables Description Remarks
Connection Required Not available Select Global Resources.
  • [Add]:
    Adds new global resource.
  • [Edit list]:
    Global resource settings can be edited with "Edit Resource list".
 
Domain name Required Available specify the domain.  
Put option
Item name Required / Optional Use of Variables Description Remarks
Report error if expected value is unmatched or does not exist Optional - Select whether to fail the operation if the result does not match what is expected or the attribute specified in the [Expected name] does not exist.
  • [Checked]:
    Fails the operation if the result does not match what is expected or the attribute specified in the [Expected name] does not exist.
  • [Not Checked]: (default)
    [Expected name] is invalidated and expected value can be no longer specified.
Expected name Optional - Select the name of the attribute to which a value to be compared with the value expected is stored.
Skip item that failed to execute Delete Optional - Select whether to continue with its operation skipping over all the items this operation has failed to delete to its target.
  • [Checked]:
    Operation continues its process skipping over any items this operation has failed to delete.
  • [Not Checked]: (default)
    Operation fails if it has failed to delete items.
 
Output result data of items failed Delete Optional - Select whether the items this operation has failed to delete to its target will be output to its result data.
  • [Checked]:
    The name of the items this operation has failed to delete to its target will be output to its result data formatted as Output Schema which is a table model type.
  • [Not Checked]: (default)
    Result data is not output.
  • Enabled when [Skip item that failed to execute Delete] is checked.
  • If enabled, an empty result data, which is a table model type, is returned if its delete operation has succeeded on all items.
  • If there is any subsequent process connected to the current operation by a data flow drawn between them, toggling the checked option will not remove the data flow established. The data flow must be removed manually.
Property Action
Item name Description Remarks
Retrieve Expected Value Attributes Open the dialog whereby items can be selected and retrieve the list of attribute names specified in [Item] and set them to the [Expected name].
  • Number of the items that appear in the [Item] list is 500 at most.
  • If the item you are looking for does not appear in the [Item] list, it is possible to list the names of its attributes by entering the item name directly.
  • Enabled when [Report error if expected value is unmatched or does not exist] is checked.
Data processing method
Item name Required / Optional Use of Variables Description Remarks
Mass data processing Required Not available Select a data processing method.
  • [Use script settings]: (default)
    Apply mass data processing settings of script property to adapter.
  • [Disable]:
    Mass data processing is not performed.
  • [Enable]:
    Mass data processing is performed.
  • When [Output result data of items failed Delete] is checked and the operation has failed to put the items to its target, the outcome of the process will be output to its result data formatted as Output schema.
Comment
Item name Required / Optional Use of Variables Description Remarks
Comment Optional Not available You can write a short description of this adapter.
The description will be reflected in the specifications.
 

Schema

Input Schema

<?xml version="1.0" ?>
<table>
  <row>
    <column>Item name</column>
    <column><expected name>_expected</column> It will occur when [Report error if expected value is unmatched or does not exist]  is checked. The <expected name> becomes what is assigned to the [Expected name].
  </row>
  <row>
    :
  </row>
</table>

Output Schema

When [Output result data of items failed Delete] is enabled and the operation has failed to delete the items, the outcome of the process will be output to its result data formatted as the schema depicted below.
<?xml version="1.0" ?>
<table>
  <row>
    <column>Input schema of the failed item</column>
    :
    <column>error_message</column>
    <column>error_code</column>
    <column>status_code</column>
  </row>
  <row>
    :
  </row>
</table>

Loading schema in Mapper

Schema is loaded automatically.
See "Edit Schema" for details with regards to defining a schema.

Mass data processing

Mass data processing is supported.

Transaction

Transaction is not supported.

PSP Usage

PSP is supported.
For details on PSP, refer to "Parallel Stream Processing".

Available component variables

Component variable name Description Remarks
count Returns the number of items successfully deleted.
  • The value defaults to null.
error_code When AmazonServiceException is thrown, Amazon Web Services error code to which it corresponds is stored.
  • The value defaults to null.
status_code When AmazonService Exception is thrown, HTTP status code is stored.
  • The value defaults to null.
error_count Returns the number of items failed to delete.
  • The value defaults to null.
  • When [Output result data of items failed Delete] is checked, it returns the number of items which has been skipped over.
message_category Stroes the category to which corresponding message code belongs to, when an error occurs.
  • The value defaults to null.
message_code Stores its corresponding message code of occured error.
  • The value defaults to null.
message_level Stores the severity of the corresponding message code of the occured error.
  • The value defaults to null.
error_type Stores the type of the occured error.
  • The value defaults to null.
  • Error is represented in the format depicted below.
    Example:java.io.FileNotFoundException
  • The message may vary depending on the DataSpider Servista version.
error_message Stores the error message for the occured error.
  • The value defaults to null.
  • The message may vary depending on the DataSpider Servista version.
error_trace Stores stack trace of the occurred error.
  • The value defaults to null.
  • The message may vary depending on the DataSpider Servista version or the client application used.

About delete operation for which expected values are specified

When [Report error if expected value is unmatched or does not exist] is checked, optimistic concurrency control is used.
When optimistic concurrency control is in effect, operation ensures that record being deleted has the same value as it did when the deleting process started before transaction is committed. If the check reveals conflicting modifications, or the value has been changed, the delete operation fails. The delete operation with its optimistic concurrency control feature enabled can take advantage of this mechanism to proceed the transaction it has started without locking the data resources which may affect other operations accessing the same, leading to higher throughput under certain circumstances. Optimistic concurrency control can be managed by setting this option.

Item delete operation assumes that the input data(an expected value) and the value assigned to the [Expected name] to be the same when before committing the transaction it has started. Expected values are specified in each '<Expected name>_expected' column found in 'Input schema'.

example: Assume we have a script A and another script B. Both of these scripts perform delete operations on Amazon Simple DB items whose 'delete' flag values have been set.

Specification limitations

  • The order of the [Attribute list] returned in the 'Item selection dialog' is not guaranteed.

  • When [Report error if expected value is unmatched or does not exist] is left unchecked, specifying non existing items will not cause any error, but they are counted and reflected in the value returned in the component variable "count".

  • Should delete operation fail, items deleted cannot be rolled back.
  • Main exceptions

    Exception name Causes Solution
    ResourceNotFoundException
    Resource definition could not be found.Name: []
    [Connection] is not specified. Please specify [Connection].
    ResourceNotFoundException
    Resource definition could not be found.Name: [<name of Global Resources>]
    Resource definition selected in [Connection] is not found. Please check the global resource specified in [Connection].
    InvalidPropertyConfigurationException
    <Property Name> is not specified.
    [<Property Name>] is not specified. Please specify [<Property Name>].
    Status Code: 400, AWS Request ID: XXXXXXXXXXXXXXXX, AWS Error Code: NoSuchDomain, AWS Error Message: The specified domain does not exist The domain specified in the [Domain name] does not exist. Make sure that the domain name specified in [Domain name] is valid.
    Status Code: 400, AWS Request ID: XXXXXXXXXXXXXXXX, AWS Error Code: InvalidParameterValue, AWS Error Message: Value (<Expected name>) for parameter Value is invalid. Value exceeds maximum length of 1024 The size of the expected value specified exceeds 1024 bytes. Make sure that the length of the expected value specified fits in this range.
    Status Code: 400, AWS Request ID: XXXXXXXXXXXXXXXX, AWS Error Code: MissingParameter, AWS Error Message: The request must contain the parameter ItemName Item name is not specified. Make sure the value of the first column is not empty.
    Status Code: 400, AWS Request ID: XXXXXXXXXXXXXXXX, AWS Error Code: InvalidParameterValue, AWS Error Message: Value (<Item name>) for parameter Item is invalid. Value exceeds max length of 1024 The size of the item name exceeds 1024 bytes. Make sure the value of the first column is not empty.
    Status Code: 409, AWS Request ID: XXXXXXXXXXXXXXXX, AWS Error Code: ConditionalCheckFailed, AWS Error Message: Conditional check failed. Attribute (<Attribute name>) value is (<Attribute value>) but was expected (<Expected name>) The expected value specified does not match the current value. Make sure that the expected value specified is valid.Make sure that the current value has not been overwritten counter-intuitively by other operations.
    Status Code: 404, AWS Request ID: XXXXXXXXXXXXXXXX, AWS Error Code: AttributeDoesNotExist, AWS Error Message: Attribute (<Attribute name>) does not exist The attribute specified in the [Expected name] does not exist. Make sure that the attribute specified in the [Expected name] exist.
    Status Code: 400, AWS Request ID: XXXXXXXXXXXXXXXX, AWS Error Code: InvalidParameterValue, AWS Error Message: Value () for parameter Name is invalid. The empty string is an illegal attribute name Attribute name is not specified. Make sure that the [Expected name] is specified a value.
    Status Code: 409, AWS Request ID: XXXXXXXXXXXXXXXX, AWS Error Code: MultiValuedAttribute, AWS Error Message: Attribute (<Attribute name>) is multi valued. Conditional check can only be performed on a single-valued attribute Multiple values are assigned to the attribute specified in the [Expected name]. Make sure that there is only one value assigned to the attribute that is specified in the [Expected name].
    Status Code: 400, AWS Request ID: XXXXXXXXXXXXXXXX, AWS Error Code: TooLargeRequest, AWS Error Message: The request is larger than the maximum allowed size of 1048576 The size of the request exceeds 1MB. The input data needs to be split.
    Status Code: 403, AWS Request ID: XXXXXXXXXXXXXXXX, AWS Error Code: InvalidClientTokenId, AWS Error Message: The AWS Access Key Id you provided does not exist in our records. [Access Key ID] specified in [Connection] is invalid. Check the settings of the global resource specified in [Connection].
    Status Code: 403, AWS Request ID: XXXXXXXXXXXXXXXX, AWS Error Code: SignatureDoesNotMatch, AWS Error Message: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details. [Secret Access Key] specified in [Connection] is invalid. Check the settings of the global resource specified in [Connection].
    com.amazonaws.AmazonClientException
    Unable to execute HTTP request: <Endpoint>
    [Endpoint] specified by [Connection] is not available. Make sure that all properties specified within the [Connection] for the specified Global Resource are provided with correct information.

    Notes