Skip to content

start_column_statistics_task_run

start_column_statistics_task_run(
    database_name: NameString,
    table_name: NameString,
    role: NameString,
    *,
    config_overrides: Optional[GlueClientConfig] = None,
    column_name_list: Optional[ColumnNameList] = None,
    sample_size: Optional[SampleSizePercentage] = None,
    catalog_id: Optional[CatalogIdString] = None,
    security_configuration: Optional[NameString] = None,
) -> StartColumnStatisticsTaskRunResponse

Starts a column statistics task run, for a specified table and columns.

Parameters:

  • database_name (NameString) –

    The name of the database where the table resides.

  • table_name (NameString) –

    The name of the table to generate statistics.

  • column_name_list (Optional[ColumnNameList], default: None ) –

    A list of the column names to generate statistics. If none is supplied, all column names for the table will be used by default.

  • role (NameString) –

    The IAM role that the service assumes to generate statistics.

  • sample_size (Optional[SampleSizePercentage], default: None ) –

    The percentage of rows used to generate statistics. If none is supplied, the entire table will be used to generate stats.

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

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

  • security_configuration (Optional[NameString], default: None ) –

    Name of the security configuration that is used to encrypt CloudWatch logs for the column stats task run.

Raises:

Source code in docs_src/capo_glue/_services/glue.py
def start_column_statistics_task_run(
    self,
    database_name: "capo_glue.types.name_string.NameString",
    table_name: "capo_glue.types.name_string.NameString",
    role: "capo_glue.types.name_string.NameString",
    *,
    config_overrides: Optional[GlueClientConfig] = None,
    column_name_list: Optional[
        "capo_glue.types.column_name_list.ColumnNameList"
    ] = None,
    sample_size: Optional[
        "capo_glue.types.sample_size_percentage.SampleSizePercentage"
    ] = None,
    catalog_id: Optional[
        "capo_glue.types.catalog_id_string.CatalogIdString"
    ] = None,
    security_configuration: Optional[
        "capo_glue.types.name_string.NameString"
    ] = None,
) -> "capo_glue.types.start_column_statistics_task_run_response.StartColumnStatisticsTaskRunResponse":
    """<p>Starts a column statistics task run, for a specified table and columns.</p>

    Args:
        database_name: <p>The name of the database where the table resides.</p>
        table_name: <p>The name of the table to generate statistics.</p>
        column_name_list: <p>A list of the column names to generate statistics. If none is supplied, all column names for the table will be used by default.</p>
        role: <p>The IAM role that the service assumes to generate statistics.</p>
        sample_size: <p>The percentage of rows used to generate statistics. If none is supplied, the entire table will be used to generate stats.</p>
        catalog_id: <p>The ID of the Data Catalog where the table reside. If none is supplied, the Amazon Web Services account ID is used by default.</p>
        security_configuration: <p>Name of the security configuration that is used to encrypt CloudWatch logs for the column stats task run.</p>

    Raises:
        capo_glue.errors.access_denied_exception.AccessDeniedException: <p>Access to a resource was denied.</p>
        capo_glue.errors.column_statistics_task_running_exception.ColumnStatisticsTaskRunningException: <p>An exception thrown when you try to start another job while running a column stats generation job.</p>
        capo_glue.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist</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.resource_number_limit_exceeded_exception.ResourceNumberLimitExceededException: <p>A resource numerical limit was exceeded.</p>
        capo_glue.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_glue.types.start_column_statistics_task_run_request.StartColumnStatisticsTaskRunRequest]",
    ) -> OperationResponse[
        "capo_glue.types.start_column_statistics_task_run_response.StartColumnStatisticsTaskRunResponse"
    ]:
        import capo_glue._operations.aws_glue.start_column_statistics_task_run

        output, http_response = (
            capo_glue._operations.aws_glue.start_column_statistics_task_run.start_column_statistics_task_run(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartColumnStatisticsTaskRun")
    )
    input_: capo_glue.types.start_column_statistics_task_run_request.StartColumnStatisticsTaskRunRequest = {
        "database_name": database_name,
        "table_name": table_name,
        "role": role,
    }
    if column_name_list is not None:
        input_["column_name_list"] = column_name_list
    if sample_size is not None:
        input_["sample_size"] = sample_size
    if catalog_id is not None:
        input_["catalog_id"] = catalog_id
    if security_configuration is not None:
        input_["security_configuration"] = security_configuration

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