Re: why i get Table not found 'dual'

2012-10-18 Thread Kaufman Ng
The 'dual' table is a feature in Oracle only I believe.

There's an open Jira for this.  You can try Edward Capriolo's project
(described in the jira) which allows you to use dual.
https://issues.apache.org/jira/browse/HIVE-1558

On Thu, Oct 18, 2012 at 2:29 AM, MiaoMiao liy...@gmail.com wrote:
 Do you even have a table name 'dual' or not?

 On Thu, Oct 18, 2012 at 2:24 PM, fellowtree fellowt...@163.com wrote:
 hi all:
  some one said hive support sql like  select if(1=2,100,200) from dual;
 however i always get Table not found 'dual' . my hive is 0.9.0 and what is
 the reason?

 
 fellowtree


Re: warning message while connecting Hive shell

2012-09-18 Thread Kaufman Ng
Here's the fix: just fix the hive-log4j.properties in your hive install.

replace this line:
log4j.appender.EventCounter=org.apache.hadoop.metrics.jvm.EventCounter

with this:
log4j.appender.EventCounter=org.apache.hadoop.log.metrics.EventCounter



On Mon, Sep 17, 2012 at 10:34 AM, Robin Verlangen ro...@us2.nl wrote:
 Same for me. It's been there always, didn't really bother, however if
 there's a fix, we should fix it.

 Best regards,

 Robin Verlangen
 Software engineer

 W http://www.robinverlangen.nl
 E ro...@us2.nl

 Disclaimer: The information contained in this message and attachments is
 intended solely for the attention and use of the named addressee and may be
 confidential. If you are not the intended recipient, you are reminded that
 the information remains the property of the sender. You must not use,
 disclose, distribute, copy, print or rely on this e-mail. If you have
 received this message in error, please contact the sender immediately and
 irrevocably delete this message and any copies.



 2012/9/17 Connell, Chuck chuck.conn...@nuance.com

 I get the same warning. Could you please be more specific about set the
 class path wrt log4J property file? Exactly what should we do?

 Chuck Connell
 Nuance RD Data Team
 Burlington, MA


 -Original Message-
 From: ashok.sa...@wipro.com [mailto:ashok.sa...@wipro.com]
 Sent: Monday, September 17, 2012 7:50 AM
 To: user@hive.apache.org
 Subject: RE: warning message while connecting Hive shell

 Please set the class path wrt log4J property file

 Thanks
 Ashok S.


 
 From: Ajit Kumar Shreevastava [ajit.shreevast...@hcl.com]
 Sent: Monday, September 17, 2012 4:11 PM
 To: user@hive.apache.org
 Subject: warning message while connecting Hive shell

 Hello ,
 When I want to make connection with hive  I got the following warning
 message.

 [hadoop@NHCLT-PC44-2 conf]$ hive
 WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated. Please
 use org.apache.hadoop.log.metrics.EventCounter in all the log4j.properties
 files.
 Logging initialized using configuration in
 jar:file:/home/hadoop/hive-0.8.1/lib/hive-common-0.8.1.jar!/hive-log4j.properties
 Hive history
 file=/tmp/hadoop/hive_job_log_hadoop_201209171607_883156857.txt
 hive show tables;
 OK
 Time taken: 3.871 seconds
 hive

 Does anyone have some clue regarding the warning message.





Re: insert into table not working with tables prefixed with database name

2012-09-18 Thread Kaufman Ng
I have created HIVE-3465 for this issue.

On Mon, Sep 17, 2012 at 1:17 AM, MiaoMiao liy...@gmail.com wrote:
 Yes, same problem here, sorry I missed your point and tested only once.

 On Fri, Sep 14, 2012 at 10:13 PM, Kaufman Ng kauf...@cloudera.com wrote:
 Did you run the insert into query twice?  And did it append?

 From what I observred the query will complete successfully, but it
 overwrites instead of append.  That's the problem.


 On Thu, Sep 13, 2012 at 11:07 PM, MiaoMiao liy...@gmail.com wrote:
 This query works on my hive 0.8

 insert into table tmp.testtest select user,city from source;

 On Fri, Sep 14, 2012 at 4:36 AM, Kaufman Ng kauf...@cloudera.com wrote:
 Does anyone know if insert into statement is supposed to work across
 databases/schemas?

 For instance if I do this the target table gets appended correctly:

 insert into table target select * from source;

 However, if I have another target table in a different database, the
 target table simply gets overwritten instead of appended:

 insert into table my_database.target select * from source;

 To get around this, one needs to switch to the target database first,
 then run the insert into statement like this:

 insert into table target select * from default.source;

 Just wanna confirm if this is a bug.  Thx.

 Kaufman


Re: insert into table not working with tables prefixed with database name

2012-09-14 Thread Kaufman Ng
Did you run the insert into query twice?  And did it append?

From what I observred the query will complete successfully, but it
overwrites instead of append.  That's the problem.


On Thu, Sep 13, 2012 at 11:07 PM, MiaoMiao liy...@gmail.com wrote:
 This query works on my hive 0.8

 insert into table tmp.testtest select user,city from source;

 On Fri, Sep 14, 2012 at 4:36 AM, Kaufman Ng kauf...@cloudera.com wrote:
 Does anyone know if insert into statement is supposed to work across
 databases/schemas?

 For instance if I do this the target table gets appended correctly:

 insert into table target select * from source;

 However, if I have another target table in a different database, the
 target table simply gets overwritten instead of appended:

 insert into table my_database.target select * from source;

 To get around this, one needs to switch to the target database first,
 then run the insert into statement like this:

 insert into table target select * from default.source;

 Just wanna confirm if this is a bug.  Thx.

 Kaufman


insert into table not working with tables prefixed with database name

2012-09-13 Thread Kaufman Ng
Does anyone know if insert into statement is supposed to work across
databases/schemas?

For instance if I do this the target table gets appended correctly:

insert into table target select * from source;

However, if I have another target table in a different database, the
target table simply gets overwritten instead of appended:

insert into table my_database.target select * from source;

To get around this, one needs to switch to the target database first,
then run the insert into statement like this:

insert into table target select * from default.source;

Just wanna confirm if this is a bug.  Thx.

Kaufman