SimpleDB - Query

Declaration

<AMAWSSIMPLEDB QUERY="text" RESULTDATASET="text" />

See Also

SimpleDB - Main, SimpleDB - Create Domain, SimpleDB - Create Session, SimpleDB - Delete Attribute(s), SimpleDB - Delete Domain, SimpleDB - End Session, SimpleDB - Get Attribute(s), SimpleDB - Get Domain Metadata, SimpleDB - Put Attribute(s)

Description

Returns a set of attributes for item names that match the Select expression. Select is similar to the standard SQL Query SELECT statement. Results are populated into a dataset.  

IMPORTANT: The SimpleDB activities in AutoMate use Amazon's SimpleDB engine to perform their work. Therefore, yYou must have a valid Amazon SimpleDB service account to use these activities.

Practical Usage

Used to query items within SimpleDB.

Parameters

Data Properties

Property

Type

Required

Default

Markup

Description

Query

Text

Yes

(Empty)

QUERY="select * from myDomain"

The expression used to query the domain.

Next Token (optional)

Number

No

(Empty)

NEXTTOKEN="2"

String that tells Amazon SimpleDB where to start the next list of item names.

Populate variable with returned next token

Text

No

(Empty)

RESULTVARIABLE="var1"

The name of the variable in which to populate with the next token.

Create and populate dataset with query result

Text

Yes

(Empty)

 

RESULTDATASET="mydataset"

The name of the dataset in which to create and populate with the query result. More details about the specific fields this dataset creates can be found below under Additional Notes.

 

Credentials Properties

The Credentials properties allows you to set or link specific parameters for this particular SimpleDB activity such as Access Key, Secret Access Key, Service URL, etc.

Property
Type
Required
Default
Markup
Description

Provide Credentials

 

 

 

 

Indicates where this activity's credentials should originate from. Different properties apply depending on the option selected. The available options are:

  • Custom (Default) - Specifies that a custom set of credentials will be entered for this SimpleDB activity. Select this option if performing a single SimpleDB activity.

  • Session Based - Specifies that credentials should derive from a session created in a previous step with the use of the Create Session activity. This allows several SimpleDB activities to be linked to a specific session, eliminating redundancy.

Access Key

Text

Yes

(Empty)

ACCESSKEY="MyAccessKey"

A 20-character, alphanumeric string that uniquely identifies a user who owns a SimpleDB account (i.e. 022QF06E7MXBSH9DHM02). This along with a Secret Access Key forms a secure information set that SimpleDB uses to confirm a valid user's identity.

This property is active only if Custom is selected under the Provide Credentials property.

Secret Access Key

Text

Yes

(Empty)

SECRETKEY="SecretKey"

A 40-character string that serves the role as Password to access SimpleDB (i.e. kWcrlUX5JEDGM/LtmEENI/aVmYvHNif5zB+d9+ct). This along with an associated Access Key forms a secure information set that SimpleDB uses to confirm a valid user's identity.

This property is active only if Custom is selected under the Provide Credentials property.

User Agent

Text

No

AutoMate

USERAGENT="AutoMate"

The User-Agent header name. The User-Agent request-header field contains information about the user agent originating the request such as timeouts, proxies, name, etc. The default User Agent name is AutoMate.

This property is active only if Custom is selected under the Provide Credentials property.

Service URL

Text

No

(Empty)

SERVICEURL=

"https://eu-west-1.ec2.amazonaws.com"

The Service URL used to make requests to the SimpleDB service. The Service URL provides the service endpoint. For example, To make the service call to a different region, you can pass the region-specific endpoint, such as 'https://sdb.eu-west-1.amazonaws.com'.

This property is active only if Custom is selected under the Provide Credentials property.

Maximum retry on error

Number

No

(Empty)

MAXERRORRETRY="4"

Signifies how many times the Amazon SimpleDB engine should retry the request before returning an error.

This property is active only if Custom is selected under the Provide Credentials property.

Proxy Host

Text

No

(Empty)

PROXYHOST="proxy.host.com"

The host name (server.domain.com) or IP address (xxx.xxx.xxx.xxx) of the proxy server.

This property is active only if Custom is selected under the Provide Credentials property.

Proxy Port

Number

No

(Empty)

PROXYPORT="1028"

The port that should be used to connect to the proxy server.

This property is active only if Custom is selected under the Provide Credentials property.

Session Name

Text

Yes

(Empty)

SESSION="SessionName"

The session name that this activity should originate from. This allows several SimpleDB activities to be linked to a specific session. Numerous sessions can be used within a single task.

This property is active only if Session Based is selected under the Provide Credentials property.

NOTE: Use the Create Session activity to create and name an SimpleDB session.

Description Properties

The Description tab allows you to customize the text description of any step when it appears in the Steps Pane.

More on setting custom step description

Error Causes Properties

The Error Causes tab is part of AutoMate's Error Handling functionality which allows you to select / omit specific errors that will cause a particular step to fail.

More about error causes properties

On Error Properties

The On Error tab is part of AutoMate's Error Handling functionality which allows you to determine what the task should do if a particular step encounters an error.

More about on error properties

Additional Notes

Datasets

A dataset is a multiple column, multiple row container object. This activity creates and populates a dataset containing a specific set of fields in addition to the standard dataset fields. The table below describes these fields (assuming the dataset name assigned was theDataset).

Name

Type

Return Value

theDataset.ItemName

Text

Returns the item name.

theDataset.Attributes

Text

Returns the item's attributes.

Variables and Expressions

All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables
More on expressions

More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

 

 

<AMAWSSIMPLEDB QUERY="select * from theData" RESULTDATASET="theDataset" />

 

↑ Top of Page