I want to write a big query to fetch the value in a column from multiple tables in a given dataset. But the column name in each table is different like colA, colB, colC and so on. How to accomplish this?
I have many tables in my dataset where one of the column contains web URL. However this column name is different in each table. I want to process all the URL's of all the tables.
I checked in this link How to combine multiple tables that vary slightly in columns. However it talks about limited number of column name variation and limited number of tables.
I know
SELECT
column_name
FROM
`bq-project.bq-dataset.INFORMATION_SCHEMA.COLUMNS`
group by 1
will give distinct column, but not sure how to proceed