Hive ParseExceptions - “无法识别'附近的输入',''STRING'','”和“无法识别附近的输入”)''评论''“

时间:2014-02-24 12:05:17

标签: sql-server import hive sqoop parse-error

当使用Sqoop将MSSQL表导入Hive时,我得到了解析异常:

cannot recognize input near ',' 'STRING' ',' in column type

当我从导入中删除一些列时,我得到另一个但类似的解析异常:

cannot recognize input near ')' 'COMMENT' ''Imported by sqoop on 2014/02/24 17:44:18'' in column type

这是否意味着某些字符串字段内部有','?我应该用字符串中的逗号来逃脱吗?如何在Sqoop命令行中执行此操作?

Logging initialized using configuration in jar:file:/usr/lib/hive/lib/hive-common-0.12.0.2.0.6.1-101.jar!/hive-log4j.properties
NoViableAltException(10@[])
at org.apache.hadoop.hive.ql.parse.HiveParser.type(HiveParser.java:27461)
at org.apache.hadoop.hive.ql.parse.HiveParser.colType(HiveParser.java:27229)
at org.apache.hadoop.hive.ql.parse.HiveParser.columnNameType(HiveParser.java:26935)
at org.apache.hadoop.hive.ql.parse.HiveParser.columnNameTypeList(HiveParser.java:25211)
at org.apache.hadoop.hive.ql.parse.HiveParser.createTableStatement(HiveParser.java:4264)
at org.apache.hadoop.hive.ql.parse.HiveParser.ddlStatement(HiveParser.java:2016)
at org.apache.hadoop.hive.ql.parse.HiveParser.execStatement(HiveParser.java:1298)
at org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:938)
at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:190)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:424)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:342)
at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1000)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:911)
at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259)
at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216)
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:413)
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:348)
at org.apache.hadoop.hive.cli.CliDriver.processReader(CliDriver.java:446)
at org.apache.hadoop.hive.cli.CliDriver.processFile(CliDriver.java:456)
at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:737)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:675)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:614)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.sqoop.hive.HiveImport.executeScript(HiveImport.java:329)
at org.apache.sqoop.hive.HiveImport.importTable(HiveImport.java:239)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:425)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:502)
at org.apache.sqoop.Sqoop.run(Sqoop.java:147)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:222)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:231)
at org.apache.sqoop.Sqoop.main(Sqoop.java:240)

失败:ParseException行1:71无法识别','''STRING'','列类型

附近的输入

0 个答案:

没有答案