2016-08-13 6 views
3

いくつかのアドバイスが必要です。 HIVE DBでは、列を持つテーブルを作成することが可能であるハイブ - 問題のあるテーブルを作成する列にスペースがある

CREATE TABLE TEST2("Kod ASS" String) 

以下のようにスペースがあるカラム名程度

Error: Error while compiling statement: FAILED: ParseException line 1:19 cannot recognize input near '"Kod ASS"' 'String' ')' in column specification SQLState: 42000 ErrorCode: 40000

答えて

3

ショーマニュアル以下のようにエラーが表示されます。

https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL

In Hive 0.12 and earlier, only alphanumeric and underscore characters are allowed in table and column names.

In Hive 0.13 and later, column names can contain any Unicode character (see HIVE-6013). Any column name that is specified within backticks (`) is treated literally. Within a backtick string, use double backticks (``) to represent a backtick character. Backtick quotation also enables the use of reserved keywords for table and column identifiers.

To revert to pre-0.13.0 behavior and restrict column names to alphanumeric and underscore characters, set the configuration property hive.support.quoted.identifiers to none. In this configuration, backticked names are interpreted as regular expressions. For details, see Supporting Quoted Identifiers in Column Names.

+0

ここでhive.support.quoted.identifiersを設定できますか?例はありますか? – Aiman

関連する問題