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

Switch to Plain View
Hive >> mail # user >> Issues with Hive 'Like" and multiple '%' wildcard in a pattern


+
Sunderlin, Mark 2013-06-12, 13:27
Copy link to this message
-
Re: Issues with Hive 'Like" and multiple '%' wildcard in a pattern
that seems pretty hard to believe. what version of hive are you using?
On Wed, Jun 12, 2013 at 6:27 AM, Sunderlin, Mark <[EMAIL PROTECTED]
> wrote:

> This seems to work just fine in other SQLs, but doesn't seem work in hive.
>
> I need to have several wild card characters in my 'like' clause as follows.
>
> In other SQLs, I want:  ....  where page_url_query like '%?icid=main%dl%'
>
> But in Hive that doesn't match.  I have several work arounds.  I can write
> it as:
>
>  where (page_url_query like '%?icid=main%')  and (page_url_query like
> '%dl%')
>
> or, I can just use something like where
> length(regexp_extract(page__url_query, '.*\?cdid-main.*dl.*',0) <> 0
>
> But more important is two or more '%' wild cards in a Hive like expression
> a known issue?
>
> ---
> Mark E. Sunderlin
> Solutions Architect   |AOL NETWORKS BDM
> P: 703-265-6935       |C: 540-327-6222 | AIM: MESunderlin
> 22000 AOL Way,  Dulles, VA  20166
>
>
>
+
Sunderlin, Mark 2013-06-12, 17:26
+
Stephen Sprague 2013-06-12, 18:21
+
Sunderlin, Mark 2013-06-13, 19:30
+
Stephen Sprague 2013-06-14, 02:37