I have 81 tables in AWS Athena, and now we need to change one column name. In order to do that, I should know the tables which has that particular column and checking 81 tables manually is a huge task. Is there any other way to list all tables having a particular column? maybe a query or some other trick.
CodePudding user response:
You can query metadata from the AWS Glue Data Catalog to query tables. This assumes that your Amazon Athena system has been configured to use the AWS Glue Catalog.
From Querying AWS Glue Data Catalog - Amazon Athena:
SELECT *
FROM information_schema.columns
WHERE column_name='sid'