get_table_statuses
Retrieves the tables states of a specific Replicate task for all source tables that match the specified states, table schemas, and table names. This is useful for automation processes, for example, as it allows you to retrieve tables in a certain state (for example, suspended) and then perform an operation on them (for example, ReloadTable).
Required User Role: See Required Enterprise Manager permissions.
Syntax
def get_table_statuses(
self,
server,
task,
schema = None,
table = None,
includequeued = False,
includeloading = False,
includecompleted = False,
includechangeprocessing = False,
includeerror = False):
"""
response payload: AemGetTableStatusesResp
Request parameters
Value | Type | Description |
---|---|---|
server | string |
The Replicate Server name as defined on Qlik Enterprise Manager. Example: myrepsrv1 |
task |
string |
The Replicate task name. |
schema | string |
The default is all source schemas. Specifying a specific schema name will retrieve all tables from the specified schema. Specifying a pattern will retrieve all tables from schemas that match the pattern. For example, specifying ad* will retrieve tables from the adventure and adventuretwo schemas. |
table |
string | The default is all source tables. Specifying a specific table name will retrieve the specified table. Specifying a pattern will retrieve all tables that match the pattern. For example, specifying em* will retrieve the employees and employed tables. |
includequeued |
boolean | Whether to retrieve tables in a queued state. |
includeloading |
boolean | Whether to retrieve tables in a loading state. |
includecompleted |
boolean | Whether to retrieve tables in a completed state. |
includechangeProcessing |
boolean | Whether to retrieve tables in a Change Processing state (that is, tables that are having changes applied to them). |
includeerror |
boolean | Whether to retrieve tables in an error state. |
Return values
AemGetTableStatusesResp
Name | Type | Description |
---|---|---|
TableDetails |
List |
List of table statuses that matches the specified request parameters. |
schema_on_source |
string |
Source schema name. |
table_on_source |
string |
Source table name. |
schema_on_target |
string |
Target schema name. If this information not available, an empty string will be returned. |
table_on_target |
string |
Target table name. If this information not available, an empty string will be returned. |
state |
enum |
An enum reflecting the table state. See state. |
data_errors_count |
int64 |
The number of data errors encountered when replicating the table. |
Name | Type | Description |
---|---|---|
start_time |
string |
Date-time of when the table full load started. Timezone: UTC ; Style: ISO8601 (consistent with AemGetTaskDetails). |
end_time |
string |
Date-time of when the table full load started. Timezone: UTC ; Style: ISO8601 (consistent with AemGetTaskDetails). |
estimated_row_count |
int64 |
Relevant only if table in certain states (loading/queued). |
estimated_end_time |
string |
Relevant only for tables in certain states (loading/queued). Timezone: UTC ; Style: ISO8601 (consistent with GetTaskDetails). Information note
estimated_end_time is always null. You can calculate the approximate end time using the following formula: estimated_end_time = start_time + estimated_row_count * (CurrentTime - start_time)/transferred_row_count |
transferred_row_count |
int64 |
The number of rows transferred to the target, after the source filtering, but before the target filtering. |
transferred_volume_mb |
int64 |
The amount of bytes transferred to the target, after the source filtering, but before the target filtering. |
Name | Type | Description |
---|---|---|
insert_count |
int64 |
The number of records inserted to the target table. |
update_count |
int64 |
The number of records updated in the target table. |
delete_count |
int64 |
The number of records deleted in the target table. |
ddl_count |
int64 |
The number of DDL operations performed on the target table. |
last_update_time |
string |
The last time that the table was updated on target. Timezone: UTC ; Style: ISO8601 (consistent with AemGetTaskDetails). |
cached_insert_count |
int64 |
INSERT operations that were cached during Full Load. |
cached_update_count |
int64 |
UPDATE operations that were cached during Full Load. |
cached_delete_count |
int64 |
DELETE operations that were cached during Full Load. |
Errors
All of the general errors as well as the errors listed in the table below.
Error | Message | Description |
---|---|---|
AEM_SERVER_NOT_FOUND |
Replicate server {server} could not be found. | Server name unknown to Qlik Enterprise Manager. |
AEM_TASK_NOT_FOUND |
Replicate task {task} on server {server} could not be found. |
The task name is unknown to Enterprise Manager. |
AEM_TABLE_STATUSES_INNER_ERR |
Failed to retrieve table statuses for replication task "{task}" on server "{server}". Error: "{message}" |
Returned when the table statuses cannot be retrieved. |