Amazon SimpleDB Connector
This adapter manages data and its structures in Amazon S3 SimpleDB. Amazon SimpleDB is a highly available NoSQL data store that offloads the work of database administration.
Properties
Operation | Defines the operation executed by the adapter Possible values:
|
Parameters
Adapter | Main adapter class (do not change!) Possible values: de.softproject.integration.adapter.amazonsimpledb.AmazonSimpleDBAdapter: Main class (default) |
| Access key ID used to sign programmatic requests to AWS
Possible values: Any string containing the access key Id, e.g. |
secretKey | Secret access key used to sign programmatic requests to AWS
Possible values: Any string containing the secret access key e.g. |
region | Domain region Possible values: Any string containing the region name, e.g.
|
domain | Domain name identified by a unique key (name) Domains are represented by domain worksheet tabs at the bottom of the spreadsheet and are similar to tables containing similar data. The name must be between 3 and 255 characters and can contain the following characters:
|
itemName | Item name Items are represented by rows and are individual objects containing one or more attribute name-value pairs. |
replaceExistingAttributes | Indicates whether the content to be put will overwrite the existing one, if the item(s) to be put contains any common attribute(s). Applies to the operations |
Status values
1 | The operation was executed successfully |
0 | The domain does not exist |
-1 | An error occurred during the operation's execution |
Input
The adapter expects an XML document as input.
Operation
Put
:XML<?xml version="1.0" encoding="UTF-8" <ListAttributes> <item name="..Item name.."> <Attribute name="..Name of attribute.." value="..Value of attribute.."/> <!-- As many attributes as required --> </item> </ListAttributes>
In case of the operation
Put
only one item attribute should be provided. If operations for more than one item are to be performed, the operationBatchPutAttributes
should be used instead. There are no restrictions on element names, however, the attributename
is required.Operation
BatchPutAttributes
:XML<?xml version="1.0" encoding="UTF-8" <ListAttributes> <item name="..Item name.."> <Attribute name="..Name of attribute.." value="..Value of attribute.."/> <!-- As many attributes as required --> </item> <!-- As many items as required --> </ListAttributes>
In case of the operation
BatchPutAttributes
more than one item attribute should be provided. If operations for only one item are to be performed, the operationPut
should be used instead. There are no restrictions on element names, however, the attributename
is required.Operation
Select
:XML<?xml version="1.0" encoding="UTF-8" <RootElement> <queryStatement> select * from 'DomainName' </queryStatement> </RootElement>
The element
queryStatement
is required. For a proper query, follow this guide.Operation
BatchDeleteAttributes
:XML<?xml version="1.0" encoding="UTF-8" <Items> <item name="HR employee"> <Attribute1 name="ID" value="00002"/> </item> <item3 name="DEV employee"> <Attribute1 name="ID" value="00003"/> <Attribute2 name="Address" value="C\Ettlingen"/> <Attribute3 name="Name" value="Lorena"/> <Attribute4 name="Frameworks" value="Java-Hibernate"/> <Attribute4 name="Frameworks" value="Angular"/> </item> </Items>
Operation
StoreAmazonS3ObjectMetadata
:XML<?xml version='1.0' encoding='UTF-8'?> <ListBucket> <Bucket name="SoftProject-bucket" region="eu-west-1"> <Object name="myFile.xml" url="https://s3-eu-west-1.amazonaws.com/test-malaga2/myFile.xml"> <Metadata lastModified="2018-12-10 13:42:38.000 +0100" instanceLength="158" eTag="a933d9ca99b473c7921c496727a32f91" contentType="application/octet-stream" contentLength="158"/> </Object> <Object name="myFile2.xml" url="https://s3-eu-west-1.amazonaws.com/test-malaga2/myFile2.xml"> <Metadata lastModified="2018-12-10 12:02:07.000 +0100" instanceLength="158" eTag="a933d9ca99b473c7921c496727a32f91" contentType="application/octet-stream" contentLength="158" contentLanguage="English"/> </Object> </Bucket> </ListBucket>
- The expected input XML structure can be provided using the Amazon S3 Simple Storage Connector's
Search
operation. Moreover, the propertyincludeObjectsMetadata
hast to be enabled. - Stored attributes for each object metadata need to match with the Amazon metadata fields, see Object Key and Metadata.
Additionally to the provided metadata fields, a new field will be stored in order to be able to filter the metadata. The field
metadataType
provides the valuesSTANDARD_METADATA
orUSER_METADATA
or both, if there are standard fields and user fields, see Object metadata.XML<?xml version='1.0' encoding='UTF-8'?> <ListBucket> <Bucket name="testmalaga2" region="euwest1"> <Object name="testing_folders/personalData.txt" url="https://s3euwest1.amazonaws.com/testmalaga2/testing_folders/personalData.txt"> <Metadata lastModified="2018-12-10 12:30:35.000 +0100" instanceLength="33" eTag="7960fb01e91834eb9d5ccbacdf45d0e5" contentType="application/octetstream" contentLength="33" contentLanguage="Spanish"/> <UserMetadata ciudad="Malaga"/> </Object> </Bucket> </ListBucket>
- The expected input XML structure can be provided using the Amazon S3 Simple Storage Connector's
Output
The adapter returns different kind of documents depending on the executed operation:
Operation
ListDomain
:XML<?xml version="1.0" encoding="UTF-8" <ListDomain> <Domain name="Domain Name"> </ListDomain>
Operation
GetItem
:XML<?xml version="1.0" encoding="UTF-8" <Result> <Item id="Item Name"> <Attribute name="Attribute name" value="Attribute value"/> <Attribute name="Attribute name" value="Attribute value"/> <Attribute name="Attribute name" value="Attribute value"/> </Item> </Result>
Operation
Select
:XML<?xml version="1.0" encoding="UTF-8" <Result> <Item id="Item1 Name"> <Attribute name="Attribute name" value="Attribute value"/> <Attribute name="Attribute name" value="Attribute value"/> <Attribute name="Attribute name" value="Attribute value"/> </Item> <Item id="Item2 Name"> <Attribute name="Attribute name" value="Attribute value"/> <Attribute name="Attribute name" value="Attribute value"/> <Attribute name="Attribute name" value="Attribute value"/> </Item> <Item id="Item3 Name"> <Attribute name="Attribute name" value="Attribute value"/> <Attribute name="Attribute name" value="Attribute value"/> <Attribute name="Attribute name" value="Attribute value"/> </Item> </Result>
Operation
DomainMetadata
:XML<?xml version="1.0" encoding="UTF-8" <Domain domainName="Employee"> <Metadata attributeNamecount="0"/> <Metadata attributeNamesSizeBytes="0"/> <Metadata attributeValueCount="0"/> <Metadata attributeValueSizeBytes="0"/> <Metadata itemCount="0"/> <Metadata itemNameSizeBytes="0"/> <Metadata timestamp="1544698002"/> </Domain >
- All other operations return the input document.