Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> Regex and serde with hive


Copy link to this message
-
Re: Regex and serde with hive
If the format is simply delimited like this, you don't need to use the
RegexSerde. Hive's default format with the right "FIELDS TERMINATED
BY" setting will work great.

-Vijay

On Thu, Dec 22, 2011 at 8:49 PM, Raghunath, Ranjith
<[EMAIL PROTECTED]> wrote:
> I have been struggling with this for a while so I would appreciate any
> advice that you any of you may have.
>
>
>
> I have a file of the format
>
>
>
> “Xyz”~”qsd”~”1234”
>
>
>
> I created the following table definition to get the data loaded
>
>
>
> CREATE TABLE dummy
>
> (f1   string,
>
>   f2    string,
>
>   f3     string)
>
> ROW FORMAT SERDE 'org.apache.hadoop.hive.contrib.serde2.RegexSerDe'
>
> WITH SERDEPROPERTIES  (
>
> "input.regex" = "([^\"~]*) ([^\"~]*) ([^\"~]*)?",
>
> "output.format.string" = "%1$s %2$s %3$s");
>
>
>
> When I load the data in and try to perform a select get NULL values. Thanks
> again.
>
> Thank you,
>
> Ranjith
>
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB