7

I have my below query in test1.hql file. I am trying to pass the date (dt) as the command line argument.

select * from lip_data_quality where dt = '${hiveconf: start_date}';

So whenever I try to run the above test1.hql file from shell prompt like this-

 hive -f hivetest1.hql -hiveconf start_date=20120709

I get zero records back. But the data is there in that table for that particular date. Why is it so? Something wrong I am doing?

Can anyone help me out here? I was following Bejoy's Article

I am working Hive 0.6

4

1 回答 1

6

Eliminate the space between hiveconf: and start_date.

This may only be for string types, but Hive is picky in this respect.

于 2012-08-06T01:51:36.663 回答