list_table_metadata
async
¶
list_table_metadata(
catalog_name: CatalogNameString,
database_name: NameString,
*,
config_overrides: Optional[AsyncAthenaClientConfig] = 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/async_athena.py
3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 | |