Hive partitioned table


I am trying to create a hive partitioned table

this is the code that I am using

insert into table retailajinkyapart.orders partition (order_month)
select order_id, from_unixtime(cast(substr(order_date, 1, 10) as bigint)) order_date, order_customer_id, order_status, substr(from_unixtime(cast(substr(order_date, 1, 10) as bigint)), 1, 7) order_month from retailajinkya13.orders;

but I am getting an error

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

Any suggestions ?


Run the command : set hive.exec.dynamic.partition.mode=nonstrict; in hive. Hive have checks in place while partitioning. As you are partitioning based on a string value you might be prompted to change the configuration.


It worked. Thanks:+1:


Thanks. I faced the same and it worked