Shared Table (3.1)
This section describes the Shared Table profile. This profile enables workflows to share tables for lookups.
Shared Table
Using the Table Lookup Service instead of adding tableCreate
in each workflow will increase the throughput with less duplicated tables, fewer lookups and reduced memory consumption.
The Table Lookup Service comprises a profile in which SQL queries are defined, and two APL functions; one that references the profile and creates a shared table, and one that can be used for refreshing the table data from the APL code.
The Shared Table profile is loaded when you start a workflow that depends on it. Changes to the profile become effective when you restart the workflow and each time you save the profile.
Memory Allocation
There are three different ways to allocate memory for the created tables. By default, the tables are kept as Java objects in memory. The shared tables can also be configured to keep the tables as raw data either on or off the heap. By using raw data, the overhead of java objects is removed and less memory is required.
The type of memory allocation chosen for the shared tables are configured in the Shared Table profile by selecting a Table Storage parameter. If relevant, you can select an Index Storage parameter and also Variable Width Varchar Columns. For further information about these settings, see the section below, Shared Table Profile Configuration.
Shared Table Profile Configuration
The Shared Table profile configuration is opened by clicking on the New Configuration button in Desktop and selecting the Shared Table Profile option.
The Shared Table profile dialog
The contents of the menus in the menu bar may change depending on which configuration type that has been opened.
The Shared Table profile dialog contains the following configurations:
Setting | Description |
---|---|
Database | Click the Browse... button and select the Database profile you want to use. Any type of database that has been configured in a database profile can be used. See /wiki/spaces/MD/pages/3199022 for further information. |
Release Timeout (seconds) | If this check box is selected, the table will be released when the entered number of seconds have passed since the workflows accessing the table were stopped. The entered number of seconds must be larger than 0. If this check box is not selected, the table will stay available until the execution context is restarted. |
Refresh Interval (seconds) | Select this check box in order to refresh the data in the table with the interval entered. The entered number of seconds must be larger than 0. If this check box is not selected, the table will only be refreshed if the APL function Note! The interval for checking if the table needs to be refreshed is 10 seconds, which is the minimum time before a new refresh is performed. If a refresh fails, an error is generated in system log, but the table is not cleared - the old data remains in the shared table. A new refresh is initiated every 10th second, until the refresh has finished successfully. |
Object | Select this option to set the Table Storage to Object. If you select this option, the shared tables are stored as Java objects on the JVM heap. Note! If you have selected to use a profile with the CSV database type, this is the only option available if you have not configured properties using Advanced Connection Setup. |
On Heap | Select this option to set the Table Storage to On Heap. If you select this option, the shared tables are stored in a compact format on the JVM heap. If you select On Heap, you must select an option for the Index Storage. Note! If you have selected to use a profile with the CSV database type, this option is only availabl |