Skip to content

get_unfiltered_table_metadata async

get_unfiltered_table_metadata(
    catalog_id: CatalogIdString,
    database_name: NameString,
    name: NameString,
    supported_permission_types: PermissionTypeList,
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    region: Optional[ValueString] = None,
    audit_context: Optional[AuditContext] = None,
    parent_resource_arn: Optional[ArnString] = None,
    root_resource_arn: Optional[ArnString] = None,
    supported_dialect: Optional[SupportedDialect] = None,
    permissions: Optional[PermissionList] = None,
    query_session_context: Optional[QuerySessionContext] = None,
) -> GetUnfilteredTableMetadataResponse

Allows a third-party analytical engine to retrieve unfiltered table metadata from the Data Catalog.

For IAM authorization, the public IAM action associated with this API is glue:GetTable.

Parameters:

  • region (Optional[ValueString], default: None ) –

    Specified only if the base tables belong to a different Amazon Web Services Region.

  • catalog_id (CatalogIdString) –

    The catalog ID where the table resides.

  • database_name (NameString) –

    (Required) Specifies the name of a database that contains the table.

  • name (NameString) –

    (Required) Specifies the name of a table for which you are requesting metadata.

  • audit_context (Optional[AuditContext], default: None ) –

    A structure containing Lake Formation audit context information.

  • supported_permission_types (PermissionTypeList) –

    Indicates the level of filtering a third-party analytical engine is capable of enforcing when calling the GetUnfilteredTableMetadata API operation. Accepted values are:

    • COLUMN_PERMISSION - Column permissions ensure that users can access only specific columns in the table. If there are particular columns contain sensitive data, data lake administrators can define column filters that exclude access to specific columns.

    • CELL_FILTER_PERMISSION - Cell-level filtering combines column filtering (include or exclude columns) and row filter expressions to restrict access to individual elements in the table.

    • NESTED_PERMISSION - Nested permissions combines cell-level filtering and nested column filtering to restrict access to columns and/or nested columns in specific rows based on row filter expressions.

    • NESTED_CELL_PERMISSION - Nested cell permissions combines nested permission with nested cell-level filtering. This allows different subsets of nested columns to be restricted based on an array of row filter expressions.

    Note: Each of these permission types follows a hierarchical order where each subsequent permission type includes all permission of the previous type.

    Important: If you provide a supported permission type that doesn't match the user's level of permissions on the table, then Lake Formation raises an exception. For example, if the third-party engine calling the GetUnfilteredTableMetadata operation can enforce only column-level filtering, and the user has nested cell filtering applied on the table, Lake Formation throws an exception, and will not return unfiltered table metadata and data access credentials.

  • parent_resource_arn (Optional[ArnString], default: None ) –

    The resource ARN of the view.

  • root_resource_arn (Optional[ArnString], default: None ) –

    The resource ARN of the root view in a chain of nested views.

  • supported_dialect (Optional[SupportedDialect], default: None ) –

    A structure specifying the dialect and dialect version used by the query engine.

  • permissions (Optional[PermissionList], default: None ) –

    The Lake Formation data permissions of the caller on the table. Used to authorize the call when no view context is found.

  • query_session_context (Optional[QuerySessionContext], default: None ) –

    A structure used as a protocol between query engines and Lake Formation or Glue. Contains both a Lake Formation generated authorization identifier and information from the request's authorization context.

Raises:

