Re: Error in semantic analysis: Unable to fetch table

2012-10-18 Thread Keith Wiley
I never needed the -S. I would just call it with -e, but yeah, that's the basic idea. The output is gathered in the remaining optional arguments to exec(). On Oct 18, 2012, at 22:15 , MiaoMiao wrote: > What php, you are using exec('hive -S -e "select * from some_table"') > or something like t

Re: Re: can i define an udf which can process more than one argument?

2012-10-18 Thread Chris Gong
yes , it works , thank you very much Jan. Chris Gong From: Jan Dolinár Date: 2012-10-19 13:17 To: user; fellowtree Subject: Re: can i define an udf which can process more than one argument? Hi Chris, Of course it is possible to write UDF with as many parameters as you want, even with varia

Re: Index column out of bounds

2012-10-18 Thread Robin Verlangen
I found a workaround / solution to this, read more about it on my personal blog: http://www.robinverlangen.nl/index/view/507e5cc902681-422420/tableau-server-with-hive-issue-column-index-out-of-bounds.html Best regards, Robin Verlangen *Software engineer* * * W http://www.robinverlangen.nl E ro...

Re: can i define an udf which can process more than one argument?

2012-10-18 Thread Jan Dolinár
Hi Chris, Of course it is possible to write UDF with as many parameters as you want, even with variable number of arguments. Have a look at the nice article from Mark Grover [1] about writing UDFs. It also contains link to a real-life example [2]. Best regards, Jan Dolinar [1] http://mark.thegro

Re: Error in semantic analysis: Unable to fetch table

2012-10-18 Thread MiaoMiao
What php, you are using exec('hive -S -e "select * from some_table"') or something like that in php? On Fri, Oct 19, 2012 at 4:46 AM, Keith Wiley wrote: > If I run a select command on the command line with -e it works. If I run the > same command inside hive (without -e) it still works...but if

can i define an udf which can process more than one argument?

2012-10-18 Thread Chris Gong
i find that UDF can only process one argument like public long evaluate(String ip) { } can i define a udf like COALESCE(T v1, T v2, …) or if(boolean testCondition, T valueTrue, T valueFalseOrNull)? Chris Gong

Re: Aggregate data into map data type values

2012-10-18 Thread Himanish Kushary
I found an UDAF from the facebook libraries ( https://issues.apache.org/jira/browse/HIVE-1545) called collect_map which seems to serve the purpose. Still if this could be done natively by Hive, then it would be good.Any ideas ? On Thu, Oct 18, 2012 at 5:42 PM, Himanish Kushary wrote: > Hi, > >

Aggregate data into map data type values

2012-10-18 Thread Himanish Kushary
Hi, I have a table (Table A) with the following data : namepidpflagpstr count ABC502 01 1 ABC502 01 0010 2 ABC502 01 0020 2 DEF504 01 0101 1 GHI502 00 1 I want to put this data into another table(Table B) so that the d

Re: Error in semantic analysis: Unable to fetch table

2012-10-18 Thread Keith Wiley
Followup: If I run "show tables" then while I get a list from the command line, I get nothing from php. Furthermore, if I attempt to select from a bogus tablename on the command line, I get that same error, "semantic error" and whatnot...so it looks like the real problem is that when apache/php

Error in semantic analysis: Unable to fetch table

2012-10-18 Thread Keith Wiley
If I run a select command on the command line with -e it works. If I run the same command inside hive (without -e) it still works...but if I exec it with a -e from php (so obviously the apache user), I get "Error in semantic analysis: Unable to fetch table [tablename]". Bear in mind that this

RE: why I get Table not found 'dual'

2012-10-18 Thread Sunderlin, Mark
Ed's solution is clearly superior(!), if, your admin team will install it. In some cases, your admin may not wish to do so. In such cases, the below 'self-service' method will work. :-) --- Mark E. Sunderlin Solutions Architect |AOL Core Data Technologies P: 703-265-6935 |C: 540-327-6222 |

Re: why I get Table not found 'dual'

2012-10-18 Thread Edward Capriolo
That way works but if someone accidentally adds a second row or deletes the first row dual stops working right. This was why I wrote dual input format. It always works right regardless if the table has data. Edward On Thu, Oct 18, 2012 at 12:09 PM, Sunderlin, Mark wrote: > I creates a single co

RE: why I get Table not found 'dual'

2012-10-18 Thread Sunderlin, Mark
I creates a single column, single row table called 'dual' 1. Create a text file on HDFS, call it a.txt with just the letter 'a' (or any single character in it) 2. Create the single column table, dual: 'create table dual (x, string);' 3. Load the text file into dual: load data loca

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 wrote: > Do you even have

Re: Hive Query Unable to distribute load evenly in reducers

2012-10-18 Thread Philip Tromans
I'm really not convinced that there's no skew in your data. Look at the counters from the Hadoop TaskTracker pages, and thoroughly check that the numbers of reducer input records / groups and output records are all similar. Phil. On 18 October 2012 09:56, Saurabh Mishra wrote: > any views on the

RE: Hive Query Unable to distribute load evenly in reducers

2012-10-18 Thread Saurabh Mishra
any views on the problem From: saurabhmishra.i...@outlook.com To: user@hive.apache.org; navis@nexr.com Subject: RE: Hive Query Unable to distribute load evenly in reducers Date: Tue, 16 Oct 2012 11:23:29 +0530 by using mapjoin if you are implying setting set hive.auto.convert.join=true; t