Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive >> mail # user >> Correct way of using regexserde


+
Mohammad Tariq 2013-07-01, 02:37
+
Matouk IFTISSEN 2013-07-01, 08:09
+
Mohammad Tariq 2013-07-01, 22:39
+
Matouk IFTISSEN 2013-07-02, 07:33
Copy link to this message
-
Re: Correct way of using regexserde
No luck.

Warm Regards,
Tariq
cloudfront.blogspot.com
On Tue, Jul 2, 2013 at 1:03 PM, Matouk IFTISSEN
<[EMAIL PROTECTED]>wrote:

> Yes it is to create an external table that points your data with the
> regexp passed with the SERDE.
> good day
>
>
> 2013/7/2 Mohammad Tariq <[EMAIL PROTECTED]>
>
>> Hello there,
>>
>>          Thanks a lot for the response. Do you mean creating an external
>> table?I have also tried deleting "ouputregex", but same result. And the jar
>> is also added.
>>
>> Warm Regards,
>> Tariq
>> cloudfront.blogspot.com
>>
>>
>> On Mon, Jul 1, 2013 at 1:39 PM, Matouk IFTISSEN <
>> [EMAIL PROTECTED]> wrote:
>>
>>> Hello,
>>> try to delete  "output.regex" = "%1$s" and store your data in file then
>>> pricise where the file is located
>>> STORED AS TEXTFILE
>>> LOCATION '/......';
>>> and assure that you add the jar "hive-contrib-0.10.0.jar"  in the
>>> session or you have it in all Hadoop tasktrackers
>>> like this:
>>> add jar path_where_is_the_jar_in_hive_lib\hive-contrib-0.9.0.jar ;
>>>
>>> Good luck
>>>
>>>
>>> 2013/7/1 Mohammad Tariq <[EMAIL PROTECTED]>
>>>
>>>> Hello list,
>>>>
>>>>          I would really appreciate if someone could show me the correct
>>>> way of using regexserde as i'm having some hard time using it. I have
>>>> verified my regex through
>>>> http://www.regexplanet.com/advanced/java/index.html and it's working
>>>> fine there. But when i'm using the same pattern with regexserde i'm getting
>>>> NULL.
>>>>
>>>> My input looks like this :
>>>> <SOME_CHARACTER_STRING>
>>>>
>>>> and I want to extract the characters enclosed between the angle
>>>> brackets.
>>>>
>>>> This is the command i'm using :
>>>> hive> CREATE TABLE s(f1 STRING) ROW FORMAT SERDE
>>>> 'org.apache.hadoop.hive.contrib.serde2.RegexSerDe'
>>>>     > WITH SERDEPROPERTIES ( "input.regex" = "(\\w*)", "output.regex" >>>> "%1$s") STORED AS TEXTFILE;
>>>>
>>>> LOAD works fine, but SELECT * gives me NULL.
>>>>
>>>> I am on hadoop-1.0.4 and hive-0.10.0
>>>>
>>>> Thank you so much for you time.
>>>>
>>>>
>>>> Warm Regards,
>>>> Tariq
>>>> cloudfront.blogspot.com
>>>>
>>>
>>>
>>
>