Skip to content

update_column_statistics_for_table async

update_column_statistics_for_table(
    database_name: NameString,
    table_name: NameString,
    column_statistics_list: UpdateColumnStatisticsList,
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    catalog_id: Optional[CatalogIdString] = None,
) -> UpdateColumnStatisticsForTableResponse

Creates or updates table statistics of columns.

The Identity and Access Management (IAM) permission required for this operation is UpdateTable.

Parameters:

  • catalog_id (Optional[CatalogIdString], default: None ) –

    The ID of the Data Catalog where the partitions in question reside. If none is supplied, the Amazon Web Services account ID is used by default.

  • database_name (NameString) –

    The name of the catalog database where the partitions reside.

  • table_name (NameString) –

    The name of the partitions' table.

  • column_statistics_list (UpdateColumnStatisticsList) –

    A list of the column statistics.

Raises:

Source code in docs_src/capo_glue/_services/async_glue.py
async def update_column_statistics_for_table(
    self,
    database_name: "capo_glue.types.name_string.NameString",
    table_name: "capo_glue.types.name_string.NameString",
    column_statistics_list: "capo_glue.types.update_column_statistics_list.UpdateColumnStatisticsList",
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    catalog_id: Optional[
        "capo_glue.types.catalog_id_string.CatalogIdString"
    ] = None,
) -> "capo_glue.types.update_column_statistics_for_table_response.UpdateColumnStatisticsForTableResponse":
    """<p>Creates or updates table statistics of columns.</p> <p>The Identity and Access Management (IAM) permission required for this operation is <code>UpdateTable</code>.</p>

    Args:
        catalog_id: <p>The ID of the Data Catalog where the partitions in question reside. If none is supplied, the Amazon Web Services account ID is used by default.</p>
        database_name: <p>The name of the catalog database where the partitions reside.</p>
        table_name: <p>The name of the partitions' table.</p>
        column_statistics_list: <p>A list of the column statistics.</p>

    Raises:
        capo_glue.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist</p>
        capo_glue.errors.glue_encryption_exception.GlueEncryptionException: <p>An encryption operation failed.</p>
        capo_glue.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
        capo_glue.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
        capo_glue.errors.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
        capo_glue.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_glue.types.update_column_statistics_for_table_request.UpdateColumnStatisticsForTableRequest]",
    ) -> AsyncOperationResponse[
        "capo_glue.types.update_column_statistics_for_table_response.UpdateColumnStatisticsForTableResponse"
    ]:
        import capo_glue._operations.aws_glue.update_column_statistics_for_table

        (
            output,
            http_response,
        ) = await capo_glue._operations.aws_glue.update_column_statistics_for_table.async_update_column_statistics_for_table(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateColumnStatisticsForTable")
    )
    input_: capo_glue.types.update_column_statistics_for_table_request.UpdateColumnStatisticsForTableRequest = {
        "database_name": database_name,
        "table_name": table_name,
        "column_statistics_list": column_statistics_list,
    }
    if catalog_id is not None:
        input_["catalog_id"] = catalog_id

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output