'Create table awsAthena from select statement
I have a long query in Athena reading from s3 bucket. I have join around 60 tables containing around 20k columns. I want create a new table by selecting all columns from tables. The Query is something like this:
SELECT * FROM table1, table2, ...table60 WHERE table1.id = table2.id...
When I run this query as a sql query, the it returns the wanted row.
But when I tries to use the same query to create a view, it returns an error:
"error: column "id" specified more than once."
I'll guess this happens because the resultset will have more than one column named "id". Is there someway to solve this, without writing all the column names in the query?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
