list_table_metadata
¶
list_table_metadata(
catalog_name: CatalogNameString,
database_name: NameString,
*,
config_overrides: Optional[AthenaClientConfig] = None,
expression: Optional[ExpressionString] = None,
next_token: Optional[Token] = None,
max_results: Optional[MaxTableMetadataCount] = None,
work_group: Optional[WorkGroupName] = None,
attributes_to_get: Optional[TableAttributesList] = None,
) -> ListTableMetadataOutput
Lists the metadata for the tables in the specified data catalog database.
Parameters:
-
catalog_name(CatalogNameString) –The name of the data catalog for which table metadata should be returned.
-
database_name(NameString) –The name of the database for which table metadata should be returned.
-
expression(Optional[ExpressionString], default:None) –A regex filter that pattern-matches table names. If no expression is supplied, metadata for all tables are listed.
-
next_token(Optional[Token], default:None) –A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
-
max_results(Optional[MaxTableMetadataCount], default:None) –Specifies the maximum number of results to return.
-
work_group(Optional[WorkGroupName], default:None) –The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.
-
attributes_to_get(Optional[TableAttributesList], default:None) –Specifies the table properties returned by the
ListTableMetadatacall. This parameter doesn't accept an empty list, and the request must includeNAME. The valid combinations of values areNAME, which returns the name of each table, andNAMEandTABLE_TYPE, which return the name and table type of each table. The remaining properties are omitted. If you omit this parameter, all table properties are returned.Requesting only the properties you need can reduce response time for databases that contain many tables.
This parameter applies only to the Glue Data Catalog. For other data catalog types, it is ignored.
Raises:
-
InternalServerException–Indicates a platform issue, which may be due to a transient condition or outage.
-
InvalidRequestException–Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.
-
MetadataException–An exception that Athena received when it called a custom metastore. Occurs if the error is not caused by user input (
InvalidRequestException) or from the Athena platform (InternalServerException). For example, if a user-created Lambda function is missing permissions, the Lambda4XXexception is returned in aMetadataException. -
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_athena/_services/athena.py
3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 | |