Hive查询错误 - 失败:语义分析出错:第1行:117表别名或列引用状态无效

时间:2016-08-23 08:31:31

标签: hadoop hive

获取此错误

hive> insert overwrite table employees_partition partition (country ='IND', State='HR') select * from employees_data where state = 'Haryana';     
FAILED: Error in semantic analysis: Line 1:117 Invalid table alias or column reference state

我的分区表结构是

CREATE TABLE employees_partition (
name STRING,
salary FLOAT,
subordinates ARRAY<STRING>,
deductions MAP<STRING, FLOAT>,
address STRUCT<street:STRING, city:STRING, state:STRING, zip:INT>) PARTITIONED BY (country STRING, state STRING) 
row format delimited fields terminated by ','
collection items terminated by '$'
map keys terminated by '#';

1 个答案:

答案 0 :(得分:0)

要删除此错误,您必须在您的配置单元shell上执行以下命令:

use strict;
use warnings;

此错误的原因:

默认情况下,SET hive.exec.dynamic.partition = true; SET hive.exec.dynamic.partition.mode = nonstrict; 配置属性设置为&#34; False&#34;并且hive.exec.dynamic.partition设置为&#34; strict&#34;因为Hive版本&lt; 0.9.0无法执行动态分区。