Re: Set variable via query

2015-01-13 Thread Xuefu Zhang
select * from someothertable where dt IN (select max(dt) from sometable); On Tue, Jan 13, 2015 at 4:39 PM, Martin, Nick wrote: > Hi all, > > I'm looking to set a variable in Hive and use the resulting value in a > subsequent query. Something like: > > set startdt='select max(dt) from sometabl

Re: Hive create table line terminated by '\n'

2015-01-13 Thread 王鹏飞
Can you give me a simple example like table only contains one string column,and in that sting column it contains '\n' as the content ? On Wed, Jan 14, 2015 at 1:42 AM, Xuefu Zhang wrote: > Consider using dataformat other than TEXT such as sequence file. > > On Mon, Jan 12, 2015 at 10:54 PM, 王鹏飞

Set variable via query

2015-01-13 Thread Martin, Nick
Hi all, I'm looking to set a variable in Hive and use the resulting value in a subsequent query. Something like: set startdt='select max(dt) from sometable'; select * from someothertable where dt=${hiveconf:startdt}; I found this is still open HIVE-2165

writing to bucketed table in MR job

2015-01-13 Thread Brian Jeltema
I have a table that I would like to define to be bucketed, but I also need to write to new partitions using HCatOutputFormat (or similar) from an MR job. I’m getting an unsupported operation error when I try to do that. Is there some way to make this work? I suppose I could write to a temporary

Re: Hive create table line terminated by '\n'

2015-01-13 Thread Xuefu Zhang
Consider using dataformat other than TEXT such as sequence file. On Mon, Jan 12, 2015 at 10:54 PM, 王鹏飞 wrote: > Thank you,maybe i didn't express my question explicitly.I know the hive > create table clause,and there exists FIELDS TERMINATED BY etc. > For example,if i use FIELDS TERMINATED BY ' ,

Fwd: Exception with the window function

2015-01-13 Thread Aihua Xu
Any one has insights on the following issue? Where would be the best place to make the changes? I have tried several approaches but it breaks some other queries. Basically, the inner query produces some additional columns (from window function) not consumed by the outer query. The query plan s

Re: compare float column

2015-01-13 Thread Patcharee Thongtra
It works. Thanks! Patcharee On 01/13/2015 10:15 AM, Devopam Mittra wrote: please try the following and report observation: WHERE long = CAST(-41.338276 AS FLOAT) regards Devopam On Tue, Jan 13, 2015 at 2:25 PM, Patcharee Thongtra mailto:patcharee.thong...@uni.no>> wrote: Hi, I

Re: compare float column

2015-01-13 Thread Devopam Mittra
please try the following and report observation: WHERE long = CAST(-41.338276 AS FLOAT) regards Devopam On Tue, Jan 13, 2015 at 2:25 PM, Patcharee Thongtra < patcharee.thong...@uni.no> wrote: > Hi, > > I have a table with float columns. I tried to query based on the condition > on a float col

compare float column

2015-01-13 Thread Patcharee Thongtra
Hi, I have a table with float columns. I tried to query based on the condition on a float column (called 'long'), but it failed (nothing returned). hive> select * from test_float where long == -41.338276; select * from test_float where long == -41.338276 Status: Finished successfully OK Time