Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On this Page

Table of Contents
maxLevel2
excludeOlder Versions|Additional Resources|Related Links|Related Information

Snap type:

Write


Description:

This Snap provides the ability to update the data in DynamoDB table. The table becomes suggestible once the account is defined.

  • Expected upstream SnapsAny Snap that provides a document output view, such as Structure or a JSON Generator Snap. 
  • Expected downstream SnapsAny Snap that has a document input view, such as Filter or Data or JSON Formatter.
  • Expected inputThe table's key schema is suggested on input view. The attribute values for the attributes of the key of the record are passed from input view.
  • Expected outputThis Snap provides the updated record for each input record. Errors can be routed to the error view if enabled or cause the Snap to fail during execution.


Prerequisites:

None


Support and limitations:Ultra pipelines: Works

Works in Ultra

Pipelines.Spark mode: Not supported in /wiki/spaces/SD/pages/1437917 mode

Task Pipelines.

Account: 

This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. 

See DynamoDB Account for information on setting up this type of account.


Views:


InputThis Snap has exactly one document input view.
OutputThis Snap has exactly one document output view.
ErrorThis Snap has at most one document error view and produces zero or more documents in the view.


Settings

Label


Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline.

Table name


Required. The name of the table to write the data into. This property is suggestible, which shows the list of the tables in db.
Example: Thread
Default value: [None]


Update expression

An expression that defines one or more attributes to be updated.
Example: set LastPostDateTime = :val1
Default value: [None]


Conditional expression

A condition that must be satisfied in order for the update to succeed.
ExampleLastPostDateTime = :val1
Default value: None


Expression attribute values

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


Info

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.

Click + to enter:

  • Attribute: The expression attribute name. Begins with a # for names and : for values. 
  • Type: The attribute type. Blank for Expression Attribute Names. S for string, N for number, and so on, for Values.
  • Value: The actual literal to be used in the update condition.

Example

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


Attribute
 Type
Value
 #u UUID

Multiexcerpt include macro
nameSnap Execution
pageSOAP Execute

Multiexcerpt include macro
nameExecution_Detail_Write
pageSOAP Execute


Expand
title DynamoDB Complex types

DynamoDB Complex types:

  • Sets
  • Lists
  • Map


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"}}}]}}


The pipeline using the List types for the Update Snap:


 



 

Examples


The following image shows a sample pipeline:

 


The following image shows the mappings of the Mapper Snap that feeds into the DynamoDB Update Snap:



Insert excerpt
DynamoDB Snap Pack
DynamoDB Snap Pack
nopaneltrue