hive -e 'SELECT a.col from tabl1 a'
hive -S -e 'SELECT a.col from tabl1 a' > result.txt
hive -e 'select a.col from tab1 a' -hiveconf hive.root.logger=DEBUG,console
hive -i initialize.hql
hive -f script.hql
-
hivevar
- -d, --define, --hivevar
- set hivevar:name=value
$hive -d srctable=movies
hive>set hivevar:cond=123;
hive>SELECT a, b, c FROM pluralsight.${hivevar:srctable} WHERE a =${hivevar:cond};
$hive -v -d src=movies -d db=pluralsight -e 'SELECT * FROM \
${hivevar:db}.${hivevar:src} LIMIT 100;'
-
hiveconf
- --hiveconf
- set hiveconf:property=value
-
system
- set system:property=value
-
env
- set env:property=true