Source code in docs_src/capo_glue/_services/async_glue.py
async def get_unfiltered_table_metadata(
    self,
    catalog_id: "capo_glue.types.catalog_id_string.CatalogIdString",
    database_name: "capo_glue.types.name_string.NameString",
    name: "capo_glue.types.name_string.NameString",
    supported_permission_types: "capo_glue.types.permission_type_list.PermissionTypeList",
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
    region: Optional["capo_glue.types.value_string.ValueString"] = None,
    audit_context: Optional["capo_glue.types.audit_context.AuditContext"] = None,
    parent_resource_arn: Optional["capo_glue.types.arn_string.ArnString"] = None,
    root_resource_arn: Optional["capo_glue.types.arn_string.ArnString"] = None,
    supported_dialect: Optional[
        "capo_glue.types.supported_dialect.SupportedDialect"
    ] = None,
    permissions: Optional["capo_glue.types.permission_list.PermissionList"] = None,
    query_session_context: Optional[
        "capo_glue.types.query_session_context.QuerySessionContext"
    ] = None,
) -> "capo_glue.types.get_unfiltered_table_metadata_response.GetUnfilteredTableMetadataResponse":
    """<p>Allows a third-party analytical engine to retrieve unfiltered table metadata from the Data Catalog.</p> <p>For IAM authorization, the public IAM action associated with this API is <code>glue:GetTable</code>.</p>

    Args:
        region: <p>Specified only if the base tables belong to a different Amazon Web Services Region.</p>
        catalog_id: <p>The catalog ID where the table resides.</p>
        database_name: <p>(Required) Specifies the name of a database that contains the table.</p>
        name: <p>(Required) Specifies the name of a table for which you are requesting metadata.</p>
        audit_context: <p>A structure containing Lake Formation audit context information.</p>
        supported_permission_types: <p>Indicates the level of filtering a third-party analytical engine is capable of enforcing when calling the <code>GetUnfilteredTableMetadata</code> API operation. Accepted values are:</p> <ul> <li> <p> <code>COLUMN_PERMISSION</code> - Column permissions ensure that users can access only specific columns in the table. If there are particular columns contain sensitive data, data lake administrators can define column filters that exclude access to specific columns.</p> </li> <li> <p> <code>CELL_FILTER_PERMISSION</code> - Cell-level filtering combines column filtering (include or exclude columns) and row filter expressions to restrict access to individual elements in the table.</p> </li> <li> <p> <code>NESTED_PERMISSION</code> - Nested permissions combines cell-level filtering and nested column filtering to restrict access to columns and/or nested columns in specific rows based on row filter expressions.</p> </li> <li> <p> <code>NESTED_CELL_PERMISSION</code> - Nested cell permissions combines nested permission with nested cell-level filtering. This allows different subsets of nested columns to be restricted based on an array of row filter expressions. </p> </li> </ul> <p>Note: Each of these permission types follows a hierarchical order where each subsequent permission type includes all permission of the previous type.</p> <p>Important: If you provide a supported permission type that doesn't match the user's level of permissions on the table, then Lake Formation raises an exception. For example, if the third-party engine calling the <code>GetUnfilteredTableMetadata</code> operation can enforce only column-level filtering, and the user has nested cell filtering applied on the table, Lake Formation throws an exception, and will not return unfiltered table metadata and data access credentials.</p>
        parent_resource_arn: <p>The resource ARN of the view.</p>
        root_resource_arn: <p>The resource ARN of the root view in a chain of nested views.</p>
        supported_dialect: <p>A structure specifying the dialect and dialect version used by the query engine.</p>
        permissions: <p>The Lake Formation data permissions of the caller on the table. Used to authorize the call when no view context is found.</p>
        query_session_context: <p>A structure used as a protocol between query engines and Lake Formation or Glue. Contains both a Lake Formation generated authorization identifier and information from the request's authorization context.</p>

    Raises:
        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.permission_type_mismatch_exception.PermissionTypeMismatchException: <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.get_unfiltered_table_metadata_request.GetUnfilteredTableMetadataRequest]",
    ) -> AsyncOperationResponse[
        "capo_glue.types.get_unfiltered_table_metadata_response.GetUnfilteredTableMetadataResponse"
    ]:
        import capo_glue._operations.aws_glue.get_unfiltered_table_metadata

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetUnfilteredTableMetadata")
    )
    input_: capo_glue.types.get_unfiltered_table_metadata_request.GetUnfilteredTableMetadataRequest = {
        "catalog_id": catalog_id,
        "database_name": database_name,
        "name": name,
        "supported_permission_types": supported_permission_types,
    }
    if region is not None:
        input_["region"] = region
    if audit_context is not None:
        input_["audit_context"] = audit_context
    if parent_resource_arn is not None:
        input_["parent_resource_arn"] = parent_resource_arn
    if root_resource_arn is not None:
        input_["root_resource_arn"] = root_resource_arn
    if supported_dialect is not None:
        input_["supported_dialect"] = supported_dialect
    if permissions is not None:
        input_["permissions"] = permissions
    if query_session_context is not None:
        input_["query_session_context"] = query_session_context

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