Error in creating the dynamic partition in hive with the shell script

I tried to execute the following commands in a shell script, got the errors.

Same commands I executed in the the hive-shell, they worked fine. Did any one face this kind of errors ?

From exam perspective, do we need to execute the hive commands in the .sh file ?
hive -e 'set hive.exec.dynamic.partition=true;'
hive -e 'set hive.exec.dynamic.partition.mode=nonstrict;'
hive -e ‘set hive.exec.max.dynamic.partitions.pernode=1000;’

hive -e ‘insert overwrite table final_practice_1.orders_avro_part_status partition(order_status_part) select order_id,from_unixtime(cast(substr(order_date, 1, 10) as int)) , order_customer_id, order_status, order_status order_status_part from final_practice_1.orders_avro_main;’

Error:

Logging initialized using configuration in jar:file:/usr/jars/hive-common-1.1.0-cdh5.5.0.jar!/hive-log4j.properties

Logging initialized using configuration in jar:file:/usr/jars/hive-common-1.1.0-cdh5.5.0.jar!/hive-log4j.properties

Logging initialized using configuration in jar:file:/usr/jars/hive-common-1.1.0-cdh5.5.0.jar!/hive-log4j.properties

Logging initialized using configuration in jar:file:/usr/jars/hive-common-1.1.0-cdh5.5.0.jar!/hive-log4j.properties
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

Please help !!

@itversity
@pramodvspk

Run this command and try.

set hive.exec.dynamic.partition.mode=strict

got the same error.

My only question is if it works in hive shell, and I try to execute the same in the shell script it fails.

the dynamic partition parameter is setting properly, when tried in shell script.

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

@venkat - In exam you can launch hive and give the commands.

Thanks for confirming.