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',
]
},
]
)
[REQUIRED]
The Amazon Resource Name (ARN) of the replication task.
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.
MaxRecords
.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.
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.
The name of the filter as specified for a Describe*
or similar operation.
The filter value, which can specify one or more values used to narrow the returned results.
dict
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:
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
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': {
'...': '...',
},
}