You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Saurabh S <sa...@live.com> on 2012/06/06 06:21:03 UTC

Custom UDF in Python?

Is it possible to write Hive UDFs in Python? I googled but didn't find anything. I would be happy with RTFM replies if you can give link to the manual.
 		 	   		  

Re: subquery syntax error

Posted by Igor Tatarinov <ig...@decide.com>.
The columns you ORDER BY must be SELECTed. If you don't want identifier2 in
the output, you will need to wrap your query with another SELECT.

Hope this helps.
igor
decide.com

On Tue, Jun 5, 2012 at 10:53 PM, Avdeev V. M. <ls...@list.ru> wrote:

> Hello!
>
> I can't understand what's wrong.
>
>    drop table if exists t0;
> create table t0 (short_descr string) STORED AS SEQUENCEFILE;
> from (
> select cast(2 as int) identifier2, short_descr area_name from t0) asdf
> select *--area_name
> order by identifier2 desc, area_name asc
> ;
>
> The query works fine but if I remove * then
>
> drop table if exists t0;
> create table t0 (short_descr string) STORED AS SEQUENCEFILE;
> from (
> select cast(2 as int) identifier2, short_descr area_name from t0) asdf
> select area_name
> order by identifier2 desc, area_name asc
> ;
>
> fails with error "FAILED: Error in semantic analysis: Line 6:9 Invalid
> table alias or column reference identifier2"
> The query
>
> drop table if exists t0;
> create table t0 (short_descr string) STORED AS SEQUENCEFILE;
> from (
> select short_descr area_name from t0) asdf
> select area_name
> order by area_name asc
> ;
>
> works fine too. What's wrong with 'no mapped' columns?
>
> Thanks!
>

subquery syntax error

Posted by "Avdeev V. M." <ls...@list.ru>.
Hello!

I can't understand what's wrong.

 
    
drop table if exists t0;
create table t0 (short_descr string) STORED AS SEQUENCEFILE;
from (
 select cast(2 as int) identifier2, short_descr area_name from t0) asdf
select *--area_name
order by identifier2 desc, area_name asc
;

The query works fine but if I remove * then

drop table if exists t0;
create table t0 (short_descr string) STORED AS SEQUENCEFILE;
from (
 select cast(2 as int) identifier2, short_descr area_name from t0) asdf
select area_name
order by identifier2 desc, area_name asc
;

fails with error "FAILED: Error in semantic analysis: Line 6:9 Invalid table alias or column reference identifier2"
The query

drop table if exists t0;
create table t0 (short_descr string) STORED AS SEQUENCEFILE;
from (
 select short_descr area_name from t0) asdf
select area_name
order by area_name asc
;

works fine too. What's wrong with 'no mapped' columns?

Thanks!

Re: Re:Custom UDF in Python?

Posted by Aniket Mokashi <an...@gmail.com>.
This would need changes to hive.

On Wed, Jun 13, 2012 at 8:34 AM, <ra...@accenture.com> wrote:

>  Not sure… but may be through Jython…
>
>
>
> *From:* 王锋 [mailto:wfeng1982@163.com]
> *Sent:* miércoles, 06 de junio de 2012 7:36
> *To:* user@hive.apache.org
> *Subject:* Re:Custom UDF in Python?
>
>
>
> udfs need extends or implements the UDF class or other interface.so just
> java.
>
> At 2012-06-06 12:21:03,"Saurabh S" <sa...@live.com> wrote:
>
>  Is it possible to write Hive UDFs in Python? I googled but didn't find
> anything. I would be happy with RTFM replies if you can give link to the
> manual.
>
>
>
> ------------------------------
> Subject to local law, communications with Accenture and its affiliates
> including telephone calls and emails (including content), may be monitored
> by our systems for the purposes of security and the assessment of internal
> compliance with Accenture policy.
>
> ______________________________________________________________________________________
>
> www.accenture.com
>



-- 
"...:::Aniket:::... Quetzalco@tl"

RE: Re:Custom UDF in Python?

Posted by ra...@accenture.com.
Not sure… but may be through Jython…

From: 王锋 [mailto:wfeng1982@163.com]
Sent: miércoles, 06 de junio de 2012 7:36
To: user@hive.apache.org
Subject: Re:Custom UDF in Python?

udfs need extends or implements the UDF class or other interface.so just java.

At 2012-06-06 12:21:03,"Saurabh S" <sa...@live.com>> wrote:

Is it possible to write Hive UDFs in Python? I googled but didn't find anything. I would be happy with RTFM replies if you can give link to the manual.


________________________________
Subject to local law, communications with Accenture and its affiliates including telephone calls and emails (including content), may be monitored by our systems for the purposes of security and the assessment of internal compliance with Accenture policy.
______________________________________________________________________________________

www.accenture.com

Re:Custom UDF in Python?

Posted by 王锋 <wf...@163.com>.
udfs need extends or implements the UDF class or other interface.so just java.

At 2012-06-06 12:21:03,"Saurabh S" <sa...@live.com> wrote:

Is it possible to write Hive UDFs in Python? I googled but didn't find anything. I would be happy with RTFM replies if you can give link to the manual.