Skip to content

describe_table_statistics

describe_table_statistics(
    replication_task_arn: String,
    *,
    config_overrides: Optional[DatabaseMigrationServiceClientConfig] = None,
    max_records: Optional[IntegerOptional] = None,
    marker: Optional[String] = None,
    filters: Optional[FilterList] = None,
) -> DescribeTableStatisticsResponse

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.

Parameters:

  • replication_task_arn (String) –

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

  • max_records (Optional[IntegerOptional], default: None ) –

    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 (Optional[String], default: None ) –

    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 (Optional[FilterList], default: None ) –

    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.

Raises:

Examples:

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

>>> client.describe_table_statistics(replication_task_arn='', max_records=123, marker='')
Source code in docs_src/capo_database_migration_service/_services/database_migration_service.py
def describe_table_statistics(
    self,
    replication_task_arn: "capo_database_migration_service.types.string.String",
    *,
    config_overrides: Optional[DatabaseMigrationServiceClientConfig] = None,
    max_records: Optional[
        "capo_database_migration_service.types.integer_optional.IntegerOptional"
    ] = None,
    marker: Optional["capo_database_migration_service.types.string.String"] = None,
    filters: Optional[
        "capo_database_migration_service.types.filter_list.FilterList"
    ] = None,
) -> "capo_database_migration_service.types.describe_table_statistics_response.DescribeTableStatisticsResponse":
    """<p>Returns table statistics on the database migration task, including table name, rows inserted, rows updated, and rows deleted.</p> <p>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.</p>

    Args:
        replication_task_arn: <p>The Amazon Resource Name (ARN) of the replication task.</p>
        max_records: <p> The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that the remaining results can be retrieved. </p> <p>Default: 100</p> <p>Constraints: Minimum 20, maximum 500.</p>
        marker: <p> 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 <code>MaxRecords</code>. </p>
        filters: <p>Filters applied to table statistics.</p> <p>Valid filter names: schema-name | table-name | table-state</p> <p>A combination of filters creates an AND condition where each record matches all specified filters.</p>

    Raises:
        capo_database_migration_service.errors.access_denied_fault.AccessDeniedFault: <p>DMS was denied access to the endpoint. Check that the role is correctly configured.</p>
        capo_database_migration_service.errors.invalid_resource_state_fault.InvalidResourceStateFault: <p>The resource is in a state that prevents it from being used for database migration.</p>
        capo_database_migration_service.errors.resource_not_found_fault.ResourceNotFoundFault: <p>The resource could not be found.</p>
        capo_database_migration_service.errors.UnknownServiceError: The service returned an error code this client does not model.

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

        >>> client.describe_table_statistics(replication_task_arn='', max_records=123, marker='')
    """

    def _handler(
        req: "OperationRequest[capo_database_migration_service.types.describe_table_statistics_message.DescribeTableStatisticsMessage]",
    ) -> OperationResponse[
        "capo_database_migration_service.types.describe_table_statistics_response.DescribeTableStatisticsResponse"
    ]:
        import capo_database_migration_service._operations.amazon_dm_sv20160101.describe_table_statistics

        output, http_response = (
            capo_database_migration_service._operations.amazon_dm_sv20160101.describe_table_statistics.describe_table_statistics(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeTableStatistics")
    )
    input_: capo_database_migration_service.types.describe_table_statistics_message.DescribeTableStatisticsMessage = {
        "replication_task_arn": replication_task_arn
    }
    if max_records is not None:
        input_["max_records"] = max_records
    if marker is not None:
        input_["marker"] = marker
    if filters is not None:
        input_["filters"] = filters

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output