DynamoDB Bulk Write

DynamoDB Bulk Write

On this Page

Snap type:

Write


Description:

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

  • Expected upstream Snaps: Any Snap that provides a document output view, such as Structure or a JSON Generator Snap.
  • Expected downstream Snaps: Any Snap that has a document input view, such as Filter or Data or JSON Formatter.
  • Expected input: The table schema is suggested on input view. The attribute values for the attributes of the table for each record are passed from input view.
  • Expected output:  This Snap provides the result of the Bulk Write operation for each request. Errors can be routed to the error view if enabled or cause the Snap to fail during execution.
Prerequisites:

[None]


Support and limitations:

Works in Ultra Tasks.

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, that shown the list of the tables in  the DB.
Example: Thread
Default value: [None]


Thread count

This property represents the total number of parallel threads to be created for Bulk Write operation.
Example: 2
Default value: [None]


Batch size

Number of records batched for each request.
Example: 25
Default value: [None]


Request delay

Delay between two successive batch requests in seconds
Example: 5
Default value: [None]


Loading

Loading

Mandatory Path Mappings in upstream Mapper

The DynamoDB Bulk Write Snap expects an upstream Mapper Snap to feed the right mappings between input stream and the DynamoDB table. The Mapper must output a file/document that has the data in a readable and writable form for the DynamoDB Bulk Write Snap to populate the DynamoDB tables. See Examples for more details.

Input stream mappings are mandatory

In the absence of input stream mappings from the upstream (Mapper) Snap, the DynamoDB Bulk Write Snap fails during Pipeline execution.


  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 all the Set types for the Bulk Write Snap:

 

Examples 


Writing CSV data to a DynamoDB table

The following example will illustrate the usage of the DynamoDB BulkWrite Snap. 

In this pipeline, we read a table data using the File Reader Snap and write the data to the table Exampletable using the Dynamo Bulk Write Snap.



The following images shows the CSV input data passed from the File Reader Snap:

 

The Mapper Snap maps the object record details that need to be updated in the input view of the DynamoDB Bulk Write Snap: 



The data is loaded to the DynamoDB table Exampletable.

Successful execution of the above Snap gives the following data preview:

Path mappings in upstream Mapper

The following Pipeline illustrates the path mappings needed for writing multiple records using DynamoDB Bulk Write Snap.

Download this Pipeline.

To write multiple records into a DynamoDB table, you must first define by using the mappings in the Mapper Snap, the mappings between incoming data and the DynamoDB table schema.

  • Ensure the Target path in the Mapping table contains $PutRequest.Item. preceding every mapping entry. This prefix is mandatory to update the DynamoDB table using this Snap.
  • The entry in the target path must follow the syntax: $PutRequest.Item.<column>.<datatype>. , both for creating and updating the respective column in the target table.
  • For any DynamoDB table target, the Target Schema displays only the (primary) key column details irrespective of the number of mappings defined.

Examples

$PutRequest.Item.id.S, $PutRequest.Item.Map.M

The Mapper generates the mappings output for DynamoDB Bulk Write Snap.

After selecting an appropriate account to connect to the DynamoDB database, define the target table name for the DynamoDB Bulk Write Snap.

Upon validation, the DynamoDB Bulk Write Snap generates the output preview similar to the following image. It contains the name of the table to be updated, the columns, and the respective values.

Upon execution, the Pipeline inserts multiple records into the specified DynamoDB table, with values defined in the Mapper output. 

Downloads

Loading

  File Modified

File DynamoDB_BW_Example2_Mandatory_Path_Mappings.slp

Jul 24, 2020 by Anand Vedam

Snap Pack History

 Click to view/expand

Release 

Snap Pack Version

Date

Type

  Updates

November 2025

main33142

Stable

Updated and certified against the current SnapLogic Platform release.

August 2025

main32088

Stable

Updated and certified against the current SnapLogic Platform release.

May 2025

main31019

 

Stable

Updated and certified against the current SnapLogic Platform release.

February 2025

main29887

 

Stable

Updated and certified against the current SnapLogic Platform release.

November 2024

main29029

 

Stable

Updated and certified against the current SnapLogic Platform release.

August 2024

main27765

 

Stable

Updated and certified against the current Snaplogic Platform release.

May 2024

main26341

 

Stable

Updated and certified against the current SnapLogic Platform release.

February 2024

main25112

 

Stable

Updated and certified against the current SnapLogic Platform release.

November 2023

main23721

 

Stable

Updated and certified against the current SnapLogic Platform release.

August 2023

main22460

 


Stable

Updated and certified against the current SnapLogic Platform release.

May 2023

main21015

 

Stable

Upgraded with the latest SnapLogic Platform release.

February 2023

main19844

 

Stable

Upgraded with the latest SnapLogic Platform release.

January 2023

431patches19383

 

Latest

The DynamoDB Snap Pack supports the IAM role in the DynamoDB account.

November 2022

main18944

 

Stable

Upgraded with the latest SnapLogic Platform release.

430 Patch

430patches18355

 

Latest

The lineage for Ultra Pipelines containing the DynamoDB Bulk Get and DynamoDB Bulk Write Snaps is now preserved only when the Batch Size is 1.

430 Patch

430patches18211

 

Latest

