Skip to content

update_table async

update_table(
    database_name: NameString,
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    catalog_id: Optional[CatalogIdString] = None,
    name: Optional[NameString] = None,
    table_input: Optional[TableInput] = None,
    skip_archive: Optional[BooleanNullable] = None,
    transaction_id: Optional[TransactionIdString] = None,
    version_id: Optional[VersionString] = None,
    view_update_action: Optional[ViewUpdateAction] = None,
    force: Optional[Boolean] = None,
    update_open_table_format_input: Optional[UpdateOpenTableFormatInput] = None,
) -> UpdateTableResponse

Updates a metadata table in the Data Catalog.

Parameters:

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

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

  • database_name (NameString) –

    The name of the catalog database in which the table resides. For Hive compatibility, this name is entirely lowercase.

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

    The unique identifier for the table within the specified database that will be created in the Glue Data Catalog.

  • table_input (Optional[TableInput], default: None ) –

    An updated TableInput object to define the metadata table in the catalog.

  • skip_archive (Optional[BooleanNullable], default: None ) –

    By default, UpdateTable always creates an archived version of the table before updating it. However, if skipArchive is set to true, UpdateTable does not create the archived version.

  • transaction_id (Optional[TransactionIdString], default: None ) –

    The transaction ID at which to update the table contents.

  • version_id (Optional[VersionString], default: None ) –

    The version ID at which to update the table contents.

  • view_update_action (Optional[ViewUpdateAction], default: None ) –

    The operation to be performed when updating the view.

  • force (Optional[Boolean], default: None ) –

    A flag that can be set to true to ignore matching storage descriptor and subobject matching requirements.

  • update_open_table_format_input (Optional[UpdateOpenTableFormatInput], default: None ) –

    Input parameters for updating open table format tables in GlueData Catalog, serving as a wrapper for format-specific update operations such as Apache Iceberg.

Raises:

Source code in docs_src/capo_glue/_services/async_glue.py
async def update_table(
    self,
    database_name: "capo_glue.types.name_string.NameString",
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    catalog_id: Optional[
        "capo_glue.types.catalog_id_string.CatalogIdString"
    ] = None,
    name: Optional["capo_glue.types.name_string.NameString"] = None,
    table_input: Optional["capo_glue.types.table_input.TableInput"] = None,
    skip_archive: Optional[
        "capo_glue.types.boolean_nullable.BooleanNullable"
    ] = None,
    transaction_id: Optional[
        "capo_glue.types.transaction_id_string.TransactionIdString"
    ] = None,
    version_id: Optional["capo_glue.types.version_string.VersionString"] = None,
    view_update_action: Optional[
        "capo_glue.types.view_update_action.ViewUpdateAction"
    ] = None,
    force: Optional["capo_glue.types.boolean.Boolean"] = None,
    update_open_table_format_input: Optional[
        "capo_glue.types.update_open_table_format_input.UpdateOpenTableFormatInput"
    ] = None,
) -> "capo_glue.types.update_table_response.UpdateTableResponse":
    """<p>Updates a metadata table in the Data Catalog.</p>

    Args:
        catalog_id: <p>The ID of the Data Catalog where the table resides. If none is provided, the Amazon Web Services account ID is used by default.</p>
        database_name: <p>The name of the catalog database in which the table resides. For Hive compatibility, this name is entirely lowercase.</p>
        name: <p>The unique identifier for the table within the specified database that will be created in the Glue Data Catalog.</p>
        table_input: <p>An updated <code>TableInput</code> object to define the metadata table in the catalog.</p>
        skip_archive: <p>By default, <code>UpdateTable</code> always creates an archived version of the table before updating it. However, if <code>skipArchive</code> is set to true, <code>UpdateTable</code> does not create the archived version.</p>
        transaction_id: <p>The transaction ID at which to update the table contents. </p>
        version_id: <p>The version ID at which to update the table contents. </p>
        view_update_action: <p>The operation to be performed when updating the view.</p>
        force: <p>A flag that can be set to true to ignore matching storage descriptor and subobject matching requirements.</p>
        update_open_table_format_input: <p>Input parameters for updating open table format tables in GlueData Catalog, serving as a wrapper for format-specific update operations such as Apache Iceberg.</p>

    Raises:
        capo_glue.errors.already_exists_exception.AlreadyExistsException: <p>A resource to be created or added already exists.</p>
        capo_glue.errors.concurrent_modification_exception.ConcurrentModificationException: <p>Two processes are trying to modify a resource simultaneously.</p>
        capo_glue.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist</p>
        capo_glue.errors.federation_source_exception.FederationSourceException: <p>A federation source failed.</p>
        capo_glue.errors.federation_source_retryable_exception.FederationSourceRetryableException: <p>A federation source failed, but the operation may be retried.</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.resource_not_ready_exception.ResourceNotReadyException: <p>A resource was not ready for a transaction.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_glue.types.update_table_request.UpdateTableRequest]",
    ) -> AsyncOperationResponse[
        "capo_glue.types.update_table_response.UpdateTableResponse"
    ]:
        import capo_glue._operations.aws_glue.update_table

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateTable")
    )
    input_: capo_glue.types.update_table_request.UpdateTableRequest = {
        "database_name": database_name
    }
    if catalog_id is not None:
        input_["catalog_id"] = catalog_id
    if name is not None:
        input_["name"] = name
    if table_input is not None:
        input_["table_input"] = table_input
    if skip_archive is not None:
        input_["skip_archive"] = skip_archive
    if transaction_id is not None:
        input_["transaction_id"] = transaction_id
    if version_id is not None:
        input_["version_id"] = version_id
    if view_update_action is not None:
        input_["view_update_action"] = view_update_action
    if force is not None:
        input_["force"] = force
    if update_open_table_format_input is not None:
        input_["update_open_table_format_input"] = update_open_table_format_input

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