DatabaseMigrationService / Client / describe_table_statistics
describe_table_statistics#
- DatabaseMigrationService.Client.describe_table_statistics(**kwargs)#
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 DMS last updated the table statistics record for a table. It does not indicate the time of the last update to the table.
See also: AWS API Documentation
Request Syntax
response = client.describe_table_statistics( ReplicationTaskArn='string', MaxRecords=123, Marker='string', Filters=[ { 'Name': 'string', 'Values': [ 'string', ] }, ] )
- Parameters:
ReplicationTaskArn (string) –
[REQUIRED]
The Amazon Resource Name (ARN) of the replication task.
MaxRecords (integer) –
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.
Marker (string) – 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
.Filters (list) –
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.
(dict) –
Identifies the name and value of a filter object. This filter is used to limit the number and type of DMS objects that are returned for a particular
Describe*
call or similar operation. Filters are used as an optional parameter for certain API operations.Name (string) – [REQUIRED]
The name of the filter as specified for a
Describe*
or similar operation.Values (list) – [REQUIRED]
The filter value, which can specify one or more values used to narrow the returned results.
(string) –
- Return type:
dict
- Returns:
Response Syntax
{ 'ReplicationTaskArn': 'string', 'TableStatistics': [ { 'SchemaName': 'string', 'TableName': 'string', 'Inserts': 123, 'Deletes': 123, 'Updates': 123, 'Ddls': 123, 'AppliedInserts': 123, 'AppliedDeletes': 123, 'AppliedUpdates': 123, 'AppliedDdls': 123, 'FullLoadRows': 123, 'FullLoadCondtnlChkFailedRows': 123, 'FullLoadErrorRows': 123, 'FullLoadStartTime': datetime(2015, 1, 1), 'FullLoadEndTime': datetime(2015, 1, 1), 'FullLoadReloaded': True|False, 'LastUpdateTime': datetime(2015, 1, 1), 'TableState': 'string', 'ValidationPendingRecords': 123, 'ValidationFailedRecords': 123, 'ValidationSuspendedRecords': 123, 'ValidationState': 'string', 'ValidationStateDetails': 'string' }, ], 'Marker': 'string' }
Response Structure
(dict) –
ReplicationTaskArn (string) –
The Amazon Resource Name (ARN) of the replication task.
TableStatistics (list) –
The table statistics.
(dict) –
Provides a collection of table statistics in response to a request by the
DescribeTableStatistics
operation.SchemaName (string) –
The schema name.
TableName (string) –
The name of the table.
Inserts (integer) –
The number of insert actions performed on a table.
Deletes (integer) –
The number of delete actions performed on a table.
Updates (integer) –
The number of update actions performed on a table.
Ddls (integer) –
The data definition language (DDL) used to build and modify the structure of your tables.
AppliedInserts (integer) –
The number of insert actions applied on a target table.
AppliedDeletes (integer) –
The number of delete actions applied on a target table.
AppliedUpdates (integer) –
The number of update actions applied on a target table.
AppliedDdls (integer) –
The number of data definition language (DDL) statements used to build and modify the structure of your tables applied on the target.
FullLoadRows (integer) –
The number of rows added during the full load operation.
FullLoadCondtnlChkFailedRows (integer) –
The number of rows that failed conditional checks during the full load operation (valid only for migrations where DynamoDB is the target).
FullLoadErrorRows (integer) –
The number of rows that failed to load during the full load operation (valid only for migrations where DynamoDB is the target).
FullLoadStartTime (datetime) –
The time when the full load operation started.
FullLoadEndTime (datetime) –
The time when the full load operation completed.
FullLoadReloaded (boolean) –
A value that indicates if the table was reloaded (
true
) or loaded as part of a new full load operation (false
).LastUpdateTime (datetime) –
The last time a table was updated.
TableState (string) –
The state of the tables described.
Valid states: Table does not exist | Before load | Full load | Table completed | Table cancelled | Table error | Table is being reloaded
ValidationPendingRecords (integer) –
The number of records that have yet to be validated.
ValidationFailedRecords (integer) –
The number of records that failed validation.
ValidationSuspendedRecords (integer) –
The number of records that couldn’t be validated.
ValidationState (string) –
The validation state of the table.
This parameter can have the following values:
Not enabled – Validation isn’t enabled for the table in the migration task.
Pending records – Some records in the table are waiting for validation.
Mismatched records – Some records in the table don’t match between the source and target.
Suspended records – Some records in the table couldn’t be validated.
No primary key –The table couldn’t be validated because it has no primary key.
Table error – The table wasn’t validated because it’s in an error state and some data wasn’t migrated.
Validated – All rows in the table are validated. If the table is updated, the status can change from Validated.
Error – The table couldn’t be validated because of an unexpected error.
Pending validation – The table is waiting validation.
Preparing table – Preparing the table enabled in the migration task for validation.
Pending revalidation – All rows in the table are pending validation after the table was updated.
ValidationStateDetails (string) –
Additional details about the state of validation.
Marker (string) –
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
.
Exceptions
DatabaseMigrationService.Client.exceptions.ResourceNotFoundFault
DatabaseMigrationService.Client.exceptions.InvalidResourceStateFault
DatabaseMigrationService.Client.exceptions.AccessDeniedFault
Examples
Returns table statistics on the database migration task, including table name, rows inserted, rows updated, and rows deleted.
response = client.describe_table_statistics( Marker='', MaxRecords=123, ReplicationTaskArn='', ) print(response)
Expected Output:
{ 'Marker': '', 'ReplicationTaskArn': '', 'TableStatistics': [ ], 'ResponseMetadata': { '...': '...', }, }