質問

I am running Impala based Cent OS pre-configure to run Hadoop architecture. I am using Hue to auto generate table form .csv file. I uploaded file in /usr/hive/warehouse. I make sure that I remove column headers from the file before uploading.

However it gives me following exception Exception communicating with Beeswax (Hive UI) Server at localhost:21000: BeeswaxException(errorCode=0, log_context='', message="com.cloudera.impala.common.AnalysisException: Syntax error at:\n\nCREATE TABLE `2012_Q4`\n^\n(\n `col_0` string ,\n `col_1` string ,\n `col_2` string ,\n `col_3` string ,\n `col_4` string ,\n `col_5` string ,\n `col_6` string ,\n `col_7` string ,\n `col_8` string ,\n `col_9` string ,\n `col_10` string ,\n `col_11` string ,\n `col_12` string ,\n `col_13` string ,\n `col_14` string ,\n `col_15` string ,\n `col_16` string ,\n `col_17` string ,\n `col_18` string ,\n `col_19` string ,\n `col_20` string ,\n `col_21` string ,\n `col_22` string ,\n `col_23` string ,\n `col_24` string ,\n `col_25` string ,\n `col_26` string ,\n `col_27` string ,\n `col_28` string ,\n `col_29` string ,\n `col_30` string ,\n `col_31` string ,\n `col_32` string ,\n `col_33` string ,\n `col_34` string ,\n `col_35` string ) \nROW FORMAT DELIMITED\n FIELDS TERMINATED BY ','\nEncountered: IDENTIFIER\nExpected: DESCRIBE, SELECT, SHOW, USE, INSERT\n\n\tat com.cloudera.impala.analysis.AnalysisContext.analyze(AnalysisContext.java:135)\n\tat com.cloudera.impala.service.Frontend.createExecRequest(Frontend.java:221)\n\tat com.cloudera.impala.service.JniFrontend.createExecRequest(JniFrontend.java:89)\nCaused by: java.lang.Exception: Syntax error\n\tat com.cloudera.impala.analysis.SqlParser.unrecovered_syntax_error(SqlParser.java:1369)\n\tat java_cup.runtime.lr_parser.parse(lr_parser.java:616)\n\tat com.cloudera.impala.analysis.AnalysisContext.analyze(AnalysisContext.java:125)\n\t... 2 more\n", SQLState='42000', handle=QueryHandle(log_context='', id=''))

役に立ちましたか?

解決

As you can see in the error, Impala only supports Expected: DESCRIBE, SELECT, SHOW, USE, INSERT, so no CREATE table yet. This should be addressed in the next Impala release next month.

In the meantime you can create the tables in Hue Beeswax or Hive CLI (as Hive supports CREATE table).

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top