Skip to main content Skip to complementary content

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

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.
Warning noteWhile it is possible to set a table state parameter to "false", doing so will have no effect. Therefore, if you are only interested in specific states, set the desired states to "true" rather than setting the unwanted states to "false". For example, setting includecompleted=false and includechangeprocessing=false will not work as expected (all table states will be returned). However, setting includeloading=true, includeerror=true, and includequeued=true will return the desired states. Additionally, omitting the state parameters is the same as setting all parameters to "true" so if you want to see all states, simply omit the parameters.

Return values

AemGetTableStatusesResp

General return values
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.

table_full_load_info return values
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.

table_cdc_info return values
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 responses
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.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!