Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION

How to get started with the Amazon DynamoDB connector in Qlik Application Automation

100% helpful (1/1)
cancel
Showing results for 
Search instead for 
Did you mean: 
Yamini-Singh
Support
Support

How to get started with the Amazon DynamoDB connector in Qlik Application Automation

Last Update:

Aug 20, 2024 9:49:37 AM

Updated By:

Yamini-Singh

Created date:

Jul 10, 2024 3:46:10 AM

Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. You can use Amazon DynamoDB connector to make changes and perform various action on database tables and items within those tables, specific to a region or global.

This article explains how the Amazon DynamoDB connector in Qlik Application Automation can be used within Qlik Cloud.

 

Content

 

Authentication

AWS Setup

By default, users and roles don't have permission to create or modify DynamoDB resources. They cannot perform tasks using the AWS Management Console, AWS Command Line Interface (AWS CLI), or AWS API. To grant users permission to perform actions on the resources that they need, an IAM administrator can create IAM policies. The administrator can then add the IAM policies to roles, and users can assume the roles.

To learn how to create an IAM identity-based policy by using these sample JSON policy documents, see Creating IAM policies in the IAM User Guide.

  1. Open the AWS console
  2. Navigate to Identity and Access Management (IAM) 
  3. Click Create User and enter the new username. 

    Optionally, you can also give separate console access to the user.

     

    YaminiSingh_0-1719920218274.png

     

  4. In the Create User editor, you can select one of the three options.

    For our example, let’s select the highlighted option Attach policies directly.

    YaminiSingh_1-1719920218256.png

     

  5. Scroll down. In the Permissions Policies text box, type and search for DynamoDB Full Access

    YaminiSingh_7-1719920842314.png

     

  6. (Optional) Expand Set permissions boundary - optional and set Use permissions boundary to control the maximum permissions 

    Review the on-screen text for details.

    YaminiSingh_3-1719920217853.png

     

  7. Review and create user.
  8. Navigate to the Security Credentials tab.
  9. Click Create Access Key.

    YaminiSingh_4-1719920218267.png

     

  10. For Use Case, click Third-party service and follow the recommendations. A description tag is optional.
  11. Click Create Access Key
  12. Copy the Access Key and Secret Access Key values.

    Store them safely. The Secret Access Key will only be shown once. See Access key best practices onscreen. 

    YaminiSingh_5-1719920217852.png

     

Qlik Cloud

  1. Open Qlik Cloud
  2. Navigate to My Automations

    YaminiSingh_8-1719920919883.png

     

  3. Switch to the Connections tab

    YaminiSingh_9-1719920919883.png

     

  4. Click Add new connection.
  5. Search for Amazon DynamoDB and click Add.

    YaminiSingh_12-1719921003775.png

     

  6. Provide the access key and secret access key and specify where your AWS region is located.

    YaminiSingh_13-1719921073823.png

     

Available blocks

The Amazon DynamoDB connector consists of the following blocks:

  • Create Table
  • Create Global Table
  • Delete Table
  • Get Table
  • Get Global Table
  • List Global Tables
  • List Tables
  • Put Item
  • Get Item
  • Update Item
  • Delete Item
  • Execute Statement
  • Execute Transaction
  • Import Table
  • Query
  • Update Table

Use Cases

The Amazon DynamoDB connector's Put/Update Item blocks can be programed for diverse tasks including:

  • Writeback to the DB restricted to the outside world
  • Extract and transform data within pipelines

Writeback to the DB restricted to the outside world

The Amazon DynamoDB connector allows you to write back App data to the source database. If clients do not have access to their firm's database, the company may offer an update on the Item. We can utilize the Put/Update blocks which can then update the database.

Refer to How to build a write back solution with native Qlik Sense components and Qlik Application Automation for instructions on how to configure the writeback. In the automation, instead of using the JIRA connector.

Use the Amazon DynamoDB connector's Put Item/Update Item block, as illustrated:

       YaminiSingh_0-1720603011230.png

 

More Information

What's the difference between Put v/s Update Item blocks?

Update Item

Edits an existing item's attributes, or adds a new item to the table if it does not already exist. You can put, delete, or add attribute values. You can also perform a conditional update on an existing item (insert a new attribute name-value pair if it doesn't exist, or replace an existing name-value pair if it has certain expected attribute values).

*In API terms, this endpoint behaves like a PATCH method which can perform partial updates.

Put Item

Creates a new item, or replaces an old item with a new item. If an item that has the same primary key as the new item already exists in the specified table, the new item completely replaces the existing item. You can perform a conditional put operation (add a new item if one with the specified primary key doesn't exist), or replace an existing item if it has certain attribute values. You can return the item's attribute values in the same operation, using the ReturnValues parameter.

More on Input Parameters

Condition Expressions

To manipulate data in an Amazon DynamoDB table, you use the 'Put Item', 'Update Item' etc. operations.

For these data manipulation operations, you can specify a condition expression to determine which items should be modified. If the condition expression evaluates to true, the operation succeeds; otherwise, the operation fails.

Update Expression

An expression that defines one or more attributes to be updated, the action to be performed on them, and new values for them.

Expression Attribute Values

One or more values that can be substituted in an expression.

Examples of Update Expressions, Conditions Expressions, and Expression Attribute Values:

  • An example which changes an existing email of fred@example.com to newEmail@example.com:

    YaminiSingh_1-1720008644311.png

  • An example which updates when either of 'ForumName' is not "Amazon DynamoDB" or when 'Subject' is not equal to "How do I update multiple items?"

    YaminiSingh_2-1720008786508.png
Tags (1)
Labels (2)
Version history
Last update:
‎2024-08-20 09:49 AM
Updated by: