解决:Dynamic partition strict mode requires at least one static partition column. To turn this off set

在hive表中通过子查询插入数据到分区表时报的错误:

FAILED: SemanticException [Error 10096]: Dynamic partition strict mode requires at least one static partition column. To turn this off set hive.exec.dynamic.partition.mode=nonstrict

因为要做动态分区, 所以要先设定partition参数
由于default是false, 需要额外下指令打开这个开关
default是strick, 表示不允许动态分区, 所以要改成nostrick

解决方法:
set hive.exec.dynamic.partition=true;
set hive.exec.dynamic.partition.mode=nostrick;

你可能感兴趣的:(错误)