-Re: load data inot hive using shell script
Jan Dolinár 2012-08-09, 14:02
I'd suggest you to read a bit about shell scripts... To make this work you
have to pass the queries to the hive via -e option. The way you wrote it,
interactive cli would be run and the queries would be attempted to be
executed by shell when cli ends. The correct skript in your case shouild
look like this:
bin/hive -e "load data local inpath
'/usr/local/hadoop_dir/hadoop/input/sample.txt' overwrite into table
Note that 'exit' is not even necessary, hive will exit when it reaches end
of the last statement supplied.
On Thu, Aug 9, 2012 at 3:57 PM, prabhu k <[EMAIL PROTECTED]> wrote:
> Hi Users,
> I m trying to load data into hive table using shell script. unable to load
> data into hive table.
> export HADOOP_HOME=/usr/local/hadoop
> load data local inpath '/usr/local/hadoop_dir/hadoop/input/sample.txt'
> overwrite into table sample;
> Please suggest and help me.