简体   繁体   English

带空格的列名 - Athena

[英]Column name with a Space - Athena

I am trying to create a table that has a column name with Space using Athena Console.我正在尝试使用 Athena 控制台创建一个列名称为 Space 的表。

Example: "Mag Creative" String示例:“Mag Creative”字符串

Error: This field is required.错误:此字段是必需的。 Spaces are not allowed!不允许有空格!

你可以试试双引号,像这样:

SELECT i."interest expense" FROM "financial-analysis-tool"."income_statement"

Considering that Athena column names cannot contain any other special character besides underscore , the error is prescriptive and explicit about what the problem is.考虑到 Athena 列名不能包含除 underscore 之外的任何其他特殊字符,错误是关于问题是什么的规定性和明确的。 You must use an underscore for this column name instead.必须对此列名称使用下划线。

It is not recommended to use a space in the name of a table column;不建议在表列名中使用空格; there are special rules for such cases.此类情况有特殊规则。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM