
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to get started with the Amazon DynamoDB connector in Qlik Application Automation
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
- Qlik Cloud
- Available blocks
- Use Cases
- Writeback to the DB restricted to the outside world
- More Information
- What's the difference between Put v/s Update Item blocks?
- Update Item
- Put Item
- More on Input Parameters
- Condition Expressions
- Update Expression
- Expression Attribute Values
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.
- Open the AWS console
- Navigate to Identity and Access Management (IAM)
- Click Create User and enter the new username.
Optionally, you can also give separate console access to the user.
- 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. - Scroll down. In the Permissions Policies text box, type and search for DynamoDB Full Access.
- (Optional) Expand Set permissions boundary - optional and set Use permissions boundary to control the maximum permissions
Review the on-screen text for details. - Review and create user.
- Navigate to the Security Credentials tab.
- Click Create Access Key.
- For Use Case, click Third-party service and follow the recommendations. A description tag is optional.
- Click Create Access Key
- 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.
Qlik Cloud
- Open Qlik Cloud
- Navigate to My Automations
- Switch to the Connections tab
- Click Add new connection.
- Search for Amazon DynamoDB and click Add.
- Provide the access key and secret access key and specify where your AWS region is located.
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:
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:
- 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?"