Paradisehi,

you can perhaps use the regexp_replace udf to do this.

Basically 

regexp_replace(a.url, '/*$', '') should be able replace everything after the 
first / with an empty string. The second string which is a regular expression 
is a java regular expression.

Ashish
________________________________________
From: paradisehi [EMAIL PROTECTED]
Sent: Tuesday, December 02, 2008 3:06 AM
To: [email protected]
Subject: did hive support the udf now?

My table:a just contains field:url
And Now I wanna compute each domain of url's pv? and out put insert into a 
table:b domain pv.

Now I didn't know whether the hive support the udf, maybe also I can use 
map_script to support this.



________________________________
网易免费邮,全球最大的中文免费邮箱<http://www.yeah.net>

Reply via email to