With version 3.4.0 of Vizlib Writeback Table, you can choose whether to enable locking for a single destination, or add the destination to a Lock Group. This article shows you how to set up a lock group in the Vizlib Management Console (VMC) and apply it to a destination.
TABLE OF CONTENTS
Lock groups are used to consolidate the locking function for all destinations in a group. This can be useful when multiple destinations are writing back to the same data target (e.g. a database table). If a lock is applied to a destination, other destinations will continue working with data that may not reflect the current state of the data target. This can lead to integrity issues with the source data. By allocating these destinations to a Lock group, all destinations are locked when one of the destinations is locked (either auto-lock during an operation, or applying a lock in the app).
Add a Lock Group
To add a lock group, follow these steps (Figure 1).
- Open Writeback Settings in the VMC and click Lock Groups.
- Enter a Name and set the Access and Security level.
- Click Add Lock Group. The lock group should be added to the list in the VMC.
Figure 1: Add Lock Group
Enabling a Lock Group for a Destination
You can find and enable a lock group by following these steps (Figure 1).
- Open the destination settings and scroll to the Locking section.
- Select Allow Locking, then Use Lock Group.
- Choose one of the options in the dropdown to add the destination to the lock group.
- Save the destination settings (this example uses Add Destination).
Figure 2: Enable Lock Group
Lock Group Security Rules
You can specify which users can use a lock group by adding a security rule in the VMC (Figure 3).
- Open the Security Rules page in the VMC.
- Click on New Rule to open the screen.
- Select Lock Group as the Resource Type, then add a Description.
- Select the Resource ID (the lock group name), and an Access Level.
- Select an Attribute Type, Operator and add a Value.
- Click Create Security Rule to finish. It will be displayed in the list on the Security Rules page.
Figure 3: Security Rules
You can find out more information on security rules here.
If you choose an Insert writeback operation for your destination, or a REST destination type, the Locking panel will display a choice of Concurrency mode - Queue or Auto-Lock (Figure 4). Choosing Auto-Lock will mean the destination is locked when an operation completes. As an example, user B cannot insert any changes until the operation triggered by user A finishes and reloads. This could mean user B's operation fails if multiple reloads cause an error in Qlik Sense.
Figure 4: Queue
Queue is designed to make it easier to support multiple users inserting data into the same destination. If multiple users start a writeback operation, the reload is held until all user operations are completed. In addition, users receive real-time updates on the status of the queue within the app (e.g. 2 updates left to complete before reload).