How to passing variable containing spaces to hive?
This have a very good explanation
Essentially you need to put double quotes between your variable like this to preserve multiple values
QUERY="select * from abc;"hive -f hive_script.hql -hivevar QUERY="${QUERY}"