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
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 or letters included in the schema name will retrieve all tables from schemas that match the pattern or that include the specified letters. For example, specifying "ad" will retrieve tables from the "adventure" and "trademark" schemas. |
Table |
string | The default is all source tables. Specifying a specific table name will retrieve the specified table. Specifying a pattern or letters included in the table name will retrieve all tables that match the pattern or that include the specified letters. For example, specifying "em" will retrieve the "employees" and "temp" 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. |
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. |
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 if table in certain states (loading/queued). |
EstimatedEndTime |
string |
Relevant only if table in certain states (loading/queued). Timezone: UTC ; Style: ISO8601 (consistent with AemGetTaskDetails). |
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. |
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 | 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. |