DescribeTableStatistics - AWS Database Migration Service

DescribeTableStatistics

Returns table statistics on the database migration task, including table name, rows inserted, rows updated, and rows deleted.

Note that the "last updated" column the DMS console only indicates the time that AWS DMS last updated the table statistics record for a table. It does not indicate the time of the last update to the table.

Request Syntax

{ "Filters": [ { "Name": "string", "Values": [ "string" ] } ], "Marker": "string", "MaxRecords": number, "ReplicationTaskArn": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Filters

Filters applied to table statistics.

Valid filter names: schema-name | table-name | table-state

A combination of filters creates an AND condition where each record matches all specified filters.

Type: Array of Filter objects

Required: No

Marker

An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.

Type: String

Required: No

MaxRecords

The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.

Default: 100

Constraints: Minimum 20, maximum 500.

Type: Integer

Required: No

ReplicationTaskArn

The Amazon Resource Name (ARN) of the replication task.

Type: String

Required: Yes

Response Syntax

{ "Marker": "string", "ReplicationTaskArn": "string", "TableStatistics": [ { "AppliedDdls": number, "AppliedDeletes": number, "AppliedInserts": number, "AppliedUpdates": number, "Ddls": number, "Deletes": number, "FullLoadCondtnlChkFailedRows": number, "FullLoadEndTime": number, "FullLoadErrorRows": number, "FullLoadReloaded": boolean, "FullLoadRows": number, "FullLoadStartTime": number, "Inserts": number, "LastUpdateTime": number, "SchemaName": "string", "TableName": "string", "TableState": "string", "Updates": number, "ValidationFailedRecords": number, "ValidationPendingRecords": number, "ValidationState": "string", "ValidationStateDetails": "string", "ValidationSuspendedRecords": number } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Marker

An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.

Type: String

ReplicationTaskArn

The Amazon Resource Name (ARN) of the replication task.

Type: String

TableStatistics

The table statistics.

Type: Array of TableStatistics objects

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidResourceStateFault

The resource is in a state that prevents it from being used for database migration.

HTTP Status Code: 400

ResourceNotFoundFault

The resource could not be found.

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of DescribeTableStatistics.

Sample Request

POST / HTTP/1.1 Host: dms.<region>.<domain> x-amz-Date: <Date> Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=contenttype;date;host;user- agent;x-amz-date;x-amz-target;x-amzn- requestid,Signature=<Signature> User-Agent: <UserAgentString> Content-Type: application/x-amz-json-1.1 Content-Length: <PayloadSizeBytes> Connection: Keep-Alive X-Amz-Target: AmazonDMSv20160101.DescribeTableStatistics { "ReplicationTaskArn": "arn:aws:dms:us-west- 2:918017823489:task:WZVIPF3D4AJSNJASB42D4Z7GBE", "SchemaName": "", "TableNames": [ "" ], "MaxRecords": 0, "Marker": "" }

Sample Response

HTTP/1.1 200 OK x-amzn-RequestId: <RequestId> Content-Type: application/x-amz-json-1.1 Content-Length: <PayloadSizeBytes> Date: <Date> { "ReplicationTaskArn": "arn:aws:dms:us-west- 2:918017823489:task:WZVIPF3D4AJSNJASB42D4Z7GBE", "TableStatistics": [ { "SchemaName": "travel", "TableName": "vehicle", "Inserts": 3872, "Deletes": 0, "Updates": 0, "Ddls": 1, "AppliedInserts": 3872, "AppliedDeletes": 0, "AppliedUpdates": 0, "AppliedDdls": 1, "FullLoadRows": 0, "FullLoadCondtnlChkFailedRows": 0, "FullLoadErrorRows": 0, "FullLoadStartTime": 1658436291.83, "FullLoadEndTime": 1658437392.059, "FullLoadReloaded": false, "LastUpdateTime": 1658437401.063, "TableState": "Table completed", "ScheduledForReload": false, "ValidationPendingRecords": 0, "ValidationFailedRecords": 0, "ValidationSuspendedRecords": 0, "ValidationState": "Not enabled" }, { "SchemaName": "travel", "TableName": "drivers", "Inserts": 20, "Deletes": 0, "Updates": 0, "Ddls": 1, "AppliedInserts": 20, "AppliedDeletes": 0, "AppliedUpdates": 0, "AppliedDdls": 1, "FullLoadRows": 0, "FullLoadCondtnlChkFailedRows": 0, "FullLoadErrorRows": 0, "FullLoadStartTime": 1658436291.534, "FullLoadEndTime": 1658436483.802, "FullLoadReloaded": false, "LastUpdateTime": 1658437212.063, "TableState": "Table completed", "ScheduledForReload": false, "ValidationPendingRecords": 0, "ValidationFailedRecords": 0, "ValidationSuspendedRecords": 0, "ValidationState": "Not enabled" }, { "SchemaName": "travel", "TableName": "passengers", "Inserts": 60, "Deletes": 0, "Updates": 0, "Ddls": 1, "AppliedInserts": 60, "AppliedDeletes": 0, "AppliedUpdates": 0, "AppliedDdls": 1, "FullLoadRows": 0, "FullLoadCondtnlChkFailedRows": 0, "FullLoadErrorRows": 0, "FullLoadStartTime": 1658446502.641, "FullLoadEndTime": 1658454293.712, "FullLoadReloaded": false, "LastUpdateTime": 1658454301.153, "TableState": "Table completed", "ScheduledForReload": false, "ValidationPendingRecords": 0, "ValidationFailedRecords": 0, "ValidationSuspendedRecords": 0, "ValidationState": "Not enabled" } ] }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: