DynamoDB Scan

Overview

The DynamoDB Scan Snap provides the ability to read data from a DynamoDB table.

Supported Accounts

Prerequisites

None.

Snap views

Type Description Examples of upstream and downstream Snaps
Input

This Snap has at most one document input view.

Only the expression property values can be passed to its input view.

Output

This Snap has exactly one document output view.

This Snap provides the result of the Scan operation for each record present in a DynamoDB table. Errors can be routed to the error view if enabled or cause the Snap to fail during execution.

Learn more about Error handling.

Snap settings

Note: Learn about the common controls in the Snap settings dialog.
Field/Field set Description

Label

String

Required.Specify a unique name for the Snap. Modify this to be more appropriate, especially if there are more than one of the same Snap in the pipeline.

Default value: DynamoDB Scan

Table name

String/Expression/ Suggestion

Required. The name of the table to read the data from. This property is suggestible, which shows the list of the tables in the database.

Default value: None

Example: Thread

Projection expression

String/Expression

String that identifies one or more attributes to retrieve from the specified table. If more than one attribute is to be retrieved then those should be separated by commas.

Default value: None

Example: LastPostDateTime, ForumName, Subject

Total segments

Integer/Expression

This property represents the total number of segments into which the Scan operation will be divided for a parallel scan request.

Note: The Snap uses only one segment for Snap/Pipeline validation.

Default value: None

Example: 2

Filter expression

String/Expression

The condition that is used for filtering the table records.

Default value: None

Example: ForumName = :val1

Expression attribute values

Specify the placeholders for the Expression Attribute Names and/or Expression Attribute Values.

Example: If your table contains a column named UUID (a reserved word) and you want to read a value from the UUID column, then you must assign a placeholder for the column name because you cannot use a reserved word directly in your expression. You can define the Attribute #u, leave the Type blank, and enter the value as UUID. In the Snap Filter expression condition, enter Set #u=:val1. :val1 is the placeholder for the value in the table which is defined as Attribute :val1 of Type B with ValuedGhpcyB0ZXh0I.

Note: DynamoDB reserves certain words and they are called reserved words. You must not use reserved words as attribute names in expressions. If you must write an expression that contains a word that conflicts with a DynamoDB reserved word, then you can define an expression attribute name to use in the place of the reserved word. For more information, see Expression Attribute Names. Similarly, you cannot use certain values as attribute values in expressions and instead must define an expression attribute name. For more information, see Expression Attribute Values.
Attribute

String/Expression
The expression attribute name. Begins with a # for names and : for values.

Default value: None

Example: :val1, #U

Type

String/Expression
The attribute type. Blank for Expression Attribute Names. S for string, N for number, and so on, for Values.

Default value: None

Example: B

Value

String/Expression
The actual literal to be used in the scan condition.

Default value: None

Example: 13, UUID

Snap execution

Dropdown list
Choose one of the three modes in which the Snap executes. Available options are:
  • Validate & Execute: Performs limited execution of the Snap and generates a data preview during pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during pipeline runtime.
  • Execute only: Performs full execution of the Snap during pipeline execution without generating preview data.
  • Disabled: Disables the Snap and all Snaps that are downstream from it.

Default value: Execute only

DynamoDB complex types

DynamoDB supports the following complex types:

Sets

String Set [SS]

A values of this type contains a set of strings delimited by double quotes as follows:

Pattern: [String object 1, String object 2, ........, String Object n]

Example: ["Snaplogic", "San Mateo", "Pipeline"]

Number Set [NS]

A value of this type contains a set of numbers delimited by double quotes as follows:

Pattern: [Number Obj1, Number Object2,...., Number Object n]

Example: ["123", "24.56", "-35", "-21.456","0"]

Binary Set [BS]

A value of this type contains a set of base64-encoded binary data objects delimited by double quotes as follows:

Pattern: [ Binary Object 1, Binary Object 2,...Binary Object n]

Example: ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]

List (L)

A value of this type contains a set of objects. Each object further can be of any type (String, Number, String Set, Map, List etc.,). In general, the List object resembles a JSON array.

Pattern: [ object 1, object 2, ........, Object n]

Example: [{"N":"3"},{"S":"-7.5"},{"B":"U3Vubnk="},{"L":[{"N":"-45.56"},{"M":{"Name":{"S":"ahmed"}}}]}, {"M":{"name":{"S":"syed"}}},{"SS":["a","b"]},{"BS":["U3Vubnk="]},{"NS":["23","45"]}]

Map (M)

A value of this type contains a set of key-value pairs. Keys are always strings, whereas values can be of any type (String, Number, String Set, Map, List etc.,). In general, the Map object resembles a JSON array.

Pattern: {"Key1":Object1, "Key2": Object2......"Keyn": Objectn}

Example: {"id":{"S":"snaplogic"}, "orgs":{"L":[{"S":"uat"}, {"S":"qa"}]}, "admins":{"L":[{"M":{"name":{"S":"a"}}}, {"M":{"name":{"S":"45"}}}]}}

Using the Binary Set types for the DynamoDB Scan Snap:


Pipeline using Binary Set types


Set types output preview