Skip to main content Skip to complementary content

GetTableStatuses

General

URL

https://{host}/attunityenterprisemanager/api/v1/servers/{server}/tasks/{task}/tables?action=getstatus&schema={schema}&table={table}&includequeued={includequeued}&includeloading={includeloading}&includecompleted={includecompleted}&includechangeprocessing={includechangeprocessing}&includeerror={includeerror}

Description

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).

Method

GET

Required user role

See Required Enterprise Manager permissions.

Request parameters

Request parameters
Location Name Required Description

Header

EnterpriseManager.APISessionID [string]

Yes

wCo0_KvjEUFROvfHF5KGrw

URL

host [string]

Yes

The host name of the Qlik Enterprise Manager server.

Example: computer.network.net

URL

server [string]

Yes

The Replicate Server name as defined on Qlik Enterprise Manager.

Example: myrepsrv1

URL

task [string]

Yes

The Replicate task name.

URL

schema [string]

No

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.

URL

table [string]

No

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.

URL action=getstatus Yes The actual function to execute.
URL

includequeued [boolean]

No

Whether to retrieve tables in a queued state.

URL

includeloading [boolean]

No

Whether to retrieve tables in a loading state.

URL

includecompleted [boolean]

No

Whether to retrieve tables in a completed state.

URL

includechangeprocessing [boolean]

No

Whether to retrieve tables in a Change Processing state (that is, tables that are having changes applied to them).

URL

includeerror [boolean]

No

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.

Response body

{  
   "table_details":[
     {  
         "schema_on_source":"{string}",
         "table_on_source":"{string}",
         "schema_on_target":"{string}",
         "table_on_target":"{string}",
         "state":"{enum}",
         "data_errors_count":"{int64}",
         "table_full_load_info":{  
            "start_time":"{string}",
            "end_time":"{string}",
            "estimated_row_count":"{int64}",
            "estimated_end_time":"{string}",
            "transferred_row_count":"{int64}",
            "transferred_volume_mb":"{int64}"
         },
         "table_cdc_info":{  
            "insert_count":"{int64}",
            "update_count":"{int64}",
            "delete_count":"{int64}",
            "ddl_count":"{int64}",
            "last_update_time":"{string}",
            "cached_insert_count":"{int64}",
            "cached_update_count":"{int64}",
            "cached_delete_count":"{int64}"
         }
      }
   ]
}

Response parameters

Response parameters
Name Description
schema_on_source

Source schema name.

table_on_source

Source table name.

schema_on_target

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

table_on_target

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

state

An enum reflecting the table state.

See state.

data_errors_count

The number of data errors encountered when replicating the table.

table_full_load_info

-

start_time

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

end_time

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

estimated_row_count

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

estimated_end_time

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

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

transferred_volume_mb

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

End of table_full_load_info

-

table_cdc_info

-

insert_count

The number of records inserted to the target table.

update_count

The number of records updated in the target table.

delete_count

The number of records deleted in the target table.

ddl_count

The number of DDL operations performed on the target table.

last_update_time

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

cached_insert_count

INSERT operations that were cached during Full Load.

cached_update_count

UPDATE operations that were cached during Full Load.

cached_delete_count

DELETE operations that were cached during Full Load.

End of table_cdc_info

-

cURL example

Request

curl -i -k --header "EnterpriseManager.APISessionID: wCo0_KvjEUFROvfHF5KGrw" https://computer.network.net/attunityenterprisemanager/api/v1/servers/{server}/tasks/{task}/tables?action=getstatus

Response

Headers:

HTTP/1.1 200 OK

Cache-Control: no-cache, no-store

Content-Length: 205

Content-Type: application/json; charset=utf-8

Server: Microsoft-HTTPAPI/2.0

Date: Mon, 26 Dec 2016 11:18:53 GMT

Payload

{  
   "table_details":[  
      {  
         "schema_on_source":"myschema1",
         "table_on_source":"mytable1",
         "schema_on_target":"",
         "table_on_target":"",
         "state":"TABLE_CHANGE_PROCESSING",
         "data_errors_count":0,
         "table_full_load_info":{  
            "start_time":"2019-08-05T01:35:06",
            "end_time":"2019-08-05T01:35:06",
            "estimated_row_count":0,
            "estimated_end_time":null,
            "transferred_row_count":4,
            "transferred_volume_mb":1856
         },
         "table_cdc_info":{  
            "insert_count":2,
            "update_count":0,
            "delete_count":0,
            "ddl_count":0,
            "last_update_time":null,
            "cached_insert_count":0,
            "cached_update_count":0,
            "cached_delete_count":0
         }
      },
      {  
         "schema_on_source":"myschema2",
         "table_on_source":"mytable2",
         "schema_on_target":"",
         "table_on_target":"",
         "state":"TABLE_CHANGE_PROCESSING",
         "data_errors_count":0,
         "table_full_load_info":{  
            "start_time":"2019-08-05T01:35:06",
            "end_time":"2019-08-05T01:35:31",
            "estimated_row_count":0,
            "estimated_end_time":null,
            "transferred_row_count":1000000,
            "transferred_volume_mb":464000000
         },
         "table_cdc_info":{  
            "insert_count":0,
            "update_count":4,
            "delete_count":0,
            "ddl_count":0,
            "last_update_time":null,
            "cached_insert_count":0,
            "cached_update_count":0,
            "cached_delete_count":0
      
         }
      }
   ]
}

Errors

All of the general errors as well as the errors listed in the table below.

Error responses
HTTP Code Qlik Enterprise Manager Code Text Description

500

AEM_SERVER_NOT_FOUND

Replicate server {server} could not be found. Server name unknown to Qlik Enterprise Manager.

500

AEM_TASK_NOT_FOUND

Replicate task {task} on server {server} could not be found.

The task name is unknown to Enterprise Manager.

500

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!