Add/Replace Item

Operation Name

Add/Replace Item

Function Overview

Write input data to an Amazon DynamoDB table.

This operation uses PutItem API or BatchWriteItem API. For more details on API specifications, refer to the following pages.

Data Model

Table model type.

Properties

For details on use of variables, refer to “Variables”.
Basic settings
Item name Required/Optional Use of variables Description Remarks
Name Required Not available Enter the name to show on the script canvas.  
Input data Required Not available Select a component on the script canvas.  
Required settings
Item name Required/Optional Use of variables Description Remarks
Destination Required Not available Select a global resource.
  • [Add]:
    Add a new global resource.
  • [Edit list]:
    Global resource settings can be edited in “Edit resource list” screen.
 
Table name Required Available Select or enter a table name to be written to.  
Attribute list Required - Specify attribute list of the table specified in [Table name].
Added rows will be the target columns to write.

Each target column can be operated with the following buttons.
  • [Add]:
    Add a target column.
  • [Up]:
    Move the selected target column upwards by one row.
  • [Down]:
    Move the selected target column downwards by one row.
  • [Delete]:
    Delete the target column.
 
Attribute list/Hash key Optional Not available Displays whether it is a hash key attribute of the table specified in [Table name] or not.  
Attribute list/Range key Optional Not available Displays whether it is a range key attribute of the table specified in [Table name] or not.  
Attribute list/Attribute name Required Available Enter an attribute name of the table specified in [Table name].
  • The specified attribute name is displayed in Mapper schema.
Attribute list/Type Required Not available Select the type of [Attribute name].
  • It is displayed in “<DynamoDB data type> (<Internal data type>)” format.
    • DynamoDB data type:
      Data type supported by Amazon DynamoDB.
    • Internal data type:
      Data type used internally within DataSpider.
      For more details, refer to “Internal Data Types”.
Property actions
Item name Description Remarks
Update table name list Get table names in the specified destination and set them in [Table name].  
Update attribute list Executing the query for the table specified in [Table name] to get items, set the attributes of the first 10 items to the attribute list.
  • Enabled when [Table name] is specified.
  • Attribute names and data types are extracted from the items got by executing a scan for the table specified in [Table name].
  • When there is an attribute of unsupported DynamoDB data type in the items got by scanning, that is not added to the attribute list.
  • For more details on the supported types, refer to “Amazon DynamoDB Adapter Limitations”.
  • When there is no item in the table specified in [Table name], only the primary key attribute will be set.
    Irrespective of the actual attribute type, [String (String)] will be set to data type.
Write settings
Item name Required/Optional Use of variables Description Remarks
Enable batch writing Optional Not available Select whether or not to enable batch writing.
  • [Checked]:
    Batch writing will be performed.
  • [Not checked]: (default)
    Batch writing will not be performed.
  • When [Checked] is selected in [Enable batch writing], add/update requests will be sent by 25 items at the maximum at a time.
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

The number of columns differs depending on the [Attribute list] settings.
For more details, refer to “Schema of table model type”.

Output schema

None.

Loading schema in Mapper

Schema is loaded automatically.
For more details, refer to “Edit Schema”.

Transaction

Transaction is not supported.

PSP Usage

PSP is supported.
For more details, refer to “Parallel Stream Processing”.

Available Component Variables

Component variable name Description Remarks
count The number of add/replace requests that has been sent is stored.
  • Default value is null.
message_category When an error occurs, the corresponding message code's category is stored.
  • Default value is null.
message_code When an error occurs, the corresponding message code is stored.
  • Default value is null.
message_level When an error occurs, the corresponding message code's severity is stored.
  • Default value is null.
error_type When an error occurs, the error type is stored.
  • Default value is null.
  • The error type will be in the following format.
    Example: “java.io.FileNotFoundException”
  • The contents that will be stored may vary depending on DataSpider Servista versions.
error_message When an error occurs, the error message is stored.
  • Default value is null.
  • The contents that will be stored may vary depending on DataSpider Servista versions.
error_trace When an error occurs, the error's trace information is stored.
  • Default value is null.
  • The contents that will be stored may vary depending on DataSpider Servista versions and client applications.

Specification Limits

For more details on specification limits common to each operation, refer to “Limitations of Amazon DynamoDB Adapter”.

Major Exceptions

Exception name Cause Solution
ResourceNotFoundException
Resource definition is not found. Name: []
[Destination] is not specified. Specify [Destination].
ResourceNotFoundException
Resource definition is not found. Name: [<global resource name>]
The resource definition specified in [Destination] is not found. Check the global resource specified in [Destination].
InvalidPropertyConfigurationException
<property name> is not specified.
[<property name>] is not specified. Specify [<property name>].

Notes