Skip to content

import_catalog_to_glue

import_catalog_to_glue(
    *,
    config_overrides: Optional[GlueClientConfig] = None,
    catalog_id: Optional[CatalogIdString] = None,
) -> ImportCatalogToGlueResponse

Imports an existing Amazon Athena Data Catalog to Glue.

Parameters:

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

    The ID of the catalog to import. Currently, this should be the Amazon Web Services account ID.

Raises:

Source code in docs_src/capo_glue/_services/glue.py
def import_catalog_to_glue(
    self,
    *,
    config_overrides: Optional[GlueClientConfig] = None,
    catalog_id: Optional[
        "capo_glue.types.catalog_id_string.CatalogIdString"
    ] = None,
) -> "capo_glue.types.import_catalog_to_glue_response.ImportCatalogToGlueResponse":
    """<p>Imports an existing Amazon Athena Data Catalog to Glue.</p>

    Args:
        catalog_id: <p>The ID of the catalog to import. Currently, this should be the Amazon Web Services account ID.</p>

    Raises:
        capo_glue.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</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.
    """

    def _handler(
        req: "OperationRequest[capo_glue.types.import_catalog_to_glue_request.ImportCatalogToGlueRequest]",
    ) -> OperationResponse[
        "capo_glue.types.import_catalog_to_glue_response.ImportCatalogToGlueResponse"
    ]:
        import capo_glue._operations.aws_glue.import_catalog_to_glue

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ImportCatalogToGlue")
    )
    input_: capo_glue.types.import_catalog_to_glue_request.ImportCatalogToGlueRequest = {}
    if catalog_id is not None:
        input_["catalog_id"] = catalog_id

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