hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chhaya Vishwakarma <>
Subject using hive commands in shell scripts
Date Thu, 05 Jun 2014 03:18:05 GMT

I have a problem where i need to pass columns to shell script that will be utilized inside
a shell script. Then i need to iterate over the columns and do some processing , i want to
store output in a hive table.
But i am not understanding how i should store output of each iteration in same hive table
Can anyone suggest me how it can be done?

./hive -S -e "use telecom;select case when $1/2>avg($1) over (partition by 1) then $1 end
from telecom_tr1;"`

Here i am passing only one column name but it is possible to pass multiple column name and
accordingly output should be saved in single hive table

Chhaya Vishwakarma

The contents of this e-mail and any attachment(s) may contain confidential or privileged information
for the intended recipient(s). Unintended recipients are prohibited from taking action on
the basis of information in this e-mail and using or disseminating the information, and must
notify the sender and delete it from their system. L&T Infotech will not accept responsibility
or liability for the accuracy or completeness of, or the presence of any virus or disabling
code in this e-mail"

View raw message