CmdID / aws / aws athena
aws athena list-databases
Lists the databases in the specified data catalog. AWS CLI reference
1 example 4 options Its page in the AWS CLI reference
Examples
To list the databases in a data catalog
The following list-databases example lists the databases in the AwsDataCatalog data catalog.
aws athena list-databases --catalog-name AwsDataCatalogIdentify--catalog-nameThe name of the data catalog that contains the databases to return.Its output
{
"DatabaseList": [
{
"Name": "default"
},
{
"Name": "mydatabase"
},
{
"Name": "newdb"
},
{
"Name": "sampledb",
"Description": "Sample database",
"Parameters": {
"CreatedBy": "Athena",
"EXTERNAL": "TRUE"
}
},
{
"Name": "webdata"
}
]
}For more information, see Listing Databases in a Catalog: list-databases in the Amazon Athena User Guide.
Options
--catalog-nameThe name of the data catalog that contains the databases to return.--max-resultsSpecifies the maximum number of results to return.--next-tokenA token generated by the Athena service that specifies where to continue pagination if a previous request was truncated.--work-groupThe name of the workgroup for which the metadata is being fetched.