Put Item

Operation Name

Put Item

Function overview

Puts the input data as item into 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.  
Attribute list Required - Specify the name of the attribute which is to be written.

Each attribute can be operated with the following buttons.
  • [Add]:
    Add an attribute
  • [Up]:
    Move the order of the selected attribute upwards by one.
  • [Down]:
    Move the order of the selected attribute downwards by one.
  • [Delete]:
    Delete the attribute
 
Attribute list / Attribute Name Required Available Enter an attribute name.

The attribute of the item specified in the [Select Item And Set Attributes] property action can be used as an attribute name.
 
Property Action
Item name Description Remarks
Select Item And Set Attributes Open the dialog whereby items can be selected and retrieve the list of attribute names specified in the [Item] and set them to the [Attribute list].
  • 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 [Connection] is selected.
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 Put Optional - Select whether to continue with its operation skipping over all the items this operation has failed to write to its target.
  • [Checked]:
    Operation continues its process skipping over any items this operation has failed to write to its target.
  • [Not Checked]: (default)
    Operation fails if it has failed to write to its target.
 
Output result data of items failed Put Optional - Select whether the items this operation has failed to put to its target will be output to its result data.
  • [Checked]:
    The name of the items this operation has failed to write 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 Put] is checked.
  • If enabled, an empty result data, which is a table model type, is returned if its write 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
Update expected name Set [Attribute name] from [Attribute list] in the [Expected name] list.
  • 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 Put] 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].
    <column>Attribute name</column>
    :
  </row>
  <row>
    :
  </row>
</table>

Output Schema

When [Output result data of items failed Put] is checked and operation has failed to write the items to its target, 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 which have been written to the target.
  • 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 write.
  • The value defaults to null.
  • When [Output result data of items failed Put] 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 write 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 the value of the record being updated is same as it was when the process started before transaction is committed. If the check reveals conflicting modifications, or the value has been changed, the update operation fails. The put item 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 write operation assumes that the input data(an expected value) and the value assigned to the [Expected name] to be the same before committing the transaction it has started. Expected values are specified in each '<expected value>_expected' column found in 'Input schema'.

ex) Assume we have a script A and another script B. Both of these scripts perform update operation in which a column value representing a version number stored in Amazon Simple DB is incremented by '1'.

Specification limitations

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 (<Attribute name>) for parameter Value is invalid. Value exceeds maximum length of 1024 The size of the attribute exceeds 1024 bytes. Check the column value of the input data.
Status Code: 400, AWS Request ID: XXXXXXXXXXXXXXXX, AWS Error Code: InvalidParameterValue, AWS Error Message: Value (<Attribute name>) for parameter Name is invalid. Value exceeds maximum length of 1024 The size of the string value specified in the [Attribute name] of the [Attribute list] exceeds 1024 bytes. Make sure that the string value specified in the [Attribute name] of [Attribute list] 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: NumberSubmittedAttributesExceeded, AWS Error Message: Too many attributes for item '<Item name>' in a single call. Up to 256 attributes per call allowed. The number of the attribute value exceeds 256. Make sure that the number of [Attribute name] of the [Attribute list] fits in this range.
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. Either the [Attribute name] of [Attribute list] is empty or no value is specified in the [Expected name].
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: MissingParameter, AWS Error Message: No attributes for item ='<Item name>' No [Attribute name] is specified in the [Attribute list]. Specify [Attribute name] in the [Attribute list].
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