Skip to main content Skip to complementary content

GetTableStatuses

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

AemGetTableStatusesResp GetTableStatuses(

string server,

string task,

string schema = null,

string table = null,

bool includequeued = false,

bool includeloading = false,

bool includecompleted = false,

bool includechangeprocessing = false,

bool includeerror = false

)

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.

SchemaOnSource

string

Source schema name.

TableOnSource

string

Source table name.

SchemaOnTarget

string

Target schema name. If this information not available, an empty string will be returned.

TableOnTarget

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.

DataErrorsCount

int64

The number of data errors encountered when replicating the table.

table_full_load_info return values
Name Type Description

StartTime

string

Date-time of when the table full load started. Timezone: UTC ; Style: ISO8601 (consistent with AemGetTaskDetails).

EndTime

string

Date-time of when the table full load started. Timezone: UTC ; Style: ISO8601 (consistent with AemGetTaskDetails).

EstimatedRowCount

int64

Relevant only for tables in certain states (loading/queued).

EstimatedEndTime

string

Relevant only for tables in certain states (loading/queued). Timezone: UTC ; Style: ISO8601 (consistent with AemGetTaskDetails).

Information note

EstimatedEndTime is always null. You can calculate the approximate end time using the following formula:

EstimatedEndTime = start_time + EstimatedRowCount * (CurrentTime - StartTime)/TransferredRowCount

TransferredRowCount

int64

The number of rows transferred to the target, after the source filtering, but before the target filtering.

TransferredVolumeMb

int64

The amount of bytes transferred to the target, after the source filtering, but before the target filtering.

TableCdcInfo return values
Name Type Description

InsertCount

int64

The number of records inserted into the target table.

UpdateCount

int64

The number of records updated in the target table.

DeleteCount

int64

The number of records deleted in the target table.

DdlCount

int64

The number of DDL operations performed on the target table.

LastUpdateTime

string

The last time that the table was updated on target. Timezone: UTC ; Style: ISO8601 (consistent with AemGetTaskDetails).

CachedInsertCount

int64

INSERT operations that were cached during Full Load.

CachedUpdateCount

int64

UPDATE operations that were cached during Full Load.

CachedDeleteCount

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!