The DynamoDB Bulk Write Snap now does not fail with the Duplicate keys <table-name> are provided error when the Batch size or the Thread count is high.

August 2022

main17386

 

Stable

The DynamoDB Account includes AWS Security Token field to pass the security token when making calls using temporary credentials.

4.29 Patch

429patches16169

 

Latest

Fixed an issue with the DynamoDB Snaps where the Snaps did not route the errors to the error view when the Snap encountered an exception and the Pipeline failed. Now the Snap route the errors to the error view and does not fail when it encounters an exception. If the error view is disabled, Snap stops the execution.

4.29 Patch

429patches15954

 

Latest

Enhanced the DynamoDB Account with AWS Security Token field to pass the security token when making calls using temporary credentials.

4.29

main15993

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.28

main14627

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.27

main12833

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.26

426patches11593

 

Latest

Fixed an issue with the DynamoDB Update Snap, where the data type conversion for input keys caused an error.

4.26

main11181

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.25

425patches10571

 

Latest

Updated the AWS SDK from version 1.11.688 to 1.11.1010 in the DynamoDB Snap Pack and added a custom SnapLogic User Agent header value.

4.25

main9554

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.24 Patch

424patches9031

 

Latest

  • Supports autoscaling by adding retry logic with exponential backoff to the Snaps.

  • Enhanced the Dynamo DB Account  to support the expression enabler for account properties and creation of dynamic account.

  • Improved memory consumption in DynamoDB Bulk Write and Bulk Get Snaps.

4.24

main8556

Stable

Upgraded with the latest SnapLogic Platform release.

4.23

main7430

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.22

main6403

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.21 Patch

421patches5851

 

Latest

Removed the Snap timeout setting while waiting for the threads to complete processing.

4.21 Patch

dynamodb8854

 

Latest

Fixed the DynamoDB Scan Snap pagination issue where the second page of output and beyond cannot be accessed during execution and validation.   

4.21

snapsmrc542

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.20 Patch

dynamodb8709

 

Latest

Fixed the DynamoDB Scan Snap and the DynamoDB Update Snap where:

  • The DynamoDB Scan Snap is unable to produce a preview output on validation. (Instead, the Snap passes the output to the downstream Snap.)

  • The DynamoDB Update Snap produces two error documents for the same error during preview output.

4.20

snapsmrc535

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.19

snaprsmrc528

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.18 Patch

MULTIPLE7778

 

Latest

Updated the AWS SDK library version to default to Signature Version 4 Signing process for API requests across all regions.

4.18

snapsmrc523

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.17

ALL7402

 

Latest

Pushed automatic rebuild of the latest version of each Snap Pack to SnapLogic UAT and Elastic servers.

4.17

snapsmrc515

 

Latest

Added the Snap Execution field to all Standard-mode Snaps. In some Snaps, this field replaces the existing Execute during preview check box.

4.16

snapsmrc508

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.15 Patch

dynamodb6670

 

Latest

Added new functionality to the property Expression attribute values in the Delete Table Item, Scan, Update, and Bulk Get Snaps. The property now handles columns that are named after the DynamoDB reserve words.

4.15

snapsmrc500

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.14

snapsmrc490

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.13

snapsmrc486

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.12

snapsmrc480

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.11

snapsmrc465

 

Stable

Added a new DynamoDB Query Snap with Secondary Index support.

4.10 Patch

dynamodb3950

 

Latest

Resolved an issue with the DynamoDB Scan Snap which was not able to perform the scan operation on the table with huge amount of data (Actual description Error executing scan process, 0 after the 4.10 release)

4.10

snapsmrc414

 

Stable

DynamoDB ScanBulk WriteDelete Table Item and Update Snaps support the Set types (Binary, List and Map).

4.9 Patch

dynamodb3329

 

Latest

DynamoDB Scan Snap - Fixed NPE during the Table name support.

4.9

snapsmrc405

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.8

snapsmrc398

 

Stable

  • Added the new Snaps DynamoDB Delete Table and DynamoDB Delete Table Item.

  • Info tab added to accounts.

  • Database accounts now invalidate connection pools if account properties are modified and login attempts fail.

4.7 Patch

dynamodb2557

 

Latest

DynamoDB Bulk Get now writes the original object to error view and output view on error.

4.7 Patch

dynamodb2279

 

Latest

Addressed a issue with generated signatures when non-ASCII data is used and ensured the original document is passed the Error View.

4.7

snapsmrc382

 

Stable

Updated the DynamoDB Bulk Get Snap with the new field, Batch Size.

4.6

snapsmrc362

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.5

snapsmrc344

 

Stable

All database Snaps have had updates in connection pooling.

4.4.1

NA

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.4

NA

 

Stable

  • Resolved an issue with the DynamoDB account not validating if credentials did not have access to ListTables operation.

  • Added expression support to the Where clause property for Select Snaps.

4.3.2

NA

 

Stable

  • DynamoDB Bulk Write Snap now has Batch size and Request delay properties to help control the speed of the bulk write.

4.2.2

NA

NA

Stable

  • Resolved an issue with the DynamoDB Scan Snap throwing an exception if Total segments was provided.

  • Resolved an issue with the DynamoDB Scan Snap not returning the specified attribute names list if Projection expression was set to an attribute name.