Reputation: 51
I am trying to create a table that has a column name with Space using Athena Console.
Example: "Mag Creative" String
Error: This field is required. Spaces are not allowed!
Upvotes: 3
Views: 11159
Reputation: 1016
In my case it was space in the column name So I had to change the create table
create external table temp_table(
Open string,
High string,
Low string,
Close string,
"Adj Close"string...
to
create external table temp_table(
Open string,
High string,
Low string,
Close string,
adj_close string...
Upvotes: 0
Reputation: 17
It is not recommended to use a space in the name of a table column; there are special rules for such cases.
Upvotes: 0
Reputation: 684
You can try double quotes,like this:
SELECT i."interest expense" FROM "financial-analysis-tool"."income_statement"
Upvotes: 10
Reputation: 106389
Considering that Athena column names cannot contain any other special character besides underscore, the error is prescriptive and explicit about what the problem is. You must use an underscore for this column name instead.
Upvotes: 0